php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81095 Segmentation fault in preg_match
Submitted: 2021-06-01 15:56 UTC Modified: 2021-06-14 11:10 UTC
From: vaclav dot vatoz dot cerny at gmail dot com Assigned:
Status: Closed Package: PCRE related
PHP Version: Irrelevant OS: Debian 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vaclav dot vatoz dot cerny at gmail dot com
New email:
PHP Version: OS:

 

 [2021-06-01 15:56 UTC] vaclav dot vatoz dot cerny at gmail dot com
Description:
------------
preg_match on sample data fails with Segmentation fault


Tested under   7.3.19 (debian)  7.4.18  and 8.0.5 (packages.sury.org)
Test data accesible from from https://www.dropbox.com/s/z99kyrbtp10bvrw/exif.txt?dl=0

Test script:
---------------
<?php 
//download test  data from https://www.dropbox.com/s/z99kyrbtp10bvrw/exif.txt?dl=0
//and then run

$a=unserialize(file_get_contents("exif.txt"));
$b=$a["EXIF"]["IFD0"]["ImageResourceInformation"];
$c=preg_match("!^\X+$!", $b);
echo "OK";


Expected result:
----------------
Running code, or error in error log


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-01 19:09 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2021-06-01 19:09 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2021-06-13 04:22 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.
 [2021-06-14 11:10 UTC] vaclav dot vatoz dot cerny at gmail dot com
-Status: No Feedback +Status: Closed
 [2021-06-14 11:10 UTC] vaclav dot vatoz dot cerny at gmail dot com
After update i have tested it in 7.4.20  8.07 7.3.28 and it works )didnt segfault. 
So it might have been corrected in source tree.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Aug 05 02:01:23 2021 UTC