qt6-bb10/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
BLACKLIST
CMakeLists.txt Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
android_testdata.qrc
tst_qiodevice.cpp tst_QIODevice: fix UB (precondition violation) in SequentialReadBuffer::readData() 2021-12-16 23:25:47 +01:00