Bug #81095 [NEW]: Segmentation fault in preg_match

From: Date: Tue, 01 Jun 2021 15:56:04 +0000
Subject: Bug #81095 [NEW]: Segmentation fault in preg_match
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234148@lists.php.net to get a copy of this message
From: vaclav dot vatoz dot cerny at gmail dot com Operating system: Debian 10 PHP version: Irrelevant Package: PCRE related Bug Type: Bug Bug description:Segmentation fault in preg_match 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 -- Edit bug report at https://bugs.php.net/bug.php?id=81095&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81095&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81095&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81095&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81095&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81095&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81095&r=support Expected behavior: https://bugs.php.net/fix.php?id=81095&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81095&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81095&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81095&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81095&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81095&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81095&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81095&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81095&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81095&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81095&r=mysqlcfg

« previous php.bugs (#234148) next »