Advertisement
h3xx

chromium-git_icu_segfault_fix.patch

Mar 4th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. diff --git a/chrome/browser/autofill/autofill_regexes.cc b/chrome/browser/autofill/autofill_regexes.cc
  2. index b1ed629..65ef540 100644
  3. --- chromium/src/chrome/browser/autofill/autofill_regexes.cc
  4. +++ chromium/src/chrome/browser/autofill/autofill_regexes.cc
  5. @@ -57,6 +57,8 @@ icu::RegexMatcher* AutofillRegexes::GetMatcher(const string16& pattern) {
  6. UREGEX_CASE_INSENSITIVE,
  7. status);
  8. DCHECK(U_SUCCESS(status));
  9. + if (U_FAILURE(status))
  10. + return NULL;
  11.  
  12. matchers_.insert(std::make_pair(pattern, matcher));
  13. }
  14. @@ -71,6 +73,8 @@ namespace autofill {
  15. bool MatchesPattern(const string16& input, const string16& pattern) {
  16. icu::RegexMatcher* matcher =
  17. AutofillRegexes::GetInstance()->GetMatcher(pattern);
  18. + if (matcher == NULL)
  19. + return false;
  20. icu::UnicodeString icu_input(input.data(), input.length());
  21. matcher->reset(icu_input);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement