mirror of
https://github.com/php/php-src.git
synced 2026-04-12 18:43:37 +02:00
Really fix bug #10362.
# My previous fix caused a segfault when there were parens in an unallowed # tag :( Thanks Andi.
This commit is contained in:
@@ -2768,7 +2768,7 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo
|
||||
lc = '(';
|
||||
br++;
|
||||
}
|
||||
} else if (state == 1) {
|
||||
} else if (allow && state == 1) {
|
||||
*(tp++) = c;
|
||||
} else if (state == 0) {
|
||||
*(rp++) = c;
|
||||
@@ -2781,7 +2781,7 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo
|
||||
lc = ')';
|
||||
br--;
|
||||
}
|
||||
} else if (state == 1) {
|
||||
} else if (allow && state == 1) {
|
||||
*(tp++) = c;
|
||||
} else if (state == 0) {
|
||||
*(rp++) = c;
|
||||
|
||||
Reference in New Issue
Block a user