diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-19 12:47:56 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-19 15:09:00 +0200 |
commit | 3d4298697b41231690f93590e99f599b964f6a0d (patch) | |
tree | 1f1352e4fe704d8de544d795ef16e923afc06d8c /Zend/zend_alloc.c | |
parent | 11f30d67ea058554cb6d16fb67c7708070f78d47 (diff) | |
download | php-git-3d4298697b41231690f93590e99f599b964f6a0d.tar.gz |
Fix shift UB in constants
We were shifting out the top bit of a signed integer.
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r-- | Zend/zend_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 9c081477d0..93660e1cdc 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -591,7 +591,7 @@ static zend_always_inline void zend_mm_bitset_reset_range(zend_mm_bitset *bitset if (pos != end) { /* reset bits from "bit" to ZEND_MM_BITSET_LEN-1 */ - tmp = ~((Z_L(1) << bit) - 1); + tmp = ~((Z_UL(1) << bit) - 1); bitset[pos++] &= ~tmp; while (pos != end) { /* set all bits */ |