php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75936 Strpos offset of type long and haystack len of type int
Submitted: 2018-02-08 17:12 UTC Modified: 2018-06-24 04:25 UTC
From: sed dot baddou at gmail dot com Assigned:
Status: No Feedback Package: Strings related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sed dot baddou at gmail dot com
New email:
PHP Version: OS:

 

 [2018-02-08 17:12 UTC] sed dot baddou at gmail dot com
Description:
------------
While I was reading strpos source code, I stumbeled across multiple versions where haystack_len is declared as int, while offset is long, correct me if i'm wrong but if haystack len exceeds intmax value wont it underflow and give incorrect values.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-08 17:54 UTC] stas@php.net
-Package: PHP Language Specification +Package: Strings related
 [2018-02-09 13:40 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2018-02-09 13:40 UTC] ab@php.net
Thanks for the report. Please link to the places you've found. Note - it is a won't fix in PHP 5, need to check thoroughly in PHP 7.

Thanks.
 [2018-06-24 04:25 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 22:03:34 2022 UTC