From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UDVT8-0000nW-2a for mharc-grub-devel@gnu.org; Thu, 07 Mar 2013 02:42:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDVT5-0000k9-6o for grub-devel@gnu.org; Thu, 07 Mar 2013 02:42:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDVT4-0007pz-3s for grub-devel@gnu.org; Thu, 07 Mar 2013 02:42:23 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:36521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDVT3-0007pq-Ui for grub-devel@gnu.org; Thu, 07 Mar 2013 02:42:22 -0500 Received: by mail-wi0-f180.google.com with SMTP id hi8so40854wib.1 for ; Wed, 06 Mar 2013 23:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=Hz7gvcLqhiYINgKeXkoNwdU+nW1xgmCtOiMss79u75k=; b=aV4869BJfXhr0X2SVBdGeODi57GyimERf43ZU8EZclx9wkSsSoTMfV5FVMBnqQnwcI Zz/9vHp8Xl6bSw2RARI3fKo0MQxvyDIkftOTdUr90d5qzXJuuRW13DGupKDHs0ZGN/rL hLRY2FH2zes7TYu9vvmKxWquswc7aJ1xy0SpAfULpBMusjJAvKqNPUFZirDlxRX1f8Qz 0SBeSDqLied1Mp+fmKhxBjtHl7xmhwKB5SnAbnFg4LY3/qJAAcuGH+Bl9zqUJ1LpsZwT sp5G/uGwS7lHHDyxxakBrP6MvgHcj9+JIrfbVkFJ6FxcLyqc8lEWFoSWAyW3exXZ9sQw XJvg== X-Received: by 10.180.103.167 with SMTP id fx7mr30986152wib.15.1362642141212; Wed, 06 Mar 2013 23:42:21 -0800 (PST) Received: from debian.x201.phnet ([217.193.148.98]) by mx.google.com with ESMTPS id k5sm932891wiy.5.2013.03.06.23.42.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Mar 2013 23:42:20 -0800 (PST) Message-ID: <513844D5.9040203@gmail.com> Date: Thu, 07 Mar 2013 08:42:13 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] fix two out-of-memory checks References: In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig7D9B00573B5E35ED15F180FF" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::234 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2013 07:42:25 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7D9B00573B5E35ED15F180FF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04.03.2013 05:07, Nickolai Zeldovich wrote: > read_terminal_list() and read_crypto_list() both call >=20 > cur->name =3D grub_strdup (name); >=20 > and both incorrectly check whether it failed by using "if (!name)" > instead of "if (!cur->name)". The patch below fixes these two issues. >=20 Applied thanks. Your patch was garbled though. Please send as text attachement next time. > Nickolai. >=20 > --- >=20 > --- grub-core/normal/crypto.c 2012-03-11 13:43:18 +0000 > +++ grub-core/normal/crypto.c 2013-03-04 03:46:35 +0000 > @@ -136,7 +136,7 @@ > } >=20 > cur->name =3D grub_strdup (name); > - if (! name) > + if (! cur->name) > { > grub_errno =3D GRUB_ERR_NONE; > grub_free (cur); >=20 > --- grub-core/normal/term.c 2013-03-02 10:47:59 +0000 > +++ grub-core/normal/term.c 2013-03-04 03:46:23 +0000 > @@ -389,7 +389,7 @@ > } >=20 > cur->name =3D grub_strdup (name); > - if (! name) > + if (! cur->name) > { > grub_errno =3D GRUB_ERR_NONE; > grub_free (cur); >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 --------------enig7D9B00573B5E35ED15F180FF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlE4RNUACgkQNak7dOguQgksFQD/fmvBX+7FlNO+es7lz4w4kXzO +pgycDpW9yKO5qwgSg8BAMESjtbsU1fVteDRnPHFLyw+6tAbi7dFq1duzGoHHh7i =ZF+B -----END PGP SIGNATURE----- --------------enig7D9B00573B5E35ED15F180FF--