From 2c5e1da2b1bf06ccf23690aa151368539a323890 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Mon, 7 Mar 2016 20:44:19 +0330 Subject: [PATCH] mime: fix uninitialised mime->depth Reported and tested by Christian Neukirchen . --- mime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mime.c b/mime.c index a8f2116..0aa1ff8 100644 --- a/mime.c +++ b/mime.c @@ -123,7 +123,6 @@ struct mime { int part[MAXPARTS]; char bound[MAXPARTS][BOUNDLEN]; char *src; - char *dst; char *end; }; @@ -272,6 +271,7 @@ int msg_demime(char *msg, long msglen, char **mod, long *modlen) struct mime m; m.src = msg; m.end = msg + msglen; + m.depth = 0; while ((m.depth && m.src < m.end) || m.src == msg) { int type = read_hdrs(&m, dst); read_body(&m, dst, type); -- 2.11.4.GIT