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

Unified Diff: chrome/installer/mini_installer/regkey.cc

Issue 2670133002: Various cleanups. (Closed)
Patch Set: huangs comments Created 3 years, 10 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
« no previous file with comments | « chrome/installer/mini_installer/mini_installer_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/regkey.cc
diff --git a/chrome/installer/mini_installer/regkey.cc b/chrome/installer/mini_installer/regkey.cc
index ca95507b171caf2132afa4305d5da3979488af58..c8fd6c0a01c90acddf221f0a03b7d82ec88872c2 100644
--- a/chrome/installer/mini_installer/regkey.cc
+++ b/chrome/installer/mini_installer/regkey.cc
@@ -25,7 +25,7 @@ LONG RegKey::ReadSZValue(const wchar_t* value_name,
if (result == ERROR_SUCCESS) {
if (type != REG_SZ) {
result = ERROR_NOT_SUPPORTED;
- } else if (byte_length == 0) {
+ } else if (byte_length < 2) {
*value = L'\0';
} else if (value[byte_length/sizeof(wchar_t) - 1] != L'\0') {
if ((byte_length / sizeof(wchar_t)) < value_size)
« no previous file with comments | « chrome/installer/mini_installer/mini_installer_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698