qt5base-lts/tests/auto/corelib/io/qiodevice
Marc Mutz 572b55baa4 tst_QIODevice: fix UB (precondition violation) in SequentialReadBuffer::readData()
memcpy() mustn't be called with a nullptr, even if the size is zero.

Fixes ubsan error:

   tst_qiodevice.cpp:561:15: runtime error: null pointer passed as argument 1, which is declared to never be null

Even though ubsan only complained about one of them, fix all three
occurrences of the pattern in the test.

Pick-to: 6.3 6.2 5.15
Change-Id: I5c06ab4a20a9e9f8831392c46c6969c05248fdac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-16 23:25:47 +01:00
..
.gitignore Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
android_testdata.qrc Android: Fix QIODevice tests 2014-12-22 09:27:44 +01:00
BLACKLIST Revert blacklisting of two tests now the fix is in 2016-05-30 17:39:37 +00:00
CMakeLists.txt Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
tst_qiodevice.cpp tst_QIODevice: fix UB (precondition violation) in SequentialReadBuffer::readData() 2021-12-16 23:25:47 +01:00