Bug #68672 [Opn]: incorrect bit shift
| From: | bugreports at internot dot info | Date: | Sun, 28 Dec 2014 23:01:47 +0000 |
| Subject: | Bug #68672 [Opn]: incorrect bit shift | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189274@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68672&edit=1
ID: 68672
User updated by: bugreports at internot dot info
Reported by: bugreports at internot dot info
Summary: incorrect bit shift
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2014-12-28 (Git)
Block user comment: N
Private report: N
New Comment:
Aswell as:
958 context->count[1] += ((php_hash_uint64) inputLen >> 61);
Previous Comments:
------------------------------------------------------------------------
[2014-12-28 23:01:08] bugreports at internot dot info
And
/ext/hash/hash_sha.c:
844 context->count[1] += ((php_hash_uint64) inputLen >> 61);
Thanks,
------------------------------------------------------------------------
[2014-12-28 22:56:42] bugreports at internot dot info
Description:
------------
Hi,
In /Zend/zend_strtod.c:
1137 z >>= k;
But k may be 32.
Bitshifting >=32 causes "undefined behavior".
Thanks,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68672&edit=1