qt5base-lts/tests/auto/corelib
Marc Mutz a54d44298f QLatin1String: Fix UB (nullptr passed) in relational operators
Found by UBSan:

  qstring.h:1160:44: runtime error: null pointer passed as argument 1, which is declared to never be null
  qstring.h:1160:44: runtime error: null pointer passed as argument 2, which is declared to never be null

Fix by avoiding the memcmp() calls if there's a chance that they
might be called with nullptr.

While at it, also implement !=, >, <=, >= in terms of ==, <,
and add a test, because this particular UB was not fingered by
any of the QtCore test cases, but by a Qt3D one.

Change-Id: I413792dcc8431ef14f0c79f26e89a3e9fab69465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-09-15 10:10:28 +00:00
..
animation Extend tst_QPauseAnimation::pauseAndPropertyAnimations blacklist 2015-06-20 15:25:58 +00:00
codecs Fix utf8->utf16 BOM/ZWNBSP decoding. 2015-12-21 09:56:49 +00:00
global Fix qSetMessagePattern to have many time/backtrace parts 2016-03-25 11:03:43 +00:00
io Doc: Change instances of '(Mac) OS X' to 'macOS' 2016-08-12 08:30:29 +00:00
itemmodels tst_QStringListModel: don't leak memory when tests fail 2016-08-12 08:28:07 +00:00
json Update testdata 2016-02-17 04:50:50 +00:00
kernel Fixed Bug in QVariant comparison when containing QStringLists 2016-08-03 11:16:35 +00:00
mimetypes QMimeType: use default locale rather than system locale 2016-08-24 20:30:13 +00:00
plugin Fix qplugin autotest on Windows 2016-06-08 19:40:29 +00:00
statemachine Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
thread tst_QAtomicInteger: fix UBs (signed overflow) 2016-03-24 16:16:15 +00:00
tools QLatin1String: Fix UB (nullptr passed) in relational operators 2016-09-15 10:10:28 +00:00
xml QtCore: Fix QXmlStreamReader for invalid characters in XML 1.0 2016-07-17 14:54:36 +00:00
corelib.pro