Skip to content

Commit a698e36

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: More checks for php_strip_tags_ex
2 parents 0719035 + 984d508 commit a698e36

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
@@ -5099,7 +5099,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
50995099
break;
51005100
}
51015101

5102-
if (!br && lc != '\"' && *(p-1) == '?') {
5102+
if (!br && p >= buf + 1 && lc != '\"' && *(p-1) == '?') {
51035103
in_q = state = 0;
51045104
tp = tbuf;
51055105
p++;

0 commit comments

Comments
 (0)