Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"
authorJani Nikula <jani@nikula.org>
Sat, 7 Jan 2012 07:31:35 +0000 (09:31 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:42 +0000 (09:41 -0800)
ce/773f5e3b2cec45d1445cfbeff539d391d6942e [new file with mode: 0644]

diff --git a/ce/773f5e3b2cec45d1445cfbeff539d391d6942e b/ce/773f5e3b2cec45d1445cfbeff539d391d6942e
new file mode 100644 (file)
index 0000000..a6385fe
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C7874409F24\r
+       for <notmuch@notmuchmail.org>; Fri,  6 Jan 2012 23:31:38 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ljgEtkjvzolL for <notmuch@notmuchmail.org>;\r
+       Fri,  6 Jan 2012 23:31:38 -0800 (PST)\r
+Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
+       [209.85.210.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 05B80409F22\r
+       for <notmuch@notmuchmail.org>; Fri,  6 Jan 2012 23:31:37 -0800 (PST)\r
+Received: by dady9 with SMTP id y9so3170649dad.26\r
+       for <notmuch@notmuchmail.org>; Fri, 06 Jan 2012 23:31:36 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.68.74.10 with SMTP id p10mr21813949pbv.3.1325921495682; Fri,\r
+       06 Jan 2012 23:31:35 -0800 (PST)\r
+Received: by 10.68.58.7 with HTTP; Fri, 6 Jan 2012 23:31:35 -0800 (PST)\r
+Received: by 10.68.58.7 with HTTP; Fri, 6 Jan 2012 23:31:35 -0800 (PST)\r
+In-Reply-To: <87sjjsjhjk.fsf@zancas.localnet>\r
+References: <cover.1325794371.git.jani@nikula.org>\r
+       <974a2ef1f1df7d93e0b5bd642ca8a49f8b727a86.1325794371.git.jani@nikula.org>\r
+       <87sjjsjhjk.fsf@zancas.localnet>\r
+Date: Sat, 7 Jan 2012 09:31:35 +0200\r
+Message-ID:\r
+ <CAB+hUn9cWzDYK7ZvKWvsU=cCNuU80ERR8gT+T_Tu=SfMXH7K5A@mail.gmail.com>\r
+Subject: Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch\r
+       reply"\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>\r
+Content-Type: multipart/alternative; boundary=f46d04138ecdc00d7104b5eb277e\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 07 Jan 2012 07:31:39 -0000\r
+\r
+--f46d04138ecdc00d7104b5eb277e\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+On Jan 7, 2012 5:52 AM, "David Bremner" <david@tethera.net> wrote:\r
+>\r
+> On Thu,  5 Jan 2012 22:25:12 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+> > notmuch_show_params_t params is only initialized partially in\r
+> > notmuch_reply_command(). The only field that is used uninitialized is\r
+> > params.decrypt. It is usually non-zero, making "notmuch reply" on\r
+encrypted\r
+> > messages work by coincidence.\r
+>\r
+> Hi Jani;\r
+>\r
+> I get one test failure with this patch on current master:\r
+\r
+Can't investigate right now, but did you try with just patch 1/4? (I really\r
+should have separated the bug fix from the rest.)\r
+\r
+J.\r
+\r
+>\r
+>  FAIL   Reply within emacs\r
+>        --- emacs.24.expected   2012-01-07 03:47:50.000000000 +0000\r
+>        +++ emacs.24.output     2012-01-07 03:47:50.000000000 +0000\r
+>        @@ -1,5 +1,5 @@\r
+>         From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+>        -To: user@example.com\r
+>        +To:\r
+>         Subject: Re: Testing message sent via SMTP\r
+>         In-Reply-To: <XXX>\r
+>         Fcc: /tmp/notmuch-dev-bremner/test/tmp.emacs/mail/sent\r
+>\r
+> d\r
+\r
+--f46d04138ecdc00d7104b5eb277e\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p><br>\r
+On Jan 7, 2012 5:52 AM, &quot;David Bremner&quot; &lt;<a href=3D"mailto:dav=\r
+id@tethera.net">david@tethera.net</a>&gt; wrote:<br>\r
+&gt;<br>\r
+&gt; On Thu, =C2=A05 Jan 2012 22:25:12 +0200, Jani Nikula &lt;<a href=3D"ma=\r
+ilto:jani@nikula.org">jani@nikula.org</a>&gt; wrote:<br>\r
+&gt; &gt; notmuch_show_params_t params is only initialized partially in<br>\r
+&gt; &gt; notmuch_reply_command(). The only field that is used uninitialize=\r
+d is<br>\r
+&gt; &gt; params.decrypt. It is usually non-zero, making &quot;notmuch repl=\r
+y&quot; on encrypted<br>\r
+&gt; &gt; messages work by coincidence.<br>\r
+&gt;<br>\r
+&gt; Hi Jani;<br>\r
+&gt;<br>\r
+&gt; I get one test failure with this patch on current master:</p>\r
+<p>Can&#39;t investigate right now, but did you try with just patch 1/4? (I=\r
+ really should have separated the bug fix from the rest.)</p>\r
+<p>J.<br><br></p>\r
+<p>&gt;<br>\r
+&gt; =C2=A0FAIL =C2=A0 Reply within emacs<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0--- emacs.24.expected =C2=A0 2012-01-07 03:=\r
+47:50.000000000 +0000<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0+++ emacs.24.output =C2=A0 =C2=A0 2012-01-0=\r
+7 03:47:50.000000000 +0000<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0@@ -1,5 +1,5 @@<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 From: Notmuch Test Suite &lt;<a href=3D"ma=\r
+ilto:test_suite@notmuchmail.org">test_suite@notmuchmail.org</a>&gt;<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0-To: <a href=3D"mailto:user@example.com">us=\r
+er@example.com</a><br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0+To:<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 Subject: Re: Testing message sent via SMTP=\r
+<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 In-Reply-To: &lt;XXX&gt;<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fcc: /tmp/notmuch-dev-bremner/test/tmp.ema=\r
+cs/mail/sent<br>\r
+&gt;<br>\r
+&gt; d<br>\r
+</p>\r
+\r
+--f46d04138ecdc00d7104b5eb277e--\r