qt5base-lts/tests/auto/corelib
Marc Mutz c8411a0281 tst_qurlinternal: fix a use of memcpy on overlapping memory
The old code smply copied 100 shorts from the pointer passed into the
ushortarray ctor, regardless of the actual bounds of the original array.

Fix by making the ctor take the array by deference, deducing the size
as a template parameter, and only copying that much.

Fixes asan trace:
==18660==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff3c56de00,0x7fff3c56dec8) and [0x7fff3c56dd60, 0x7fff3c56de28) overlap
    #0 0x457161 in memcpy asan_interceptors.cc:330
    #1 0x4c40fe in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:62
    #2 0x4b0437 in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:63
    #3 0x47b643 in tst_QUrlInternal::idna_testsuite_data() qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:119
    ...

Change-Id: Ie497bc8d337bc680a562482ca71ace535797ffb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-14 23:41:06 +02:00
..
animation Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
codecs Ensure that the user codecs are listed in QTextCodec::availableCodecs 2013-07-21 07:30:48 +02:00
global Make QFlags enum flags (C++11 strict enums) friendly 2013-05-09 12:17:59 +02:00
io tst_qurlinternal: fix a use of memcpy on overlapping memory 2013-09-14 23:41:06 +02:00
itemmodels Make the QItemSelectionModel test widgets-independent. 2013-08-13 16:34:16 +02:00
json Fix crashes when invoking toVariant() on empty QJsonValue objects. 2013-07-24 10:56:07 +02:00
kernel QMetaMethod::invoke: compare the QMetaType id of the return types 2013-08-29 17:03:41 +02:00
mimetypes QMimeDatabase: Fix handling of duplicate mimetype definitions (2/2). 2013-08-03 14:44:12 +02:00
plugin tests: Make the QT assignments more explicit 2013-08-21 19:05:52 +02:00
statemachine Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
thread QThreadPool: Fix regression from Qt 4 in dealing with priority starts 2013-05-20 12:06:48 +02:00
tools Fix QPointF::division autotest 2013-08-19 14:24:28 +02:00
xml Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00