[notmuch] [PATCH] notmuch-reply.c: early exit for munged Reply-To when header is...
[notmuch-archives.git] / 53 / 1d8a461d8d11deb2effb326f80b194a59c2802
1 Return-Path: <five9a2@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 47392431FBC\r
6         for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:21:01 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id I6fw+nuqjm0G for <notmuch@notmuchmail.org>;\r
11         Mon, 30 Nov 2009 05:21:01 -0800 (PST)\r
12 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com\r
13         [209.85.218.224])\r
14         by olra.theworths.org (Postfix) with ESMTP id E60B6431FAE\r
15         for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:21:00 -0800 (PST)\r
16 Received: by bwz24 with SMTP id 24so2516444bwz.30\r
17         for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 05:20:56 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:sender:from:to:cc:subject\r
20         :date:message-id:x-mailer:in-reply-to:references;\r
21         bh=gEFEKpbhGOunytpm/xVi73jSFEPZQ90sfW874T9r/ns=;\r
22         b=wQoe3aDrhauYfmkic9NBydjqezcRh9hUxeHx5JkH/CsUygEsQEBIMSv7sK8nNfIa4a\r
23         yYHsxCkB6XfLZgn6Rqx7IohMC3e9TqYbYw6PVxz4yPejfLqIhYWAJoCHVm+AFgPDddj/\r
24         BvqK2lxwKf54reYrRLgXz3a+Os6FeVjuFJBTY=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
27         :references;\r
28         b=ijlYnw00CzyDlUh25BGrg2rHBNC45jKziQygoSUSoJhTLkzc6aJl660GJOXgL2cJ5F\r
29         8udwyoeD2oZz+gGaGsruzYp/jjy6hPO5niC6od4kf3WoiHyK48OZBR6MuA2SjIainXu6\r
30         63TZ881P6OVgQxbSZ4TPUOhXJGP/wniG0JNkg=\r
31 Received: by 10.204.32.213 with SMTP id e21mr4496923bkd.34.1259587256276;\r
32         Mon, 30 Nov 2009 05:20:56 -0800 (PST)\r
33 Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11])\r
34         by mx.google.com with ESMTPS id 15sm1461440fxm.6.2009.11.30.05.20.54\r
35         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
36         Mon, 30 Nov 2009 05:20:55 -0800 (PST)\r
37 Sender: Jed Brown <five9a2@gmail.com>\r
38 From: Jed Brown <jed@59A2.org>\r
39 To: cworth@cworth.org\r
40 Date: Mon, 30 Nov 2009 14:21:17 +0100\r
41 Message-Id: <1259587277-6679-1-git-send-email-jed@59A2.org>\r
42 X-Mailer: git-send-email 1.6.5.3\r
43 In-Reply-To: <1259450376-24523-2-git-send-email-jed@59A2.org>\r
44 References: <1259450376-24523-2-git-send-email-jed@59A2.org>\r
45 Cc: notmuch@notmuchmail.org\r
46 Subject: [notmuch] [PATCH] notmuch-reply.c: early exit for munged Reply-To\r
47         when header is not present\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.12\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Mon, 30 Nov 2009 13:21:01 -0000\r
61 \r
62 This avoids erroneously calling internet_address_list_length() with a\r
63 NULL list (which was causing a gmime exception).\r
64 \r
65 Signed-off-by: Jed Brown <jed@59A2.org>\r
66 ---\r
67  notmuch-reply.c |    2 +-\r
68  1 files changed, 1 insertions(+), 1 deletions(-)\r
69 \r
70 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
71 index 9b9e9ab..6c9118e 100644\r
72 --- a/notmuch-reply.c\r
73 +++ b/notmuch-reply.c\r
74 @@ -202,7 +202,7 @@ mailing_list_munged_reply_to (notmuch_message_t *message)\r
75  \r
76      header = notmuch_message_get_header (message, "reply-to");\r
77      list = internet_address_list_parse_string (header);\r
78 -    if (internet_address_list_length (list) != 1)\r
79 +    if (list == NULL || internet_address_list_length (list) != 1)\r
80         return 0;\r
81      address = internet_address_list_get_address (list, 0);\r
82      if (INTERNET_ADDRESS_IS_GROUP (address))\r
83 -- \r
84 1.6.5.3\r
85 \r