php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68852 broken strrpos with negative offset
Submitted: 2015-01-18 13:43 UTC Modified: -
From: j dot tvr at centrum dot cz Assigned:
Status: Closed Package: Strings related
PHP Version: master-Git-2015-01-18 (snap) OS:
Private report: No CVE-ID: None
 [2015-01-18 13:43 UTC] j dot tvr at centrum dot cz
Description:
------------
This broke down very recently (probably due to https://github.com/php/php-src/commit/2f1ddff2a5f8d877537218c19137a4e8a022120a).

Test script:
---------------
var_dump(strrpos("/documents/show/5474", '/', -20));

Expected result:
----------------
int(0)

Actual result:
--------------
int(15)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-18 15:19 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f3052c5d2f86f9dac756b7c9519017b22b99ed3e
Log: Fixed bug #68852 (broken strrpos with negative offset)
 [2015-01-18 15:19 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:39 UTC] davey@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f3052c5d2f86f9dac756b7c9519017b22b99ed3e
Log: Fixed bug #68852 (broken strrpos with negative offset)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 12:01:28 2024 UTC