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
 [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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC