Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-10-31 04:41:19 +0300
committerChristopher Faylor <me@cgf.cx>2010-10-31 04:41:19 +0300
commit418709899d72656f8cbaa559c3473e582c9c5269 (patch)
treeb896e14a305efe7c505990f0a781a1b6a78d9641
parent49808040c5fa1390983945d38c7e8267b2b8a381 (diff)
* regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ case.
-rw-r--r--winsup/utils/ChangeLog7
-rw-r--r--winsup/utils/regtool.cc2
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 93a94dca5..b0278c587 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-30 Dmitry Potapov <dpotapov@gmail.com>
+
+ * regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ
+ case.
+
2010-09-06 Corinna Vinschen <corinna@vinschen.de>
* cygpath.cc (RtlEqualUnicodePathPrefix): New helper function.
@@ -1370,7 +1375,7 @@
2006-10-16 Corinna Vinschen <corinna@vinschen.de>
- * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
+ * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
WINVER to 0x0502 before including windows.h.
2006-10-16 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index c51479d60..0da7ecad0 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -711,7 +711,7 @@ cmd_set ()
n += mbstowcs ((wchar_t *) data + n, argv[i], max_n - n) + 1;
((wchar_t *)data)[n] = L'\0';
rv = RegSetValueExW (key, value, 0, REG_MULTI_SZ, (const BYTE *) data,
- (max_n + 1) * sizeof (wchar_t));
+ (n + 1) * sizeof (wchar_t));
break;
case REG_AUTO:
rv = ERROR_SUCCESS;