From e1d3687d64a19d27448b3f8247505daa99261ea1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 15 Feb 2013 10:44:54 +0100 Subject: Fix crashes when creating large documents Compact an object in regular intervals when inserting data into it, to avoid the object becoming huge. Compact an object/array before inserting into another array or object. Check that the document doesn't get so big it's overflowing the internal data structures. Task-number: QTBUG-29288 Change-Id: Id39d80dac1e7d5a11f40819f41b4b336bce16947 Reviewed-by: Thiago Macieira --- src/corelib/json/qjsondocument.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/json/qjsondocument.h') diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h index 4d4f3885dc..0354262e2c 100644 --- a/src/corelib/json/qjsondocument.h +++ b/src/corelib/json/qjsondocument.h @@ -67,7 +67,8 @@ struct Q_CORE_EXPORT QJsonParseError IllegalUTF8String, UnterminatedString, MissingObject, - DeepNesting + DeepNesting, + DocumentTooLarge }; QString errorString() const; -- cgit v1.2.3