From fc49f98e6a9ecc593e49258902749be805d320b2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 13 Feb 2007 23:55:20 +0000 Subject: [PATCH] Make sure p is not pointing to the start of the buffer --- ext/standard/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 335cb64d5c..355792778b 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4263,7 +4263,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow, tp = ((tp-tbuf) >= PHP_TAG_BUF_SIZE ? tbuf: tp); *(tp++) = c; } - if (*(p-1) != '\\') { + if (p != buf && *(p-1) != '\\') { in_q = !in_q; } break; -- 2.50.1