qt5base-lts/tests/auto/corelib
Mårten Nordheim 4660a230d5 QString/QByteArray: fix append() wrt. raw data
When appending to an empty string or byte array, we optimize and
copy the internal pointer. But if the other string/byte array was
created with fromRawData this might be temporary data on the stack/heap
and might be de-allocated or overwritten before the string/byte array
is used or is forced to make a deep-copy. This would lead to incorrect
data being used.

This is easy to overlook if you plan to append multiple strings
together, potentially supplied through an argument. Upon appending a
second string it would make a full copy, but there might not be a
guarantee for that. So, it's hard for users to avoid this pitfall!

Fixes: QTBUG-115752
Pick-to: 6.6 6.5 6.2
Change-Id: Ia9aa5f463121c2ce2e0e8eee8a6c8612b7297f2b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-21 23:27:56 +02:00
..
animation tst_QParallelAnimationGroup: fix memleak 2023-07-14 14:56:03 +02:00
global Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
io Make IDB settings work sync with JSPI 2023-08-21 19:39:21 +02:00
ipc QNativeIpcKey: add qHash() function 2023-07-25 12:31:04 +02:00
itemmodels tst_QSortFilterProxyModel: fix mem-leaks II: sortStable() 2023-07-19 04:51:26 +00:00
kernel QObject: Do not register an observer when writing objectName property 2023-08-21 14:15:51 +02:00
mimetypes tst_qmimedatabase: compile with QT_NO_FOREACH; port to ranged-for 2023-08-19 19:17:17 +03:00
platform CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
plugin QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes 2023-08-18 18:00:09 +02:00
serialization Rename accent color in QPalette 2023-08-18 00:38:38 +02:00
text QString/QByteArray: fix append() wrt. raw data 2023-08-21 23:27:56 +02:00
thread Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
time Update QTimeZone data to CLDR v43 2023-08-07 19:51:09 +02:00
tools tst_QFreeList: build with QT_NO_FOREACH 2023-08-19 16:29:54 +03:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00