mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
Fix bounds check in strip_tags()
This commit is contained in:
parent
adcdb4f7ba
commit
4e0134c661
1 changed files with 1 additions and 1 deletions
|
@ -4822,7 +4822,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow,
|
|||
* state == 2 (PHP). Switch back to HTML.
|
||||
*/
|
||||
|
||||
if (state == 2 && p > buf+2 && strncasecmp(p-4, "<?xm", 4) == 0) {
|
||||
if (state == 2 && p > buf+4 && strncasecmp(p-4, "<?xm", 4) == 0) {
|
||||
state = 1; is_xml=1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue