|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-12 11:00 UTC] iliaa@php.net
[2003-11-12 11:24 UTC] peter at normann dot com
[2003-11-12 13:00 UTC] iliaa@php.net
[2003-12-22 01:04 UTC] andrei@php.net
[2003-12-22 03:46 UTC] peter at normann dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 15:00:01 2025 UTC |
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)