Bug #62477 [Asn->ReO]: Problem LimitIterator , argument Offset only Integers

From: Date: Tue, 02 Aug 2016 02:24:06 +0000
Subject: Bug #62477 [Asn->ReO]: Problem LimitIterator , argument Offset only Integers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202812@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62477&edit=1 ID: 62477 Updated by: requinix@php.net Reported by: tuadmin at gmail dot com Summary: Problem LimitIterator , argument Offset only Integers -Status: Assigned +Status: Re-Opened Type: Bug Package: SPL related -Operating System: windows 7 +Operating System: Any x86 -PHP Version: 5.4.9 +PHP Version: 5.6.24 Assigned To: ab Block user comment: N Private report: N New Comment: 32-bit PHP 5.6 on Windows has the same problem as originally reported, however I don't think that's a bug: as implied in the first comment, LimitIterator accepts "int" so the 10e9 float will overflow (twice) to 1410065408. Changing to use floats/doubles could be a request but it doesn't sound like a good one. Testing with 3v4l did show something odd: 64-bit 5.6 has a problem applying the $count=3 condition. <https://3v4l.org/mCQBW#v560> PHP 7 has current.pos, limit.offset, and limit.count as all zend_longs but 5.6.24 still has them as int,long,long respectively. Promoting current.pos to long should fix it but that commit (b383ddf) was reverted (ad7eeba)? https://github.com/php/php-src/commit/b383ddf1e5175abf1d000e887961fdcebae646a0 https://github.com/php/php-src/commit/ad7eeba3c1a4c77f439afc936fbf50b811a46a6b Previous Comments: ------------------------------------------------------------------------ [2016-08-02 01:09:10] tuadmin at gmail dot com bug not resolved ------------------------------------------------------------------------ [2016-08-02 01:06:21] tuadmin at gmail dot com Not Fixed ------------------------------------------------------------------------ [2014-10-07 23:34:50] stas@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=b383ddf1e5175abf1d000e887961fdcebae646a0 Log: Fixed bug #62477 LimitIterator int overflow ------------------------------------------------------------------------ [2014-10-07 23:23:56] stas@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=b383ddf1e5175abf1d000e887961fdcebae646a0 Log: Fixed bug #62477 LimitIterator int overflow ------------------------------------------------------------------------ [2012-07-12 10:48:23] ab@php.net the fix was reverted ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62477 -- Edit this bug report at https://bugs.php.net/bug.php?id=62477&edit=1

« previous php.bugs (#202812) next »