From 28686f683fc6cdb990a7d5b9bbf693cc58d91f16 Mon Sep 17 00:00:00 2001 From: foobar Date: Thu, 15 Jan 2004 06:09:43 +0000 Subject: [PATCH] Fix overflow --- ext/mime_magic/mime_magic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.50.1