diff options
| author | Sean Bright <elixer@php.net> | 2001-04-29 13:16:05 +0000 |
|---|---|---|
| committer | Sean Bright <elixer@php.net> | 2001-04-29 13:16:05 +0000 |
| commit | 596e8208be79661fef0c616db07817590ea75783 (patch) | |
| tree | 01766f5fb321edf99110359f2b320942ccbeb9f5 | |
| parent | b63bcebc6e44646a1181948ba25b2ca3a7f5f314 (diff) | |
| download | php-git-596e8208be79661fef0c616db07817590ea75783.tar.gz | |
Really fix bug #10362.
# My previous fix caused a segfault when there were parens in an unallowed
# tag :( Thanks Andi.
| -rw-r--r-- | ext/standard/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 2daac404af..52274dc248 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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; |
