ID:               26219
 Updated by:       [EMAIL PROTECTED]
 Reported By:      peter at normann dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Regexps related
 Operating System: Linux kernel 2.5.74
 PHP Version:      4.3.4
 New Comment:

Please provide sample of source text on which the regex operates.


Previous Comments:
------------------------------------------------------------------------

[2003-11-12 09:46:00] peter at normann dot com

Description:
------------
php crashes when using the preg_match function. Code included below.
Works in php4.3.3RC1 but any later version causes segmentation fault.

The code is part of a text filter.

$output contains text with plain text and html mixed. The idea is
anything between [html] and [/html] will go untouched by the filter.

I use dozens of other regular expressions, but preg_match is a sure
killer. I can easily reproduce this behavior.



Reproduce code:
---------------
while (preg_match('/\[html]((.|\s)+?)\[\/html]/', $output, $htmlshow))
$output = str_replace($htmlshow[0], str_replace('<br />', '',
strtr($htmlshow[1],
array_flip(get_html_translation_table(HTML_ENTITIES)))), $output);

Actual result:
--------------
child pid xxxxx exit signal Segmentation fault (11)




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26219&edit=1

Reply via email to