From 6ae0902498ab5e74162233dcd5d74f1b7039d33b Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sun, 13 Feb 2000 15:35:51 +0000 Subject: [PATCH] - Hopefully fix strip_tags bug @- Fix overrun in strip_tags (Stas, Zend library) --- 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 3768e4fcca..ed847c4d82 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2265,8 +2265,8 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo if(allow) { *(tp++) = '>'; *tp='\0'; - if(php_tag_find(tbuf, tp-tbuf, allow)) { - memcpy(rp,tbuf,tp-tbuf); + if(php_tag_find(tbuf, tp-tbuf+1, allow)) { + memcpy(rp,tbuf,tp-tbuf+1); rp += tp-tbuf; } tp = tbuf; -- 2.50.1