From 936b7e8e82463213d953133ecec7da81fe0ee73a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 16 Jan 2004 02:31:26 +0000 Subject: [PATCH] MFH: Fixed Bug #26927 (preg_quote() does not escape \0). --- NEWS | 1 + ext/pcre/php_pcre.c | 5 +++++ 2 files changed, 6 insertions(+) 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++ = '\\'; -- 2.40.0