unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jed Brown <jed@59A2.org>
To: cworth@cworth.org
Cc: notmuch@notmuchmail.org
Subject: [PATCH] notmuch-reply.c: early exit for munged Reply-To when header is not present
Date: Mon, 30 Nov 2009 14:21:17 +0100	[thread overview]
Message-ID: <1259587277-6679-1-git-send-email-jed@59A2.org> (raw)
In-Reply-To: <1259450376-24523-2-git-send-email-jed@59A2.org>

This avoids erroneously calling internet_address_list_length() with a
NULL list (which was causing a gmime exception).

Signed-off-by: Jed Brown <jed@59A2.org>
---
 notmuch-reply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notmuch-reply.c b/notmuch-reply.c
index 9b9e9ab..6c9118e 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -202,7 +202,7 @@ mailing_list_munged_reply_to (notmuch_message_t *message)
 
     header = notmuch_message_get_header (message, "reply-to");
     list = internet_address_list_parse_string (header);
-    if (internet_address_list_length (list) != 1)
+    if (list == NULL || internet_address_list_length (list) != 1)
 	return 0;
     address = internet_address_list_get_address (list, 0);
     if (INTERNET_ADDRESS_IS_GROUP (address))
-- 
1.6.5.3

  reply	other threads:[~2009-11-30 13:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-28 16:05 Mailing list Reply-To munging and notmuch reply Jed Brown
2009-11-28 17:55 ` Carl Worth
2009-11-28 19:26   ` Jed Brown
2009-11-28 20:11     ` Carl Worth
2009-11-28 23:19       ` [PATCH 1/2] notmuch-reply.c: factor adding recipients into common function Jed Brown
2009-11-28 23:19         ` [PATCH 2/2] notmuch-reply.c: Handle munged `Reply-To' headers Jed Brown
2009-11-30 13:21           ` Jed Brown [this message]
2010-02-04 20:54           ` Carl Worth
2010-02-05  9:00             ` Jed Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259587277-6679-1-git-send-email-jed@59A2.org \
    --to=jed@59a2.org \
    --cc=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).