summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-02-24 22:19:36 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-02-24 22:19:36 +0000
commit8f341f6a194a4db6f6cc587cf624167321183a19 (patch)
tree8d8f7eade5425200eea21f87984ba8560ce13f82 /ext/standard
parent385a809694ef2532108720832bec5c12a983706c (diff)
downloadphp-git-8f341f6a194a4db6f6cc587cf624167321183a19.tar.gz
Fixed possible buffer overflow of php_strip_tags
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 77966c9726..e21cf53f06 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -3746,7 +3746,9 @@ reg_char:
c = *(++p);
i++;
}
- *rp = '\0';
+ if (rp < rbuf + len) {
+ *rp = '\0';
+ }
efree(buf);
if (allow)
efree(tbuf);