qt5base-lts/tests/auto/corelib/io
Marc Mutz 033205bb59 Fix UB in tst_QIODevice::getSetCheck()
The reinterpret cast from a QTcpSocket → QAbstractSocket → QIODevice
to MyIODevice → QIODevice was undefined.

Fix by simply instantiating a MyIODevice, which must then inherit
from QTcpSocket, of course.

Instead of fixing the class name in the overridden setOpenMode()
method, simply make the base class' implementation public with
a using declaration.

Found by UBSan:
  qtbase/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp:84:22: runtime error: member call on address 0x7ffcca2d23f0 which does not point to an object of type 'MyIODevice'
  0x7ffcca2d23f0: note: object is of type 'QTcpSocket'

Change-Id: I939b3548949b9b5765df4a6cc81875e169fd69dd
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-01-06 17:25:05 +00:00
..
largefile fix usage of wince scope 2015-06-05 10:29:10 +00:00
qabstractfileengine Update copyright headers 2015-02-11 06:49:51 +00:00
qbuffer Make warnings of QIODevice more verbose. 2015-05-23 08:59:20 +00:00
qdatastream Replace MAC OS X with OS X 2015-06-30 07:33:31 +00:00
qdataurl Update copyright headers 2015-02-11 06:49:51 +00:00
qdebug Change how QDebug escapes QStrings in the output 2015-08-06 04:53:38 +00:00
qdir QDir::removeRecursively(): Retry file deletion with write permission set. 2015-07-17 11:06:28 +00:00
qdiriterator Update copyright headers 2015-02-11 06:49:51 +00:00
qfile Replace MAC OS X with OS X 2015-06-30 07:33:31 +00:00
qfileinfo Seed the random number generator before using QTemporaryDir 2015-08-06 04:53:21 +00:00
qfileselector Update copyright headers 2015-02-11 06:49:51 +00:00
qfilesystementry Update copyright headers 2015-02-11 06:49:51 +00:00
qfilesystemwatcher Fix return value of QWindowsFileSystemWatcherEngine::removePaths(). 2015-06-09 09:50:35 +00:00
qiodevice Fix UB in tst_QIODevice::getSetCheck() 2016-01-06 17:25:05 +00:00
qipaddress Update strtoll and strtoull from upstream FreeBSD 2015-03-26 06:11:14 +00:00
qlockfile take process name into account for QLockFile's pid clash resolution 2015-05-26 11:01:14 +00:00
qloggingcategory QLoggingCategory: fix default severity in Q_LOGGING_CATEGORY macro 2015-08-03 14:40:19 +00:00
qloggingregistry Update copyright headers 2015-02-11 06:49:51 +00:00
qnodebug QDateTime: drop quotes in QDebug output 2015-02-21 16:58:39 +00:00
qprocess tst_qprocess cleanup 2015-08-17 08:25:24 +00:00
qprocess-noapplication Update copyright headers 2015-02-11 06:49:51 +00:00
qprocessenvironment Update copyright headers 2015-02-11 06:49:51 +00:00
qresourceengine fix distclean targets 2015-04-23 19:16:57 +00:00
qsavefile QSaveFile: Fix permissions on creation 2015-04-08 07:48:17 +00:00
qsettings Replace MAC OS X with OS X 2015-06-30 07:33:31 +00:00
qstandardpaths Update copyright headers 2015-02-11 06:49:51 +00:00
qstorageinfo Fix sizes QStorageInfo returns for invalid drives 2015-06-11 16:13:49 +00:00
qtemporarydir QDir::removeRecursively(): Retry file deletion with write permission set. 2015-07-17 11:06:28 +00:00
qtemporaryfile Set the state of QTemporaryFileEngine properly prior to reopening 2015-07-15 04:53:30 +00:00
qtextstream Rename QTextStream::readLine(QString *, qint64) into readLineInto 2015-06-03 04:27:22 +00:00
qurl tst_QUrl: Add extra testcases 2015-03-14 01:15:05 +00:00
qurlinternal Update copyright headers 2015-02-11 06:49:51 +00:00
qurlquery Update copyright headers 2015-02-11 06:49:51 +00:00
qwinoverlappedionotifier Update copyright headers 2015-02-11 06:49:51 +00:00
io.pro Add the QStorageInfo class 2014-08-13 16:09:58 +02:00