1 Return-Path: <aclements@csail.mit.edu>
\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 255A8431FD5
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 16:18:04 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\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 8nIfRIr8zn3I for <notmuch@notmuchmail.org>;
\r
16 Mon, 6 Oct 2014 16:18:00 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id C7E8F431FB6
\r
22 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 16:17:36 -0700 (PDT)
\r
23 X-AuditID: 1209190c-f795e6d000006c66-2a-54332310faa0
\r
24 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
25 (using TLS with cipher AES256-SHA (256/256 bits))
\r
26 (Client did not present a certificate)
\r
27 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id 39.75.27750.01323345; Mon, 6 Oct 2014 19:17:36 -0400 (EDT)
\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
30 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s96NHPCV032087;
\r
31 Mon, 6 Oct 2014 19:17:25 -0400
\r
32 Received: from drake.dyndns.org ([12.185.136.2]) (authenticated bits=0)
\r
33 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
34 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s96NHMLY014470
\r
35 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
\r
36 Mon, 6 Oct 2014 19:17:24 -0400
\r
37 Received: from amthrax by drake.dyndns.org with local (Exim 4.84)
\r
38 (envelope-from <aclements@csail.mit.edu>)
\r
39 id 1XbHWr-0001JQ-NV; Mon, 06 Oct 2014 17:17:21 -0600
\r
40 From: Austin Clements <aclements@csail.mit.edu>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH v2 03/12] lib: Handle empty date value
\r
43 Date: Mon, 6 Oct 2014 17:17:09 -0600
\r
44 Message-Id: <1412637438-4821-4-git-send-email-aclements@csail.mit.edu>
\r
45 X-Mailer: git-send-email 2.1.0
\r
46 In-Reply-To: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>
\r
47 References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFjrJIsWRmVeSWpSXmKPExsUixG6nriugbBxi8GcXr8WN1m5Gi+s3ZzI7
\r
50 MHk8W3WL2WPLoffMAUxRXDYpqTmZZalF+nYJXBk7V31hK9jIWvH44jGmBsblLF2MnBwSAiYS
\r
51 d6+3sULYYhIX7q1n62Lk4hASmM0ksefBVSYIZwOjxP5Z+6AyS5kkel/+ZgdpERJYwiixtCUO
\r
52 xGYT0JdYsXYS2CgRAWmJnXdng9nMApYSV7+2M4HYwgJmErdfr2QDsVkEVCV2/vnFDGLzCrhJ
\r
53 3D4zgw3iDDmJDbv/M4LYnALuEmuuTGaF2OUm8fznU5YJjPwLGBlWMcqm5Fbp5iZm5hSnJusW
\r
54 Jyfm5aUW6Rrq5WaW6KWmlG5iBIUSpyTPDsY3B5UOMQpwMCrx8EbsMAwRYk0sK67MPcQoycGk
\r
55 JMo7h904RIgvKT+lMiOxOCO+qDQntfgQowQHs5IIL9dvoxAh3pTEyqrUonyYlDQHi5I476Yf
\r
56 fCFCAumJJanZqakFqUUwWRkODiUJ3t+KQEMFi1LTUyvSMnNKENJMHJwgw3mAhv8DqeEtLkjM
\r
57 Lc5Mh8ifYtTlaGl628skxJKXn5cqJc4bDFIkAFKUUZoHNweWAl4xigO9JcwrrgRUxQNMH3CT
\r
58 XgEtYQJaYjpHH2RJSSJCSqqBMbVf6Dabz0oXyQuFtzIyXp9LWJgneX12r9PvnKc8MhmMCy4H
\r
59 1ioLPpxUPbFzTpyW0eULbPzMxg/nnpvy/5JGzPu1ond/OelwhSTs8dv6ca7j07iTnx4/0vBy
\r
60 1rZcbKLpulP5t1RkaEqX1qHgqb9a5ew677Ie8H38RuShNuPjk9NL7ir8uzdBWomlOCPRUIu5
\r
62 X-BeenThere: notmuch@notmuchmail.org
\r
63 X-Mailman-Version: 2.1.13
\r
65 List-Id: "Use and development of the notmuch mail system."
\r
66 <notmuch.notmuchmail.org>
\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
70 List-Post: <mailto:notmuch@notmuchmail.org>
\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
73 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
74 X-List-Received-Date: Mon, 06 Oct 2014 23:18:04 -0000
\r
76 From: Austin Clements <amdragon@mit.edu>
\r
78 In the interest of robustness, avoid undefined behavior of
\r
79 sortable_unserialise if the date value is missing. This shouldn't
\r
80 happen now, but ghost messages will have blank date values.
\r
82 lib/message.cc | 3 +++
\r
83 1 file changed, 3 insertions(+)
\r
85 diff --git a/lib/message.cc b/lib/message.cc
\r
86 index bbfc250..38bc929 100644
\r
87 --- a/lib/message.cc
\r
88 +++ b/lib/message.cc
\r
89 @@ -896,6 +896,9 @@ notmuch_message_get_date (notmuch_message_t *message)
\r
93 + if (value.empty ())
\r
94 + /* sortable_unserialise is undefined on empty string */
\r
96 return Xapian::sortable_unserialise (value);
\r