summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsondocument.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-09-05 13:26:16 +0200
committerLars Knoll <lars.knoll@digia.com>2014-09-10 21:10:45 +0200
commitdf25927a6827c0abce6d35440359a835d23226f7 (patch)
treeef060f0fc451806856c6c009f10e40be7d89e061 /src/corelib/json/qjsondocument.h
parent853845a4a2570302def9526a99f2b09433c286c5 (diff)
Don't accept json strings with trailing garbage
A well formed JSON document is not allowed to contain trailing garbage at the end. Don't accept this in the parser. Task-number: QTBUG-40062 Change-Id: I0a09dbd099a8c643f58023342546c4e67d026fec Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/json/qjsondocument.h')
-rw-r--r--src/corelib/json/qjsondocument.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h
index ea42d76b20..a09176727f 100644
--- a/src/corelib/json/qjsondocument.h
+++ b/src/corelib/json/qjsondocument.h
@@ -68,7 +68,8 @@ struct Q_CORE_EXPORT QJsonParseError
UnterminatedString,
MissingObject,
DeepNesting,
- DocumentTooLarge
+ DocumentTooLarge,
+ GarbageAtEnd
};
QString errorString() const;