qt5base-lts/tests/auto/corelib
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
..
animation tst_qanimationgroup: fix memleaks 2022-01-05 08:22:00 +01:00
global Move some purely floating-point testing from tst_QLocale to tst_QNumeric 2022-04-01 23:11:35 +02:00
io QBuffer: fix writing more than two GiB of data 2022-04-04 08:17:09 +02:00
itemmodels Fix test to pass with QT_FORCE_ASSERTS 2022-02-18 18:55:38 +01:00
kernel Revert "Blacklist: test cases blacklisted in tst_QSystemSemaphore:" 2022-04-01 08:00:39 +00:00
mimetypes Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Android: activate tst_QPluginLoader 2022-03-30 19:05:59 +02:00
serialization Disable test tst_qxmlstream for QNX 2022-03-25 20:16:30 +02:00
text We do in fact support 'F' format for floating-point values 2022-04-01 23:11:35 +02:00
thread Android: activate tst_QThreadStorage 2022-03-25 22:43:49 +01:00
time Add a test and remove a work-around for a fixed bug 2022-03-29 22:21:57 +02:00
tools Fix compiler warnings in tests 2022-03-24 13:23:16 +01:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00