Re: [PATCH] fixed return value check of sysoncf in get_name_from_passwd_file / get_us...
authorCarl Worth <cworth@cworth.org>
Thu, 26 May 2011 22:55:28 +0000 (15:55 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:24 +0000 (09:38 -0800)
f8/5475190cbf7bed5987cdc3100e55a45b88ccbf [new file with mode: 0644]

diff --git a/f8/5475190cbf7bed5987cdc3100e55a45b88ccbf b/f8/5475190cbf7bed5987cdc3100e55a45b88ccbf
new file mode 100644 (file)
index 0000000..c9341a1
--- /dev/null
@@ -0,0 +1,83 @@
+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 14F05429E25\r
+       for <notmuch@notmuchmail.org>; Thu, 26 May 2011 15:55:36 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.01\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
+       tests=[T_MIME_NO_TEXT=0.01] 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 zK3xwSNUXRdG for <notmuch@notmuchmail.org>;\r
+       Thu, 26 May 2011 15:55:35 -0700 (PDT)\r
+Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
+       by olra.theworths.org (Postfix) with ESMTP id A8B60431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 26 May 2011 15:55:35 -0700 (PDT)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by arlo.cworth.org (Postfix) with ESMTP id ADE1B29A511;\r
+       Thu, 26 May 2011 15:55:34 -0700 (PDT)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id 587F125417E; Thu, 26 May 2011 15:55:34 -0700 (PDT)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Matthias Guedemann <matthias.guedemann@ovgu.de>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] fixed return value check of sysoncf in\r
+       get_name_from_passwd_file / get_username_from_passwd_file\r
+In-Reply-To: <86mxibezhw.fsf@pc44es141.cs.uni-magdeburg.de>\r
+References: <86mxibezhw.fsf@pc44es141.cs.uni-magdeburg.de>\r
+User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i486-pc-linux-gnu)\r
+Date: Thu, 26 May 2011 15:55:28 -0700\r
+Message-ID: <8762oxcbrz.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: Thu, 26 May 2011 22:55:36 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Wed, 25 May 2011 14:27:55 +0200, Matthias Guedemann <matthias.guedemann@=\r
+ovgu.de> wrote:\r
+>=20\r
+> When trying to port notmuch to DragonFlyBSD I found it core dumped\r
+> immediately. The reason was that the "sysconf(_SC_GETPW_R_SIZE_MAX)"\r
+> call returned -1 which is used for talloc memory allocation. The check\r
+> was there but was done _after_ the allocation, the attached patch fixes\r
+> this.\r
+\r
+Thanks for the (obvious in hindsight) fix, Matthias.\r
+\r
+I've pushed this out now.\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.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk3e2mAACgkQ6JDdNq8qSWgchQCfVcypNYekCkYoLblxjZ0ByA6j\r
+pGQAnRKhwrA+/eNaT7TURgPNpFIuNHQ7\r
+=0upa\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r