From cc4080a259643bee02454769200a6f3d92d36673 Mon Sep 17 00:00:00 2001 From: Steffen Nurpmeso Date: Tue, 7 Aug 2018 18:11:06 +0200 Subject: [PATCH] a_coll_quote_message(): CID 1394688: Memory - illegal accesses (UNINIT) --- collect.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/collect.c b/collect.c index d385cae4..b5960844 100644 --- a/collect.c +++ b/collect.c @@ -50,7 +50,7 @@ struct a_coll_fmt_ctx{ /* xxx This is temporary until v15 has objects */ char *cfc_real; char *cfc_full; char *cfc_date; - char *cfc_msgid; /* Or NULL */ + char const *cfc_msgid; /* Or NULL */ }; struct a_coll_ocs_arg{ @@ -501,10 +501,11 @@ a_coll_quote_message(FILE *fp, struct message *mp, bool_t isfwd){ if((cp = hfield1("message-id", mp)) != NULL && (np = lextract(cp, GREF)) != NULL) - cfc.cfc_msgid = np->n_name; + cp = np->n_name; else - cp = (char*)-1; + cp = NULL; } + cfc.cfc_msgid = cp; if(!a_coll__fmt_inj(&cfc) || fflush(fp)) goto jleave; -- 2.11.4.GIT