summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-06 10:36:41 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-13 05:42:35 +0000
commit61169b72c24b336af23702fda1e86d1d1c2c8095 (patch)
tree182bdc242bcc3dd85767190250dc8d4d3f11c171 /lib
parent13189360e50a429ee43ce927c29ebcd3948619b7 (diff)
Fix UB in QIODevicePrivate
Passing nullptr as the second argument of memcpy/memmove constitutes undefined behavior, even if the length argument is zero at the same time. Fix by protecting mem{cpy,move,chr} from nullptrs. Found by UBSan: qtbase/src/corelib/io/qiodevice_p.h:105:33: runtime error: null pointer passed as argument 2, which is declared to never be null qtbase/src/corelib/io/qiodevice_p.h:175:53: runtime error: null pointer passed as argument 2, which is declared to never be null Change-Id: I979158b0a74169ca4eb459928398ebc40f77dfb5 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions