From: foobar Date: Thu, 15 Jan 2004 06:09:43 +0000 (+0000) Subject: Fix overflow X-Git-Tag: php-4.3.5RC2~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28686f683fc6cdb990a7d5b9bbf693cc58d91f16;p=php Fix overflow --- diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index ca03a71a8c..029e37d723 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -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;