Index: src/url_util.cc |
diff --git a/src/url_util.cc b/src/url_util.cc |
index 382cec278499e05bc223207ab8ed8cf16052c070..04c595a3ba9fa6fc9a52b6952a946ced6da09692 100644 |
--- a/src/url_util.cc |
+++ b/src/url_util.cc |
@@ -178,8 +178,10 @@ bool DoCanonicalize(const CHAR* in_spec, int in_spec_len, |
#endif |
url_parse::Component scheme; |
- if (!url_parse::ExtractScheme(spec, spec_len, &scheme)) |
+ if (!url_parse::ExtractScheme(spec, spec_len, &scheme)) { |
+ AppendInvalidNarrowString(spec, 0, spec_len, output); |
return false; |
+ } |
// This is the parsed version of the input URL, we have to canonicalize it |
// before storing it in our object. |