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

Unified Diff: url/url_canon_icu.cc

Issue 881073002: Update url_canon_icu prevent crash with GoogleUrl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the DCHECK so that debug and release builds behave the same. Created 5 years, 11 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: url/url_canon_icu.cc
diff --git a/url/url_canon_icu.cc b/url/url_canon_icu.cc
index 741bed22abf09f0e9b1eb778f67fc3ae155a5ee5..57cc9435a2237384d22f71d3cd158dedb33eec78 100644
--- a/url/url_canon_icu.cc
+++ b/url/url_canon_icu.cc
@@ -163,7 +163,9 @@ bool IDNToASCII(const base::char16* src, int src_len, CanonOutputW* output) {
DCHECK(output->length() == 0); // Output buffer is assumed empty.
UIDNA* uidna = g_uidna.Get().value;
- DCHECK(uidna != NULL);
+ if (uidna == NULL) {
+ return false; // Prevent null-deref in uidna_nameToASCII.
+ }
jungshik at Google 2015/03/27 21:59:16 This should not happen. If it happens, we have to
while (true) {
UErrorCode err = U_ZERO_ERROR;
UIDNAInfo info = UIDNA_INFO_INITIALIZER;
« 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