qt5base-lts/src
Thiago Macieira 07fffa6010 QDateTime: Fix clearing the ShortData flag in setMSecsSinceEpoch
Unlike setTimeSpec, this forgot to clear the bit when detaching. So it's
possible that some further use of the flags could incorrectly conclude
that the data was short and then proceed to corrupt the pointer.

The example from QTBUG-59061 caused this because toUTC() -> toTimeSpec()
calls setMSecsSinceEpoch which left the bit set; then addDays() calls
setDateTime(), which calls checkValidDateTime() and that corrupted the
pointer. This problem was more visible on 32-bit systems because no
QDateTime was short (except for default constructed ones), but it
can happen on 64-bit with sufficiently large dates.

Task-number: QTBUG-59061
Change-Id: Ibc5c715fda334a75bd2efffd14a562a375a4e69b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-24 16:17:03 +00:00
..
3rdparty Fix libs build with msvc on Chinese locale on Windows 2017-02-01 08:35:42 +00:00
android Android: Fix always hidden software keyboard from popping up 2017-02-23 08:16:23 +00:00
angle Fix unneeded recompiles of glslang_tab.cpp 2017-01-16 15:20:27 +00:00
concurrent Adapt to the C++ SIC introduced by P0012: noexcept overloading 2017-02-17 13:57:30 +00:00
corelib QDateTime: Fix clearing the ShortData flag in setMSecsSinceEpoch 2017-02-24 16:17:03 +00:00
dbus Unbreak ubsan developer-build 2017-02-07 08:32:53 +00:00
gui QTextFormatCollection: replace copy ctor and op= with clear() 2017-02-23 18:11:55 +00:00
network Fix multicastMembershipHelper to not assume addresses are IPv4 2017-02-22 16:58:46 +00:00
opengl Add missing override into Qt modules 2016-12-01 12:07:13 +00:00
openglextensions Also release winmain, qopenglextensions under commercial licenses 2016-11-18 16:19:56 +00:00
platformheaders Doc: corrected qdoc syntax parameter description 2017-01-09 15:30:17 +00:00
platformsupport Add the new NVIDIA specific calls to qeglstreamconvenience 2017-02-13 09:17:39 +00:00
plugins Android: Fix OpenGL shader compilation on updated emulator 2017-02-23 07:56:14 +00:00
printsupport Fix printsupport dependencies 2017-01-26 13:51:54 +00:00
sql make more use of 'use' in library detection 2017-02-22 07:47:13 +00:00
testlib Use Qt::PreciseTimer for the QDeadlineTimers in QTest::qWait* 2017-02-15 19:04:21 +00:00
tools Add Q_ASSERT before dereference pointer 2017-02-14 15:06:18 +00:00
widgets QDockWidget: Fix memory leak when dragging a tab outside of a floating tab window 2017-02-24 15:00:03 +00:00
winmain QtCore & winmain: Remove dead code 2017-01-31 19:09:31 +00:00
xml QXmlAttributes: mark as shared-come-qt6 2016-10-04 06:25:54 +00:00
src.pro Add a feature for Qt Xml 2017-01-06 17:19:13 +00:00