diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-06 10:36:41 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-13 05:42:35 +0000 |
commit | 61169b72c24b336af23702fda1e86d1d1c2c8095 (patch) | |
tree | 182bdc242bcc3dd85767190250dc8d4d3f11c171 /src/3rdparty/angle | |
parent | 13189360e50a429ee43ce927c29ebcd3948619b7 (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 'src/3rdparty/angle')
0 files changed, 0 insertions, 0 deletions