Priority: P1: Critical
Affects Version/s: 6.0.0 Beta4
Component/s: Core: I/O
Environment:Ubuntu 20.04 LTS 64 bit
Built with qmake
Commits:638171eb10cfb186a6c47ec052a3b0c5b6449386 (qt/qtbase/dev) c5623e5bb13824ef7d735e8d429278223b2887c1 (qt/qtbase/6.0)
- Build the attached project.
- Run it on the attached input:
- Watch the value of "newSize" in line 1583 of qcborvalue.cpp:
Use a breakpoint, a qDebug() or whatever you prefer.
It will try resizing the QByteArray to 2147483639.
Allocating 2 GiB of memory doesn't seem appropriate for 8 bytes of input.
This is a regression from Qt 5.15. There, the function will return -1 before: