Bug #69741 [Opn->Fbk]: preg_replace memory fail

From: Date: Mon, 01 Jun 2015 19:52:37 +0000
Subject: Bug #69741 [Opn->Fbk]: preg_replace memory fail
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193058@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69741&edit=1 ID: 69741 Updated by: requinix@php.net Reported by: informatica at ortopediaplus dot com Summary: preg_replace memory fail -Status: Open +Status: Feedback Type: Bug -Package: *Regular Expressions +Package: PCRE related Operating System: Linux 2.6.32-504.8.1.el6.x86_64 PHP Version: 5.6.9 Block user comment: N Private report: N New Comment: What are your pcre.* INI settings? And are you absolutely sure the string does contain "<!--TAG_END-->"? Previous Comments: ------------------------------------------------------------------------ [2015-06-01 16:18:39] informatica at ortopediaplus dot com Description: ------------ Segmentation fault use preg_replace Test script: --------------- $pattern = "/<!--TAG_INI-->(.|\n)*?<!--TAG_END-->/"; There are 100000 characters between <!--TAG_INI--> and <!--TAG_END--> in $content $content = preg_replace($pattern, 'foo', $content); SEGMENTATION FAULT!!! Expected result: ---------------- Replace all text between <!--TAG_INI--> and <!--TAG_END--> to 'foo' Actual result: -------------- SEGMENTATION FAULT. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69741&edit=1

« previous php.bugs (#193058) next »