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 + + * regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ + case. + 2010-09-06 Corinna Vinschen * cygpath.cc (RtlEqualUnicodePathPrefix): New helper function. @@ -1370,7 +1375,7 @@ 2006-10-16 Corinna Vinschen - * 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 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;