summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete_history_manager.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 23:59:05 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 23:59:05 +0000
commit21b2a0301fa544db1ae0cb1a9f50a17a22d72eec (patch)
tree9790c575bb544b34a4482f0916313dd966aace98 /chrome/browser/autocomplete_history_manager.cc
parentd0873ad8fa10f121e6b4225410a2907ff92dc375 (diff)
downloadchromium_src-21b2a0301fa544db1ae0cb1a9f50a17a22d72eec.zip
chromium_src-21b2a0301fa544db1ae0cb1a9f50a17a22d72eec.tar.gz
chromium_src-21b2a0301fa544db1ae0cb1a9f50a17a22d72eec.tar.bz2
Fix a crashing bug in IsSSN(str) when presented with non-ascii input.
TEST=none BUG=none Review URL: http://codereview.chromium.org/2858052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete_history_manager.cc')
-rw-r--r--chrome/browser/autocomplete_history_manager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index f30ec2b..dab9363 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -30,7 +30,7 @@ const string16 kSSNSeparators = ASCIIToUTF16(" -");
bool IsSSN(const string16& text) {
string16 number_string;
RemoveChars(text, kSSNSeparators.c_str(), &number_string);
- if (number_string.length() != 9)
+ if (number_string.length() != 9 || !IsStringASCII(number_string))
return false;
// A SSN is of the form AAA-GG-SSSS (A = area number, G = group number, S =