diff options
author | Zeev Suraski <zeev@php.net> | 2000-02-13 15:35:51 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-02-13 15:35:51 +0000 |
commit | 6ae0902498ab5e74162233dcd5d74f1b7039d33b (patch) | |
tree | 7ab8709b061bbdba22f60a57a9e7c525b30bf339 | |
parent | 017a6353d1f45d3462b2526046e28c7457e49bc1 (diff) | |
download | php-git-6ae0902498ab5e74162233dcd5d74f1b7039d33b.tar.gz |
- Hopefully fix strip_tags bug
@- Fix overrun in strip_tags (Stas, Zend library)
-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 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; |