summaryrefslogtreecommitdiffstats
path: root/LICENSE.GPLv3
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-06 12:58:56 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-11 22:39:43 +0000
commitb4ab4868bc8422e09590d13d35c2bba7a195ccf5 (patch)
treec5239e6e67d048c35a077356f5479c3d5dae456a /LICENSE.GPLv3
parent71ea41f999c1dbe83cba2491f5ac99d6c5a3d98c (diff)
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>
Diffstat (limited to 'LICENSE.GPLv3')
0 files changed, 0 insertions, 0 deletions