Bug #75936 [Opn->Fbk]: Strpos offset of type long and haystack len of type int
| From: | ab@php.net | Date: | Fri, 09 Feb 2018 13:40:52 +0000 |
| Subject: | Bug #75936 [Opn->Fbk]: Strpos offset of type long and haystack len of type int | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213895@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75936&edit=1
ID: 75936
Updated by: ab@php.net
Reported by: sed dot baddou at gmail dot com
Summary: Strpos offset of type long and haystack len of type
int
-Status: Open
+Status: Feedback
Type: Bug
Package: Strings related
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2018-02-08 17:12:08] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75936&edit=1