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

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, 2 months 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
Index: chrome_frame/chrome_tab.cc
===================================================================
--- chrome_frame/chrome_tab.cc (revision 107404)
+++ 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);

Powered by Google App Engine
This is Rietveld 408576698