summaryrefslogtreecommitdiffstats
path: root/mkspecs/macx-g++40
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-19 01:26:56 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-01-19 10:43:45 +0100
commitb69c2e86de99cb2ac9bcd2e33ae77c960cfbc57a (patch)
tree7f7a3381b66607a8a95817f093ea516a1ab652fc /mkspecs/macx-g++40
parent62a96dbb53d77d6cd7320c6fc8d33ee9c4add0fe (diff)
QFreeList: fix undefined behavior
Signed integer overflow is undefined behavior ([expr]/4), but unsigned arithmetic doesn't overflow, so isn't ([basic.fundamental]/4, footnote there). So, use unsigned arithmetic for the loop-around serial number generation in incrementserial(). While we're at it, also use it for the masking operation in the same function. Found by UBSan. Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'mkspecs/macx-g++40')
0 files changed, 0 insertions, 0 deletions