| Index: chrome/app/client_util.cc
|
| ===================================================================
|
| --- chrome/app/client_util.cc (revision 40935)
|
| +++ chrome/app/client_util.cc (working copy)
|
| @@ -96,8 +96,11 @@
|
| if (::RegCreateKeyExW(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL,
|
| REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL,
|
| ®_key, NULL) == ERROR_SUCCESS) {
|
| + // Note that the length here must be in bytes and must account for the
|
| + // terminating null char.
|
| ::RegSetValueExW(reg_key, google_update::kRegDidRunField, 0, REG_SZ,
|
| - reinterpret_cast<const BYTE *>(value), ::lstrlenW(value));
|
| + reinterpret_cast<const BYTE *>(value),
|
| + (::lstrlenW(value) + 1) * sizeof(wchar_t));
|
| ::RegCloseKey(reg_key);
|
| return true;
|
| }
|
|
|