]> granicus.if.org Git - php/commitdiff
Fix overflow
authorfoobar <sniper@php.net>
Thu, 15 Jan 2004 06:09:43 +0000 (06:09 +0000)
committerfoobar <sniper@php.net>
Thu, 15 Jan 2004 06:09:43 +0000 (06:09 +0000)
ext/mime_magic/mime_magic.c

index ca03a71a8c25a3a230fdfccc188a06bc93c7b5e1..029e37d72315f95678f009ff281e91ad703f82b8 100644 (file)
@@ -926,7 +926,7 @@ static char *rsl_strdup(int start_frag, int start_pos, int len)
     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;