qt5base-lts/tests/auto/corelib/tools/qarraydata
João Abecasis c67efb6506 Fix invalid read, detected by valgrind
Commit 3fe1eed0 changed the QVERIFY in line 1354 to QCOMPARE. This was
done to work around a (not yet understood) compiler issue. That however
was wrong, as char pointers in QCOMPARE are assumed to point to
'\0'-terminated strings and will get dereferenced.

In this case the intent was to compare the actual pointer values, as the
pointers point past the end of the array and should not be dereferenced.

Explicitly casting to (void *) and using QCOMPARE will not only keep the
intent, it will hopefully also provide meaningful output on failures. As
such the fix was applied throughout the test.

Change-Id: Ib0968df492ccc11d7c391bb69037cd7241e55493
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-15 23:01:13 +01:00
..
qarraydata.pro SimpleVector as a test case for QArrayData 2011-12-07 02:01:42 +01:00
simplevector.h Add AllocationOption::Grow 2012-02-29 14:31:15 +01:00
tst_qarraydata.cpp Fix invalid read, detected by valgrind 2012-03-15 23:01:13 +01:00