[PHP-BUG] Bug #75936 [NEW]: Strpos offset of type long and haystack len of type int
[email protected] ("sed dot baddou at gmail dot com") Thu, 8 Feb 2018 17:12:10 GMT
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
From: sed dot baddou at gmail dot com Operating system: Linux PHP version: Irrelevant Package: PHP Language Specification Bug Type: Bug Bug description:Strpos offset of type long and haystack len of type int 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 bug report at https://bugs.php.net/bug.php?id=75936&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75936&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75936&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75936&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75936&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75936&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75936&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75936&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75936&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75936&r=support Expected behavior: https://bugs.php.net/fix.php?id=75936&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75936&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75936&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75936&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75936&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75936&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75936&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75936&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75936&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75936&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75936&r=mysqlcfg