com php-src: Suppress overflow UB in zend_strtod: Zend/ze nd_strtod.c

From: Date: Wed, 19 Jun 2019 13:57:57 +0000
Subject: com php-src: Suppress overflow UB in zend_strtod: Zend/ze nd_strtod.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106911@lists.php.net to get a copy of this message
Commit: b8cba88904a509abd2c141ebcdb952cfd9471063 Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 19 Jun 2019 15:57:57 +0200 Parents: 555d68be1067d1757168ec8bbea032c68a13f0ec Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b8cba88904a509abd2c141ebcdb952cfd9471063 Log: Suppress overflow UB in zend_strtod Changed paths: M Zend/zend_strtod.c Diff: diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 96d3ec8..08f8424 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -2705,7 +2705,7 @@ zend_strtod L = c - '0'; s1 = s; while((c = *++s) >= '0' && c <= '9') - L = 10*L + (c - '0'); + L = (Long) (10*(ULong)L + (c - '0')); if (s - s1 > 8 || L > 19999) /* Avoid confusion from exponents * so large that e might overflow.

« previous php.cvs (#106911) next »