diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-24 10:37:22 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-30 00:10:40 +0200 |
commit | 0c07f0cab8da55a9889186749f7419a790595a7b (patch) | |
tree | 2d16590bcf7c883fc4150da4662525870d524352 /src/corelib/text/qbytearray.cpp | |
parent | e4fece60aaef43e8a8139c16b276f76e22d3cc9d (diff) |
Fix ubsan errors
Nullptr memcpy, memmove and 36 bit shift of integer.
Change-Id: Ib79c8a98a710d021fc93b6aaec6c0ba9bde5f91e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qbytearray.cpp')
-rw-r--r-- | src/corelib/text/qbytearray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index b075aaba91..1ecb19f135 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -2285,7 +2285,7 @@ QByteArray QByteArray::repeated(qsizetype times) const #define REHASH(a) \ if (ol_minus_1 < sizeof(std::size_t) * CHAR_BIT) \ - hashHaystack -= (a) << ol_minus_1; \ + hashHaystack -= std::size_t(a) << ol_minus_1; \ hashHaystack <<= 1 static inline qsizetype findCharHelper(QByteArrayView haystack, qsizetype from, char needle) noexcept |