Skip to content

Commit 5d65641

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Yet another check for php_strip_tags_ex()
2 parents 1d0247d + 1b7343b commit 5d65641

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
@@ -5108,7 +5108,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
51085108
break;
51095109
case '"':
51105110
case '\'':
5111-
if (*(p-1) != '\\') {
5111+
if (p >= buf + 1 && *(p-1) != '\\') {
51125112
if (lc == c) {
51135113
lc = '\0';
51145114
} else if (lc != '\\') {

0 commit comments

Comments
 (0)