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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC