diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 21:41:17 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 21:41:17 +0000 |
commit | fd043d0c969043a81ad25c76835b85c739c9c5c4 (patch) | |
tree | a99e7d3c4c4920dac95e3ec653945d5ff6406590 /base | |
parent | 38836594c693d53986fd2c14a282313b2e019046 (diff) | |
download | chromium_src-fd043d0c969043a81ad25c76835b85c739c9c5c4.zip chromium_src-fd043d0c969043a81ad25c76835b85c739c9c5c4.tar.gz chromium_src-fd043d0c969043a81ad25c76835b85c739c9c5c4.tar.bz2 |
Fix *RegValueWorkItem to handle a case where previous value is empty.
Not handling correctly caused a crash. Added unit tests to cover those cases.
BUG=71953
TEST=covered by installer util unit tests
Review URL: http://codereview.chromium.org/6485026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/win/registry.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/win/registry.cc b/base/win/registry.cc index 09cf485..d105a4c 100644 --- a/base/win/registry.cc +++ b/base/win/registry.cc @@ -218,7 +218,7 @@ LONG RegKey::ReadInt64(const wchar_t* name, int64* value) const { LONG RegKey::WriteValue(const wchar_t* name, const void * data, DWORD dsize, DWORD dtype) { base::ThreadRestrictions::AssertIOAllowed(); - DCHECK(data); + DCHECK(data || !dsize); LONG result = RegSetValueEx(key_, name, 0, dtype, reinterpret_cast<LPBYTE>(const_cast<void*>(data)), dsize); |