qt5base-lts/tests/auto
Edward Welbourne c066656aff Avoid read-outside-array error by QStringRef over-reach
Constructing a QStringRef directly from the string, offset and a
length is UB if the offset + length exceeds the string's length.
Thanks to Robert Loehning and libFuzzer for finding this.
QString::midRef (as correctly used in both changed uses of QStringRef,
since 432d3b6962) takes care of that for us.  Changed one UB case and
a matching but correct case, for consistency.

In the process, deduplicate a QStringList look-up.
Added tests to exercise the code (but the one that exercises the
formerly UB case doesn't crash before the fix, so isn't very useful;
the invalid read is only outside the array it's scanning, not outside
allocated memory).

Change-Id: I7051bbbc0267dd7ec0a8f75eee2034d0b7eb75a2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-08 13:56:25 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake Export modules' enabled/disabled features to cmake 2018-09-28 13:10:28 +00:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Avoid read-outside-array error by QStringRef over-reach 2019-02-08 13:56:25 +00:00
dbus Fix wrong relative path to qdbus_symbols.cpp 2018-07-24 04:24:31 +00:00
gui Fix QColor::toCmyk() for rgb(0, 0, 0) 2019-02-05 22:47:33 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake
network tst_qsslsocket - blacklist several test temporarily 2019-01-24 20:38:14 +00:00
opengl qWaitFor: Prevent being stuck in QCoreApplication::processEvents 2019-01-09 18:10:54 +00:00
other Painter path stroking: fix capping of beziers ending in tight turns 2019-02-05 22:47:16 +00:00
printsupport tst_QPrinter: stabilize qprinter test 2019-01-20 13:39:54 +00:00
shared Read font selection flags and use them when querying for metrics 2018-11-30 16:15:03 +00:00
sql Replace executedQuery when executing a new query 2019-01-30 23:08:04 +00:00
testlib Add testlib selftests for double and for non-finite float and double 2019-02-06 10:11:22 +00:00
tools qmake: add $$read_registry() function 2019-01-05 20:33:07 +00:00
widgets Improve keyboard navigation in QListView when isWrapping is enabled 2019-02-06 09:50:58 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
testserver.pri Postpone testing docker images and files until running 'make check' 2018-08-30 04:06:51 +00:00