Skip to content

Commit 372b678

Browse files
committed
Yet another check for php_strip_tags_ex()
1 parent 2c2cbbb commit 372b678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5266,7 +5266,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
52665266
break;
52675267
case '"':
52685268
case '\'':
5269-
if (*(p-1) != '\\') {
5269+
if (p >= buf + 1 && *(p-1) != '\\') {
52705270
if (lc == c) {
52715271
lc = '\0';
52725272
} else if (lc != '\\') {

0 commit comments

Comments
 (0)