1 Return-Path: <jrollins@finestructure.net>
\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 F2951431FC4
\r
6 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 01:08:52 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 6GU7YWjmaDq5 for <notmuch@notmuchmail.org>;
\r
16 Tue, 7 Aug 2012 01:08:51 -0700 (PDT)
\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id 01A9D431FAF
\r
20 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 01:08:50 -0700 (PDT)
\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])
\r
22 by earth-doxen-postvirus (Postfix) with ESMTP id 7604E66E00C2;
\r
23 Tue, 7 Aug 2012 01:08:48 -0700 (PDT)
\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new
\r
25 Received: from finestructure.net (unknown [76.89.192.57])
\r
26 (Authenticated sender: jrollins)
\r
27 by earth-doxen-submit (Postfix) with ESMTP id 519BD66E00A9;
\r
28 Tue, 7 Aug 2012 01:08:44 -0700 (PDT)
\r
29 Received: by finestructure.net (Postfix, from userid 1000)
\r
30 id C1D5A55B; Tue, 7 Aug 2012 01:08:43 -0700 (PDT)
\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>
\r
32 To: Mark Walters <markwalters1009@gmail.com>,
\r
33 Ben Gamari <bgamari.foss@gmail.com>, notmuch@notmuchmail.org
\r
34 Subject: Re: Segmentation fault in notmuch search --format=json
\r
35 In-Reply-To: <878vdrp4d9.fsf@qmul.ac.uk>
\r
36 References: <871ujjuu2z.fsf@gmail.com> <878vdrp4d9.fsf@qmul.ac.uk>
\r
37 User-Agent: Notmuch/0.13.2+136~g6c0183b (http://notmuchmail.org) Emacs/23.4.1
\r
38 (x86_64-pc-linux-gnu)
\r
39 Date: Tue, 07 Aug 2012 01:08:40 -0700
\r
40 Message-ID: <87pq73jf92.fsf@servo.finestructure.net>
\r
42 Content-Type: multipart/signed; boundary="=-=-=";
\r
43 micalg=pgp-sha256; protocol="application/pgp-signature"
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Tue, 07 Aug 2012 08:08:53 -0000
\r
59 Content-Transfer-Encoding: quoted-printable
\r
61 On Tue, Aug 07 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
62 > On Tue, 07 Aug 2012, Ben Gamari <bgamari.foss@gmail.com> wrote:
\r
63 >> It seems some messages trigger a segmentation fault in
\r
64 >> `do_search_threads()`. It appears the problem occurs (at least) when
\r
65 >> `authors` is NULL.
\r
67 > Hi thanks for the bug report and detailed debugging. I think I can see
\r
68 > the problem and there is a test patch to fix it below, and this does
\r
69 > appear to be a regression.
\r
71 > In json.c the function json_quote_str explicitly checks/allows for a
\r
72 > NULL pointer passed as a string and pretends it is just an empty
\r
73 > string. That behaviour was lost in the move to structured formatters.
\r
75 > A simple fix is to put this check for a null pointer in json_string in
\r
76 > sprinter-json.c which is what this patch does.
\r
78 Thanks Mark! I was experiencing the same problem and this fixed the
\r
79 issue before I even got a chance to respond. This seems like a fine
\r
82 > Incidentally this is the second time this bug has appeared:=20
\r
84 > commit cacefbf3d6dd5bce0b60b3cdfce29bfa371dfaea
\r
85 > Author: David Edmondson <dme@dme.org>
\r
86 > Date: Tue Apr 6 08:24:00 2010 +0100
\r
88 > json: Avoid calling strlen(NULL)
\r
89 >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
\r
90 > MIME parts may have no filename, which previously res=
\r
94 > so it really might be worth having a test for it!
\r
96 Indeed! I think the problematic email in this case was one with no
\r
99 > Finally, I think nothing in json.c is used anymore so perhaps it
\r
100 > could be removed.
\r
107 Content-Type: application/pgp-signature
\r
109 -----BEGIN PGP SIGNATURE-----
\r
110 Version: GnuPG v1.4.12 (GNU/Linux)
\r
112 iQIcBAEBCAAGBQJQIM0JAAoJEO00zqvie6q8C84P/0+M3A6/vj9qdDrQRaOOvFRR
\r
113 p6vNJ+ebIZegrtS2DzFan7Idy9v+CNnTRt9hEJUO+xJcVZcD2LnwFo43DBeYyAhn
\r
114 BTDR2IjvHDPKGg3J7uYe7DAjhZdfIJd5BYbXkVd3in3j6EQbQsXiiEua4wqyn3E8
\r
115 gQB6zZXDEGY9F7Bj/v+PhpNVXNJOfS64QVIc2fWyMUg8Lrj12dYYpEnNS/21pj7S
\r
116 GbCYFgtcdSk4ODqA3gLoVeZqJ/io//w33hS/P5decwQJkceSNBVppQ7KXImKQqlg
\r
117 6iXyz9IjDtyBMqVaBuDutWwwJcYxa1+AdKpobyi0RgfcGfX2YKDjqHA1DPo142pz
\r
118 fVNUviRv8Q2UxIxxKC4BvQGcftUmwlPG+6OlFV9lUL6NAgkf6tIg1vMo8OFm88Y1
\r
119 ibbxBPe5hCOqq1K+ELUEV8E2VVFBlEBlVyfe9/piWO507bkCAAIubzCV12lX3KHe
\r
120 otJ2VleJd3Y6/49E/6zV9AGLavEJXjaINtQyNVi7m4yf/MVWdgpwE4hgZxUqF5sJ
\r
121 aXggn6ppJtGsTtKTC3/Nfu62TImzcEM9OHej5NEO/xU+rTBI6ZUKNNYXMBtv6aYY
\r
122 IlST5W78DqcW9SJvGJWP+ZbcX8U027yShRy+s8v4uklxUNjcFFjeKvxl35HAoQ00
\r
123 GYMob3scnwRD67mnAWUd
\r
125 -----END PGP SIGNATURE-----
\r