about summary refs log tree commit diff
path: root/rfc2047.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-12 16:12:44 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-12 16:12:44 +0200
commit4bd036232df2595a1e27f1b9aa8c94abea314863 (patch)
tree52cf71a84e2620b16e57ccdcb81c162f87508545 /rfc2047.c
parenta123eaf6191579870914cb81fe067e3ea87ade76 (diff)
downloadmblaze-4bd036232df2595a1e27f1b9aa8c94abea314863.tar.gz
mblaze-4bd036232df2595a1e27f1b9aa8c94abea314863.tar.xz
mblaze-4bd036232df2595a1e27f1b9aa8c94abea314863.zip
rfc2047: better base64 memory bound
Diffstat (limited to 'rfc2047.c')
-rw-r--r--rfc2047.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rfc2047.c b/rfc2047.c
index e90b91b..2d8d015 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -69,7 +69,7 @@ decode_b64(char *s, char *e, char **deco, size_t *decleno)
 		41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
 	};
 
-	char *buf = malloc(e - s);   // XXX better bound
+	char *buf = malloc((e - s) / 4 * 3);
 	if (!buf)
 		return 0;