1 Return-Path: <dme@dme.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 BC7104196F4
\r
6 for <notmuch@notmuchmail.org>; Tue, 6 Apr 2010 01:31:15 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5
\r
12 tests=[BAYES_05=-0.5, RCVD_IN_DNSWL_NONE=-0.0001] 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 uU09xtZoHo6G for <notmuch@notmuchmail.org>;
\r
16 Tue, 6 Apr 2010 01:31:15 -0700 (PDT)
\r
17 Received: from mail-ew0-f219.google.com (mail-ew0-f219.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id D74354196F0
\r
20 for <notmuch@notmuchmail.org>; Tue, 6 Apr 2010 01:31:14 -0700 (PDT)
\r
21 Received: by ewy19 with SMTP id 19so4516ewy.2
\r
22 for <notmuch@notmuchmail.org>; Tue, 06 Apr 2010 01:31:14 -0700 (PDT)
\r
23 Received: by 10.213.47.83 with SMTP id m19mr391919ebf.92.1270542673844;
\r
24 Tue, 06 Apr 2010 01:31:13 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com
\r
27 by mx.google.com with ESMTPS id t12sm26928143gvd.6.2010.04.06.01.31.11
\r
28 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
29 Tue, 06 Apr 2010 01:31:12 -0700 (PDT)
\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
31 id 842805941EC; Tue, 6 Apr 2010 09:31:09 +0100 (BST)
\r
32 To: Anthony Towns <aj@erisian.com.au>
\r
33 Subject: Re: [PATCH] json: Avoid calling strlen(NULL)
\r
34 In-Reply-To: <h2y87b3a4191004060117v5421db8ejbe3030d0626e7440@mail.gmail.com>
\r
35 References: <877holavq5.fsf@ut.hh.sledj.net>
\r
36 <h2y87b3a4191004060117v5421db8ejbe3030d0626e7440@mail.gmail.com>
\r
37 From: David Edmondson <dme@dme.org>
\r
38 Date: Tue, 06 Apr 2010 09:31:09 +0100
\r
39 Message-ID: <874ojpasoi.fsf@ut.hh.sledj.net>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 Cc: notmuch <notmuch@notmuchmail.org>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Tue, 06 Apr 2010 08:31:15 -0000
\r
57 On Tue, 6 Apr 2010 18:17:44 +1000, Anthony Towns <aj@erisian.com.au> wrote:
\r
58 > OTOH, the code in json_quote_array to deal with that does the same
\r
59 > thing (returns a literal string containing two quote marks), which
\r
60 > seems wrong -- the normal code path is to talloc to get a newly
\r
61 > allocated, editable string, that might be talloc_free'd later,
\r
62 > wouldn't it make more sense just to let the str==NULL / len==0
\r
63 > behaviour fall through into the normal case code?
\r
65 This is a much nicer solution.
\r
69 David Edmondson, http://dme.org
\r