[notmuch] [PATCH] notmuch-reply.c: early exit for munged Reply-To when header is...
authorJed Brown <jed@59A2.org>
Mon, 30 Nov 2009 13:21:17 +0000 (14:21 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:47 +0000 (09:35 -0800)
53/1d8a461d8d11deb2effb326f80b194a59c2802 [new file with mode: 0644]

diff --git a/53/1d8a461d8d11deb2effb326f80b194a59c2802 b/53/1d8a461d8d11deb2effb326f80b194a59c2802
new file mode 100644 (file)
index 0000000..7f804bc
--- /dev/null
@@ -0,0 +1,85 @@
+Return-Path: <five9a2@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 47392431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:21:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id I6fw+nuqjm0G for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Nov 2009 05:21:01 -0800 (PST)\r
+Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com\r
+       [209.85.218.224])\r
+       by olra.theworths.org (Postfix) with ESMTP id E60B6431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:21:00 -0800 (PST)\r
+Received: by bwz24 with SMTP id 24so2516444bwz.30\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:20:56 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:sender:from:to:cc:subject\r
+       :date:message-id:x-mailer:in-reply-to:references;\r
+       bh=gEFEKpbhGOunytpm/xVi73jSFEPZQ90sfW874T9r/ns=;\r
+       b=wQoe3aDrhauYfmkic9NBydjqezcRh9hUxeHx5JkH/CsUygEsQEBIMSv7sK8nNfIa4a\r
+       yYHsxCkB6XfLZgn6Rqx7IohMC3e9TqYbYw6PVxz4yPejfLqIhYWAJoCHVm+AFgPDddj/\r
+       BvqK2lxwKf54reYrRLgXz3a+Os6FeVjuFJBTY=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+       :references;\r
+       b=ijlYnw00CzyDlUh25BGrg2rHBNC45jKziQygoSUSoJhTLkzc6aJl660GJOXgL2cJ5F\r
+       8udwyoeD2oZz+gGaGsruzYp/jjy6hPO5niC6od4kf3WoiHyK48OZBR6MuA2SjIainXu6\r
+       63TZ881P6OVgQxbSZ4TPUOhXJGP/wniG0JNkg=\r
+Received: by 10.204.32.213 with SMTP id e21mr4496923bkd.34.1259587256276;\r
+       Mon, 30 Nov 2009 05:20:56 -0800 (PST)\r
+Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11])\r
+       by mx.google.com with ESMTPS id 15sm1461440fxm.6.2009.11.30.05.20.54\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Mon, 30 Nov 2009 05:20:55 -0800 (PST)\r
+Sender: Jed Brown <five9a2@gmail.com>\r
+From: Jed Brown <jed@59A2.org>\r
+To: cworth@cworth.org\r
+Date: Mon, 30 Nov 2009 14:21:17 +0100\r
+Message-Id: <1259587277-6679-1-git-send-email-jed@59A2.org>\r
+X-Mailer: git-send-email 1.6.5.3\r
+In-Reply-To: <1259450376-24523-2-git-send-email-jed@59A2.org>\r
+References: <1259450376-24523-2-git-send-email-jed@59A2.org>\r
+Cc: notmuch@notmuchmail.org\r
+Subject: [notmuch] [PATCH] notmuch-reply.c: early exit for munged Reply-To\r
+       when header is not present\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 30 Nov 2009 13:21:01 -0000\r
+\r
+This avoids erroneously calling internet_address_list_length() with a\r
+NULL list (which was causing a gmime exception).\r
+\r
+Signed-off-by: Jed Brown <jed@59A2.org>\r
+---\r
+ notmuch-reply.c |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index 9b9e9ab..6c9118e 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -202,7 +202,7 @@ mailing_list_munged_reply_to (notmuch_message_t *message)\r
\r
+     header = notmuch_message_get_header (message, "reply-to");\r
+     list = internet_address_list_parse_string (header);\r
+-    if (internet_address_list_length (list) != 1)\r
++    if (list == NULL || internet_address_list_length (list) != 1)\r
+       return 0;\r
+     address = internet_address_list_get_address (list, 0);\r
+     if (INTERNET_ADDRESS_IS_GROUP (address))\r
+-- \r
+1.6.5.3\r
+\r