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; |