qt6-bb10/tests/auto/corelib/text/qstring
Thiago Macieira d351a97e85 QString::arg: don't pass nullptr to memcpy()
A null QString / QStringView has a null begin pointer stored as its
array beginning (something we hide a little in the QString::data()
function, but not in QStringView::data()). We've been passing a null
pointer to memcpy() every time someone passed a null QStringView for
QString's single-argument arg() call, though not the multi-string arg()
version (which is the only one QStringView offers).

Commit f5021835df made this worse by
making QStringViews created from null QStrings retain the nullness (as
was intended).

Fixes: QTBUG-120624
Pick-to: 6.2 6.5 6.6 6.7
Change-Id: I6e2677aad2ab45759db2fffd17a870639b19340b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-11 00:37:29 +00:00
..
.gitignore
CMakeLists.txt CI: Enable tests under corelib/text for Wasm platform 2023-07-10 14:53:34 +02:00
double_data.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tst_qstring.cpp QString::arg: don't pass nullptr to memcpy() 2024-01-11 00:37:29 +00:00
tst_qstring_mac.mm QString: change test data to compile with QT_NO_CAST_FROM_ASCII [10/13] 2023-03-15 22:25:57 +02:00
tst_qstring_wasm.cpp wasm: rename JsString -> EcmaString 2023-08-30 23:02:03 +02:00