about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 20:53:26 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 20:53:26 +0200
commit11c9ce78f1f8a772db2a6f82e745e6b42adf943f (patch)
treefc5e836ff1ad405a394b9d0033f832591948c992
parent42677a058610a6810ba569b01fc5ae7dbc36006c (diff)
downloadmblaze-11c9ce78f1f8a772db2a6f82e745e6b42adf943f.tar.gz
mblaze-11c9ce78f1f8a772db2a6f82e745e6b42adf943f.tar.xz
mblaze-11c9ce78f1f8a772db2a6f82e745e6b42adf943f.zip
rfc2047: blaze822_decode_qp: off-by-one in qp decoding
-rw-r--r--rfc2047.c2
1 files changed, 1 insertions, 1 deletions
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;