Fix bug 3571, 'recipient list lost and truncated'
[claws.git] / src / plugins / spam_report / spam_report.c
index e1987c53a2dee4ed2abf3cec3d941a5850e7c0ab..826281de803258ed9b8a818509df90a4d0848b3a 100644 (file)
@@ -141,11 +141,13 @@ static gchar *spamreport_strreplace(gchar *source, gchar *pattern,
 
 static gboolean check_debian_listid(MsgInfo *msginfo)
 {
-       gchar buf[1024];
-       if (!procheader_get_header_from_msginfo(msginfo, buf, sizeof(buf), "List-Id:")) {
+       gchar *buf = NULL;
+       if (!procheader_get_header_from_msginfo(msginfo, &buf, "List-Id:") && buf != NULL) {
                if (strstr(buf, "lists.debian.org")) {
+                       g_free(buf);
                        return TRUE;
                }
+               g_free(buf);
        }
        return FALSE;
 }