From 596e8208be79661fef0c616db07817590ea75783 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Sun, 29 Apr 2001 13:16:05 +0000 Subject: [PATCH] Really fix bug #10362. # My previous fix caused a segfault when there were parens in an unallowed # tag :( Thanks Andi. --- ext/standard/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 2daac404af9..52274dc2481 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;