php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74873 Minor BC break: PCRE_JIT changes output of preg_match()
Submitted: 2017-07-07 06:44 UTC Modified: -
From: dmitry@php.net Assigned:
Status: Closed Package: PCRE related
PHP Version: 7.2.0alpha3 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 + 8 = ?
Subscribe to this entry?

 
 [2017-07-07 06:44 UTC] dmitry@php.net
Description:
------------
Large offsets cause preg_match() to return 0 instead of false

Test script:
---------------
<?php
var_dump(preg_match('/\S+/', 'foo bar', $matches, 0, 99999));


Expected result:
----------------
bool(false)

Actual result:
--------------
int(0)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-07 06:54 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=29653da385f89dcf00ebbb6823a395e1484d4dc3
Log: Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()).
 [2017-07-07 06:54 UTC] dmitry@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 15:01:28 2024 UTC