From 3d37f027cdbd2f38c13dc26d324aeb163c8f551c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 Jan 2020 10:23:36 +0100 Subject: rebuild with 1 more fix --- php-bug79099.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'php-bug79099.patch') diff --git a/php-bug79099.patch b/php-bug79099.patch index c0b5e72..3de1998 100644 --- a/php-bug79099.patch +++ b/php-bug79099.patch @@ -79,3 +79,35 @@ index 0000000000..7c842f4654 +string(0) "" +string(0) "" +string(0) "" +From 740b58637d71aade0a748117b7fbe9a21a1fab70 Mon Sep 17 00:00:00 2001 +From: Stanislav Malyshev +Date: Wed, 22 Jan 2020 22:36:53 -0800 +Subject: [PATCH] More checks for php_strip_tags_ex + +(cherry picked from commit 2dc170e25d86a725fefd4c08f2bd8378820b28f5) +--- + ext/standard/string.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/standard/string.c b/ext/standard/string.c +index c4b5e031ed..7c044af0fd 100644 +--- a/ext/standard/string.c ++++ b/ext/standard/string.c +@@ -4707,7 +4707,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const cha + switch (state) { + case 1: /* HTML/XML */ + lc = '>'; +- if (is_xml && *(p -1) == '-') { ++ if (is_xml && p >= buf + 1 && *(p-1) == '-') { + break; + } + in_q = state = is_xml = 0; +@@ -4728,7 +4728,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const cha + break; + + case 2: /* PHP */ +- if (!br && lc != '\"' && *(p-1) == '?') { ++ if (!br && lc != '\"' && p >= buf + 1 && *(p-1) == '?') { + in_q = state = 0; + tp = tbuf; + } -- cgit