Messages: add missing initializations of contexts.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Nov 2012 13:23:07 +0000 (14:23 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Nov 2012 13:23:07 +0000 (14:23 +0100)
webcit/messages.c

index 3f8108f0a97c54511b4f97df414caec04346b535..6da0b55aa1a97b37df63fc990ab813c185ea9237 100644 (file)
@@ -192,6 +192,9 @@ int read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, co
        WCTemplputParams SubTP;
        StrBuf *Error = NULL;
 
+       memset(&SuperTP, 0, sizeof(WCTemplputParams));
+       memset(&SubTP, 0, sizeof(WCTemplputParams));
+
        Buf = NewStrBuf();
        FoundCharset = NewStrBuf();
        Msg = (message_summary *)malloc(sizeof(message_summary));
@@ -217,7 +220,6 @@ int read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, co
                /* Locate a renderer capable of converting this MIME part into HTML */
                if (GetHash(MimeRenderHandler, SKEY(Buf), &vHdr) &&
                    (vHdr != NULL)) {
-                       WCTemplputParams SubTP;
                        RenderMimeFuncStruct *Render;
                        
                        StackContext(&SuperTP, &SubTP, Msg->MsgBody, CTX_MIME_ATACH, 0, NULL);