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

Unified Diff: base/test/test_reg_util_win.cc

Issue 519773002: Fix out-of-bounds read in RegistryOverrideManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_reg_util_win.cc
diff --git a/base/test/test_reg_util_win.cc b/base/test/test_reg_util_win.cc
index 3c5753eff88c6c19d173cf3a652ecf8b902d73aa..f354b1736638bfe4d48d49d7717e6ab9568f7130 100644
--- a/base/test/test_reg_util_win.cc
+++ b/base/test/test_reg_util_win.cc
@@ -33,7 +33,8 @@ void DeleteStaleTestKeys(const base::Time& now,
for (; iterator_test_root_key.Valid(); ++iterator_test_root_key) {
base::string16 key_name = iterator_test_root_key.Name();
std::vector<base::string16> tokens;
- Tokenize(key_name, base::string16(kTimestampDelimiter), &tokens);
+ if (!Tokenize(key_name, base::string16(kTimestampDelimiter), &tokens))
+ continue;
int64 key_name_as_number = 0;
if (!base::StringToInt64(tokens[0], &key_name_as_number)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698