qt5base-lts/tests/auto
Marc Mutz 61157c8354 QBuffer: fix writing more than two GiB of data
In Qt 6, QByteArray can hold more than two GiB of data on 64-bit
platforms, so QBuffer should be able to handle writes of more than two
GiB, too. But the implementation didn't check for overflow and held
sizes in int variables, so it happily reported success but wrote data
only mod INT_MAX.

Fix by carefully avoiding overflow and using size variables of proper
type.

[ChangeLog][QtCore][QBuffer] Fixed silent data truncation when writing
more than two GiB at once on 64-bit platforms.

Pick-to: 6.3 6.2
Fixes: QTBUG-102171
Change-Id: Ib666f9f7db24495b4ed64191a48b35edc410f7e9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-04-04 08:17:09 +02:00
..
bic/data Add BC files for 6.2.0 2022-01-07 13:31:38 +00:00
cmake CMake: Add deployment auto test 2022-03-16 15:56:17 +01:00
concurrent Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
corelib QBuffer: fix writing more than two GiB of data 2022-04-04 08:17:09 +02:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui Android: enable tst_QScreen::grabWindow 2022-03-31 11:48:54 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QNetworkInformation: Deprecate vague load functions 2022-03-31 11:54:42 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Windows QPA: Fix slowdown with large table/tree views with accessibility 2022-03-31 09:04:09 -03:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql Deprecate {QString, QByteArray}::count() 2022-03-12 01:05:45 +01:00
testlib TAP test logger: report B?XFAIL (mostly) as a message 2022-03-29 22:21:58 +02:00
tools uic: use C string literals for setObjectName() 2022-03-18 18:35:03 +01:00
widgets Revert "Activate all tst_qgridlayout tests on Android" 2022-04-02 16:57:32 +00:00
xml QDom: preserve empty CDATA sections 2022-03-26 12:01:14 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Fix check for IPV6 support without certain features 2022-02-28 22:08:21 +00:00