Re: [PATCH] notmuch-setup.c: Initialize getline(3) response_size to 0
authorCarl Worth <cworth@cworth.org>
Fri, 29 Oct 2010 20:15:42 +0000 (13:15 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:19 +0000 (09:37 -0800)
cb/9309678711dbe89fcf89799ef50e1d80d9bf35 [new file with mode: 0644]

diff --git a/cb/9309678711dbe89fcf89799ef50e1d80d9bf35 b/cb/9309678711dbe89fcf89799ef50e1d80d9bf35
new file mode 100644 (file)
index 0000000..55c7bb9
--- /dev/null
@@ -0,0 +1,84 @@
+Return-Path: <cworth@cworth.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 7448940D155\r
+       for <notmuch@notmuchmail.org>; Fri, 29 Oct 2010 13:16:04 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.89\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5\r
+       tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01]\r
+       autolearn=ham\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 7+L0jGnWIm1Y; Fri, 29 Oct 2010 13:15:54 -0700 (PDT)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 09F8540D149;\r
+       Fri, 29 Oct 2010 13:15:54 -0700 (PDT)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id 963B02540F4; Fri, 29 Oct 2010 13:15:53 -0700 (PDT)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Mike Kelly <pioto@pioto.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] notmuch-setup.c: Initialize getline(3) response_size to 0\r
+In-Reply-To: <1287080299-13828-1-git-send-email-pioto@pioto.org>\r
+References: <20101013094340.41580a2f@pioto.org>\r
+       <1287080299-13828-1-git-send-email-pioto@pioto.org>\r
+User-Agent: Notmuch/0.3.1-137-gce6390c (http://notmuchmail.org) Emacs/23.2.1\r
+       (i486-pc-linux-gnu)\r
+Date: Fri, 29 Oct 2010 13:15:42 -0700\r
+Message-ID: <87y69g69ht.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\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: Fri, 29 Oct 2010 20:16:04 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Thu, 14 Oct 2010 14:18:19 -0400, Mike Kelly <pioto@pioto.org> wrote:\r
+> This appears to be necessary on FreeBSD. If this isn't done, we get a\r
+> nasty segfault.\r
+\r
+Thanks. I've pushed this out.\r
+\r
+I didn't have that initialized originally, because the documentation I\r
+have for getline on my Linux machine says explicitly:\r
+\r
+       If *lineptr is NULL, then getline() will allocate a buffer for\r
+       storing the line, which should be freed by the user program.  (In\r
+       this case, the value in *n is ignored.)\r
+\r
+But, oh well, it's easy enough to fix.\r
+\r
+Thanks again for the patch.\r
+\r
+=2DCarl\r
+\r
+=2D-=20\r
+carl.d.worth@intel.com\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iD8DBQFMyytu6JDdNq8qSWgRAgoJAJ9L0zgJZ51Rr8W8qfNr/Ym0jU+kYQCdHqEJ\r
+ftJkKaADS0hVzu70xczA5YU=\r
+=O55N\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r