1
0
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:
Sean Bright
2001-04-29 13:16:05 +00:00
parent b63bcebc6e
commit 596e8208be

View File

@@ -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;