From 11c9ce78f1f8a772db2a6f82e745e6b42adf943f Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 13 Jul 2016 20:53:26 +0200 Subject: rfc2047: blaze822_decode_qp: off-by-one in qp decoding --- rfc2047.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rfc2047.c') diff --git a/rfc2047.c b/rfc2047.c index 94b9a59..2b9dfc0 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -25,7 +25,7 @@ blaze822_decode_qp(char *start, char *stop, char **deco, size_t *decleno) -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 }; - char *buf = malloc(4 * (stop - start)); + char *buf = malloc(4 * (stop - start) + 1); if (!buf) return 0; -- cgit 1.4.1