Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4150)

Unified Diff: chrome_frame/chrome_tab.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/time_format.cc ('k') | chrome_frame/test/win_event_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_tab.cc
===================================================================
--- chrome_frame/chrome_tab.cc (revision 111826)
+++ chrome_frame/chrome_tab.cc (working copy)
@@ -467,8 +467,9 @@
DWORD reg_type = REG_NONE;
if (backup_key.ReadValue(NULL, NULL, &len, &reg_type) != ERROR_SUCCESS)
return false;
+ DCHECK_EQ(0u, len % sizeof(wchar_t));
- if (reg_type != REG_SZ)
+ if ((len == 0) || (reg_type != REG_SZ))
return false;
size_t wchar_count = 1 + len / sizeof(wchar_t);
« no previous file with comments | « chrome/common/time_format.cc ('k') | chrome_frame/test/win_event_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698