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

Unified Diff: chrome/browser/autofill/autofill_profile.cc

Issue 7645038: Autofill: Check for different string sizes when comparing for equality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | chrome/browser/webdata/web_database_migration_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.cc
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index bdeab8370d66091795e05a20be96190330243b81..88d3fb0733313e6dd91fdc1ffa599c583ff8abea 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -543,6 +543,7 @@ struct CaseInsensitiveStringEquals
: public std::binary_function<string16, string16, bool>
{
bool operator()(const string16& x, const string16& y) const {
+ if (x.size() != y.size()) return false;
dhollowa 2011/08/15 21:45:15 Elsewhere in the Autofill code we're using |String
James Hawkins 2011/08/15 21:57:11 Done.
return std::equal(x.begin(), x.end(), y.begin(),
base::CaseInsensitiveCompare<string16::value_type>());
}
« no previous file with comments | « no previous file | chrome/browser/webdata/web_database_migration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698