qt6-bb10/tests/auto/corelib/tools/qbitarray
Thiago Macieira cb517bd2e5 QBitArray: fix read of uninitialized terminating null
Commit 54c373faa4 updated the bitwise
operations to be more efficient, bypassing QByteArray and going straight
to QByteArrayData (a.k.a. QArrayDataPointer<char>). This meant we also
bypassed the initialization of the null terminator.

This wasn't caught in our unit testing and with some runtimes because
the memory we allocated happened to be zero or contain the information
we wanted. But with Visual Studio, the debug-mode runtime initializes
all newly allocated memory with pattern 0xcd, which showed up as a
problem.

[ChangeLog][QtCore][QBitArray] Fixed a regression introduced in 6.7.0
that could cause QBitArray to report wrong bit counts after a bitwise
operation.

Pick-to: 6.7
Fixes: QTBUG-126343
Change-Id: Icdc467f26dea4b05ad90fffd17d939c3b416adca
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8ac57ff6bc778519bb1edc4036ce79ab8f688e27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-17 19:06:27 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
CMakeLists.txt QBitArray: use new comparison helper macros 2024-04-26 20:11:14 +02:00
tst_qbitarray.cpp QBitArray: fix read of uninitialized terminating null 2024-06-17 19:06:27 +00:00