From: Ilia Alshanetsky Date: Tue, 13 Feb 2007 23:55:20 +0000 (+0000) Subject: Make sure p is not pointing to the start of the buffer X-Git-Tag: php-5.2.2RC1~404 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc49f98e6a9ecc593e49258902749be805d320b2;p=php Make sure p is not pointing to the start of the buffer --- 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;