[dovecot-cvs] dovecot/src/plugins/mail-log mail-log-plugin.c, 1.1.2.1, 1.1.2.2

tss at dovecot.org tss at dovecot.org
Wed Feb 7 01:45:32 UTC 2007


Update of /var/lib/cvs/dovecot/src/plugins/mail-log
In directory talvi:/tmp/cvs-serv18376

Modified Files:
      Tag: branch_1_0
	mail-log-plugin.c 
Log Message:
Don't crash with expunging mails with non-existing message-id header.



Index: mail-log-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/mail-log/mail-log-plugin.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- mail-log-plugin.c	18 Jan 2007 18:45:30 -0000	1.1.2.1
+++ mail-log-plugin.c	7 Feb 2007 01:45:30 -0000	1.1.2.2
@@ -40,7 +40,7 @@
 
 	msgid = mail_get_first_header(mail, "Message-ID");
 	i_info("%s: uid=%u, msgid=%s", action, mail->uid,
-	       str_sanitize(msgid, MSGID_LOG_LEN));
+	       msgid == NULL ? "(null)" : str_sanitize(msgid, MSGID_LOG_LEN));
 }
 
 static int mail_log_mail_expunge(struct mail *_mail)



More information about the dovecot-cvs mailing list