From 1261fa7654a827793a1f73b25e783ade32d47cfc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 10 Nov 2023 16:15:23 -0600 Subject: QCborStreamWriter: correct the QCbor{Array,Map} size limitations Increased due to qsizetype. Pick-to: 6.5 6.6 Change-Id: I85b3fc2dd45c4693be13fffd179662c8b898fb79 Reviewed-by: Edward Welbourne --- src/corelib/serialization/qcborstreamwriter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/corelib/serialization/qcborstreamwriter.cpp') diff --git a/src/corelib/serialization/qcborstreamwriter.cpp b/src/corelib/serialization/qcborstreamwriter.cpp index be7a918607..7b5099567e 100644 --- a/src/corelib/serialization/qcborstreamwriter.cpp +++ b/src/corelib/serialization/qcborstreamwriter.cpp @@ -731,7 +731,8 @@ void QCborStreamWriter::startArray() seem to allow up to 2\sup{64}-1 elements in the array. However, both QCborStreamWriter and QCborStreamReader are currently limited to 2\sup{32}-2 items on 32-bit systems and 2\sup{64}-2 items on 64-bit ones. Also note that - QCborArray is currently limited to 2\sup{27} elements in any platform. + QCborArray is currently limited to 2\sup{27} elements on 32-bit platforms and + 2\sup{59} elements on 64-bit ones. \sa startArray(), endArray(), startMap(), QCborStreamReader::isArray(), QCborStreamReader::isLengthKnown() @@ -804,7 +805,8 @@ void QCborStreamWriter::startMap() seem to allow up to 2\sup{64}-1 pairs in the map. However, both QCborStreamWriter and QCborStreamReader are currently limited to 2\sup{31}-1 items on 32-bit systems and 2\sup{63}-1 items on 64-bit ones. Also note that - QCborMap is currently limited to 2\sup{26} elements in any platform. + QCborMap is currently limited to 2\sup{26} elements on 32-bit platforms and + 2\sup{58} on 64-bit ones. \sa startMap(), endMap(), startArray(), QCborStreamReader::isMap(), QCborStreamReader::isLengthKnown() -- cgit v1.2.3