Go to file
Marc Mutz b4ab4868bc Fix UB in QFSFileEnginePrivate::writeFdFh()
Apparently, it is considered valid to call the function with
'data' set to nullptr, and 'len' to zero. But doing so
invokes undefined behavior because nullptr is passed to
fwrite().

Fix by protecting the loops with 'if (len)'.

Found by UBSan:
  qtbase/src/corelib/io/qfsfileengine.cpp:732:84: runtime error: null pointer passed as argument 1, which is declared to never be null

Change-Id: Idfe23875c868ebb21d2164550de3304d2f01e9df
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-11 22:39:43 +00:00
bin fixqt4headers.pl: Improve detection of Qt 5 location. 2015-04-22 10:23:41 +00:00
config.tests Remove "FOO module" from config.tests/common 2015-12-04 05:20:29 +00:00
dist Update the Qt 5.5.1 changelog for qtbase 2015-09-23 06:49:28 +00:00
doc Add shader files to examples documentation file list 2015-09-22 21:40:13 +00:00
examples Use unique shortcuts for the different actions 2015-12-11 09:40:55 +00:00
lib
mkspecs qt_functions.prf: Add missing $$eval 2016-01-05 19:09:12 +00:00
qmake Add support for -Zc:throwingNew option to vcxproj generation for 2015 2015-10-23 13:03:12 +00:00
src Fix UB in QFSFileEnginePrivate::writeFdFh() 2016-01-11 22:39:43 +00:00
tests Fix UB in tst_QObject::disconnectDoesNotLeakFunctor() 2016-01-09 15:18:50 +00:00
tools Auto-detect whether 64-bit std::atomic really works 2015-12-04 05:20:26 +00:00
util Fix typo when resolving EGL extension. 2015-04-23 11:54:36 +00:00
.gitattributes
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag
configure fix quoting in makeabs() 2016-01-08 12:40:14 +00:00
configure.bat Use jom instead of nmake to compile configure.exe 2015-07-21 22:50:30 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL
LICENSE.GPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro Avoid qtbase/bin/bin artifact when running make install 2015-06-03 04:27:49 +00:00
sync.profile ANGLE: upgrade to 2.1~07d49ef5350a 2014-08-05 16:43:22 +02:00