Index: src/json-parser.h |
diff --git a/src/json-parser.h b/src/json-parser.h |
index f93b04d38ffe520f0a1615b51a9efcf3c5cf21ef..68eab65fd5ab6f094cf2425ee2a95725b52c916c 100644 |
--- a/src/json-parser.h |
+++ b/src/json-parser.h |
@@ -458,12 +458,12 @@ Handle<String> JsonParser<seq_ascii>::SlowScanJsonString( |
String::WriteToFlat(*prefix, dest, start, end); |
while (c0_ != '"') { |
+ // Check for control character (0x00-0x1f) or unterminated string (<0). |
+ if (c0_ < 0x20) return Handle<String>::null(); |
if (count >= length) { |
// We need to create a longer sequential string for the result. |
return SlowScanJsonString<StringType, SinkChar>(seq_str, 0, count); |
} |
- // Check for control character (0x00-0x1f) or unterminated string (<0). |
- if (c0_ < 0x20) return Handle<String>::null(); |
if (c0_ != '\\') { |
// If the sink can contain UC16 characters, or source_ contains only |
// ASCII characters, there's no need to test whether we can store the |