summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-18 13:43:37 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-01-19 10:41:22 +0100
commit390ea21873cf229447c2dcaea85a40e472fab03c (patch)
tree6e08077694cadbc4d4d4083278d6a459fc72fc56 /config.tests
parentb18e6396bde2931a302b8fa5910268e23590c8a8 (diff)
QByteArrayMatcher: fix undefined shift
The REHASH macro is used in qFindByteArray() with a char argument. Applying the shift operator promotes (a) to int. The check in REHASH, however, checks for the shift being permissible for _unsigned_ ints. Since hashHaystack is a uint, too, rectify by casting (a) to uint prior to shifting. Found by UBSan: src/corelib/tools/qbytearraymatcher.cpp:314:72: runtime error: left shift of 34 by 30 places cannot be represented in type 'int' Change-Id: Id09c037d570ca70b49f87ad22bed31bbb7dcc7fb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'config.tests')
0 files changed, 0 insertions, 0 deletions