Missing headers when forwarding html message as RFC822
[notmuch-archives.git] / 7e / f6604012f29ddc54f143c8c64bd6e652208495
1 Return-Path: <BATV+fd0185dc9217407f92b2+2423+infradead.org+hohndel@bombadil.srs.infradead.org>\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 0F8A24196F2\r
6         for <notmuch@notmuchmail.org>; Mon, 12 Apr 2010 10:45:45 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -4.2\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 9riHP+XkIw3y for <notmuch@notmuchmail.org>;\r
16         Mon, 12 Apr 2010 10:45:41 -0700 (PDT)\r
17 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 034E3431FC1\r
19         for <notmuch@notmuchmail.org>; Mon, 12 Apr 2010 10:45:40 -0700 (PDT)\r
20 Received: from localhost ([::1] helo=localhost.localdomain)\r
21         by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux))\r
22         id 1O1Nhc-0002zZ-LY\r
23         for notmuch@notmuchmail.org; Mon, 12 Apr 2010 17:45:40 +0000\r
24 Received: by localhost.localdomain (Postfix, from userid 500)\r
25         id 355B4C00E4; Mon, 12 Apr 2010 10:45:40 -0700 (PDT)\r
26 From: Dirk Hohndel <hohndel@infradead.org>\r
27 To: <notmuch@notmuchmail.org>\r
28 Subject: [PATCH] Fixing possible dereferencing of NULL pointer\r
29 Date: Mon, 12 Apr 2010 10:45:40 -0700\r
30 Message-ID: <m3tyrg5zuj.fsf@x200.gr8dns.org>\r
31 MIME-Version: 1.0\r
32 Content-Type: text/plain; charset=us-ascii\r
33 X-SRS-Rewrite: SMTP reverse-path rewritten from <hohndel@infradead.org> by\r
34         bombadil.infradead.org See http://www.infradead.org/rpr.html\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Mon, 12 Apr 2010 17:45:45 -0000\r
48 \r
49 \r
50 I must have misunderstood the cases in which this function can be called\r
51 It seemed odd to try to manage authors when author==NULL, but that's\r
52 what we appear to be doing; so now we check that autho != NULL and bail\r
53 otherwise.\r
54 \r
55 Signed-off-by: Dirk Hohndel <hohndel@infradead.org>\r
56 ---\r
57  lib/thread.cc |    2 +-\r
58  1 files changed, 1 insertions(+), 1 deletions(-)\r
59 \r
60 diff --git a/lib/thread.cc b/lib/thread.cc\r
61 index c3c83a3..93a7264 100644\r
62 --- a/lib/thread.cc\r
63 +++ b/lib/thread.cc\r
64 @@ -88,7 +88,7 @@ _thread_move_matched_author (notmuch_thread_t *thread,\r
65      char *currentauthor;\r
66      int idx,nmstart,author_len,authors_len;\r
67  \r
68 -    if (thread->authors == NULL)\r
69 +    if (thread->authors == NULL || author == NULL)\r
70         return;\r
71      if (thread->nonmatched_authors == NULL)\r
72         thread->nonmatched_authors = thread->authors;\r
73 -- \r
74 1.6.6.1\r
75 \r
76 \r
77 -- \r
78 Dirk Hohndel\r
79 Intel Open Source Technology Center\r