#47811 [NEW]: preg_match that can cause segmentation fault

[email protected] ("travis at wikihow dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
From:             travis at wikihow dot com
Operating system: CentOS release 4.4 & Mac OS 10.4
PHP version:      5.2.9
PHP Bug Type:     Reproducible crash
Bug description:  preg_match that can cause segmentation fault

Description:
------------
Run a preg_match with source text attached and get a seg fault. Apache 2.2
/ PHP 5.2.9 and PHP 5.2.4. 

preg_match('@<object(.|\n)*</object>@im', $text, $matches);




Reproduce code:
---------------
http://wikidiy.com/php_bug_crash.txt

Expected result:
----------------
Apache not supposed to crash, completes preg_match, dumps $matches array.

Actual result:
--------------
Apache seg faults

[Fri Mar 27 12:16:05 2009] [notice] child pid 6391 exit signal
Segmentation fault (11)

-- 
Edit bug report at http://bugs.php.net/?id=47811&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47811&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47811&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47811&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47811&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47811&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47811&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47811&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47811&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47811&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47811&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47811&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47811&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47811&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47811&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47811&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47811&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47811&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47811&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47811&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47811&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47811&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.