cvs: php-src(PHP_4_3) /ext/mime_magic mime_magic.c
| From: | Jani Taskinen | Date: | Thu, 15 Jan 2004 06:09:44 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/mime_magic mime_magic.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-25657@lists.php.net to get a copy of this message | ||
sniper Thu Jan 15 01:09:44 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/mime_magic mime_magic.c
Log:
Fix overflow
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.13.2.11 php-src/ext/mime_magic/mime_magic.c:1.13.2.12
--- php-src/ext/mime_magic/mime_magic.c:1.13.2.11 Tue Nov 4 00:15:55 2003
+++ php-src/ext/mime_magic/mime_magic.c Thu Jan 15 01:09:43 2004
@@ -15,7 +15,7 @@
| Author: Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
- $Id: mime_magic.c,v 1.13.2.11 2003/11/04 05:15:55 sniper Exp $
+ $Id: mime_magic.c,v 1.13.2.12 2004/01/15 06:09:43 sniper Exp $
This module contains a lot of stuff taken from Apache mod_mime_magic,
so the license section is a little bit longer than usual:
@@ -926,7 +926,7 @@
req_dat = MIME_MAGIC_G(req_dat);
/* allocate the result string */
- result = (char *) emalloc(len + 1);
+ result = (char *) emalloc(len + 2);
/* loop through and collect the string */
res_pos = 0;