#38512 [Opn->Csd]: PCRE 6.6 crashing PHP with specific calls to preg_match()

From: Date: Tue, 22 Aug 2006 08:14:18 +0000
Subject: #38512 [Opn->Csd]: PCRE 6.6 crashing PHP with specific calls to preg_match()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101095@lists.php.net to get a copy of this message
ID: 38512 Updated by: tony2001@php.net Reported By: peter dot mescalchin at gmail dot com -Status: Open +Status: Closed Bug Type: PCRE related Operating System: Windows XP PHP Version: 5.1.5 Previous Comments: ------------------------------------------------------------------------ [2006-08-22 08:11:19] peter dot mescalchin at gmail dot com The 5.2 build fixes the issue. This bug can be closed I guess. Thanks. ------------------------------------------------------------------------ [2006-08-21 08:29:22] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip ------------------------------------------------------------------------ [2006-08-19 13:51:38] peter dot mescalchin at gmail dot com Description: ------------ Passing large strings to PCRE functions in PHP versions 5.1.3 or greater and Apache 2.0.59 with the regexp "/(\r|\n|.)*/" crashes PHP/Apache request. Referring to the source code, a string length greater than 376 character crashes the request. Rolling back to PHP 5.1.2, using PCRE 6.2 works correctly without crashing for string lengths greater than 376 characters. The bug is very similar to the following PHP bug report: http://bugs.php.net/bug.php?id=24460 Reproduce code: --------------- <?PHP $test = str_repeat('a',377); // preg_match() will crash the request preg_match('/(\r|\n|.)*/',$test); ?> Expected result: ---------------- The script to end gracefully. Actual result: -------------- Crashing of the PHP request. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38512&edit=1

« previous php.bugs (#101095) next »