aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index ea60fc8a88..46ad1595b0 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1840,9 +1840,9 @@ hex_decode (const char *in, size_t len)
unsigned char *inptr, *outptr;
char *outbuf;
- outptr = outbuf = g_malloc (len);
+ outptr = outbuf = g_malloc (len + 1);
- inptr = (guchar *) in;
+ inptr = (unsigned char *) in;
while (inptr < inend) {
if (*inptr == '%') {
if (isxdigit (inptr[1]) && isxdigit (inptr[2])) {