From: Ilia Alshanetsky Date: Fri, 16 Jan 2004 02:31:26 +0000 (+0000) Subject: MFH: Fixed Bug #26927 (preg_quote() does not escape \0). X-Git-Tag: php-4.3.5RC2~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=936b7e8e82463213d953133ecec7da81fe0ee73a;p=php MFH: Fixed Bug #26927 (preg_quote() does not escape \0). --- diff --git a/NEWS b/NEWS index d3abf874cb..b3b56bfd7b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jan 2004, Version 4.3.5 +- Fixed Bug #26927 (preg_quote() does not escape \0). (Ilia) - Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is used). (Ilia) - Fixed bug #26878 (problem with multiple references to the same variable diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 2cd9f5585c..f72beee583 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1391,6 +1391,11 @@ PHP_FUNCTION(preg_quote) *q++ = c; break; + case '\0': + *q++ = '\\'; + *q++ = '0'; + break; + default: if (quote_delim && c == delim_char) *q++ = '\\';