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