qt5base-lts/tests/auto
Thiago Macieira 02d595946f QCborValue::fromCbor: Apply a recursion limit to decoding
A simple 16k file can produce deep enough recursion in Qt to cause stack
overflow. So prevent that.

I tested 4096 recursions just fine on my Linux system (8 MB stack), but
decided 1024 was sufficient, as this code will also be run on embedded
systems that could have smaller stacks.

[ChangeLog][QtCore][QCborValue] fromCbor() now limits decoding to at
most 1024 nested maps, arrays, and tags to prevent stack overflows. This
should be sufficient for most uses of CBOR. An API to limit further or
to relax the limit will be provided in 5.15. Meanwhile, if decoding more
is required, QCborStreamReader can be used (note that each level of map
and array allocates memory).

Change-Id: Iaa63461109844e978376fffd15fa0fbefbf607a2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-25 16:21:47 -03:00
..
bic/data Add binary compatibility files for qtbase 5.14 branch 2019-12-20 10:41:11 +02:00
cmake CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib QCborValue::fromCbor: Apply a recursion limit to decoding 2020-03-25 16:21:47 -03:00
dbus unblacklist passing tests 2019-07-08 11:01:42 +00:00
gui Fix non-trivial soft-hyphen line breaks 2020-03-10 21:58:21 +01:00
guiapplauncher
installed_cmake
network Fix 'out of process' autotests 2020-03-11 18:23:24 +00:00
opengl Remove dead code from Qt 4 times 2019-08-20 22:27:46 +00:00
other Flatten version-specific blacklisting on macOS to all macOS versions 2020-01-22 17:58:31 +01:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql tst_QSqlQuery: fix some tests 2019-12-10 06:27:09 +01:00
testlib Fix crash when using signaldumper and sender is deleted 2019-09-23 08:27:18 +00:00
tools uic/Python: Add imports for Q(Date)Time, QKeySequence 2020-02-06 17:46:21 +01:00
widgets tst_QMenu: make QSKIP message truthful 2020-03-18 10:02:29 +00:00
xml QDom: use correct precision when converting float/double values 2020-03-03 22:08:18 +01:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Autotest: adapt to certain OSes always allowing binding to low ports 2020-02-13 15:11:21 -08:00