Go to file
Marc Mutz de005e7976 QByteArray: more GCC 12 -Werror=array-bound whack-a-mole
This one came up on a tsan build, but not on an asan/ubsan one!?!:

    qbytearray.cpp: In member function ‘QByteArray QByteArray::toBase64(Base64Options) const’:
    qbytearray.cpp:3884:42: error: array subscript 1 is outside array bounds of ‘const char [1]’ [-Werror=array-bounds]
     3884 |             chunk |= int(uchar(data()[i++])) << 8;
          |                                ~~~~~~~~~~^
    qbytearray.cpp:37:24: note: at offset 1 into object ‘QByteArray::_empty’ of size 1
       37 | Q_CONSTINIT const char QByteArray::_empty = '\0';
          |                        ^~~~~~~~~~
    cc1plus: all warnings being treated as errors

Fix, as so often, by caching the size().

The code in 5.15 is different, but similar, so picking all the way.

Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-103923
Change-Id: Iac30e964c8d7d367620d16db65ceeaade33ee6b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-14 01:30:48 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin CMake: Automatically use Xcode generator in qt-cmake + iOS 2022-05-20 13:06:00 +02:00
cmake CMake: Fix typos 2022-06-13 15:37:36 +02:00
coin CMake: Move all CMake Coin builds to be out-of-source 2022-06-10 12:27:01 +00:00
config.tests CMake: Test the linker too for -mno-direct-extern-access 2022-05-25 16:29:31 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: Fix typo in the online documentation template 2022-05-31 10:41:36 +02:00
examples Remove unnecessary dependency to OpenGL 2022-05-30 11:03:19 +03:00
lib
libexec Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
LICENSES Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mkspecs wasm: don't enable specialHTMLTargets by default 2022-06-01 13:52:47 +02:00
qmake Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
src QByteArray: more GCC 12 -Werror=array-bound whack-a-mole 2022-06-14 01:30:48 +00:00
tests Don't crash when removing the last visible tab 2022-06-13 14:04:31 +02:00
util CMake: Fix typos 2022-06-13 15:37:36 +02:00
.cmake.conf Bump version to 6.5.0 2022-06-06 13:23:59 +03:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt Use REALPATH based check for symbolic links on Windows 2022-01-07 14:31:38 +01:00
conanfile.py Conan: Don't add 'qt_host_path' automatically when cross-building 2022-06-02 08:33:21 +03:00
config_help.txt C++23/c++2b support 2022-06-08 19:43:34 +02:00
configure Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.bat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.cmake CMake: Fix typos 2022-06-13 15:37:36 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
qt_cmdline.cmake C++23/c++2b support 2022-06-08 19:43:34 +02:00
sync.profile Remove deprecated qgl.h from sync.profile 2022-06-11 00:42:13 +02:00