diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-06 13:31:11 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-12 06:11:53 +0000 |
commit | 13189360e50a429ee43ce927c29ebcd3948619b7 (patch) | |
tree | a108ca76c2ff9dab68f881124a3cb96c00ff335b /src/corelib/io/qfilesystemwatcher.cpp | |
parent | b4ab4868bc8422e09590d13d35c2bba7a195ccf5 (diff) |
Fix UB in QFileDevice::writeData()
Passing nullptr as the 2nd argument of memcpy
constitutes undefined behavior.
Fix by protecting the block with 'if (len)',
which, presumably, is the only valid case
where 'data' may be nullptr.
Change-Id: I7647d7e0808b1f26444ea3cf8bbf5cda9ddc9e6c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher.cpp')
0 files changed, 0 insertions, 0 deletions