diff options
| author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-02-24 22:19:36 +0000 |
|---|---|---|
| committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-02-24 22:19:36 +0000 |
| commit | 8f341f6a194a4db6f6cc587cf624167321183a19 (patch) | |
| tree | 8d8f7eade5425200eea21f87984ba8560ce13f82 /ext/standard | |
| parent | 385a809694ef2532108720832bec5c12a983706c (diff) | |
| download | php-git-8f341f6a194a4db6f6cc587cf624167321183a19.tar.gz | |
Fixed possible buffer overflow of php_strip_tags
Diffstat (limited to 'ext/standard')
| -rw-r--r-- | ext/standard/string.c | 4 |
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); |
