From 1bf93d504fd74c5286506ad58ac595f8386eb0e0 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sat, 4 Apr 2020 09:31:48 +0200 Subject: [PATCH] AK: Break on end of input in JsonParser::consume_quoted_string Fixes #1599 --- AK/JsonParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AK/JsonParser.cpp b/AK/JsonParser.cpp index 1007c46779..2beb1a060f 100644 --- a/AK/JsonParser.cpp +++ b/AK/JsonParser.cpp @@ -90,6 +90,8 @@ String JsonParser::consume_quoted_string() m_index = peek_index; } + if (m_index == m_input.length()) + break; if (ch == '"') break; if (ch != '\\') {