summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index b394a11..b984e73 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -467,8 +467,9 @@ class SecurityDescBackup {
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);