From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] fix two out-of-memory checks
Date: Thu, 07 Mar 2013 08:42:13 +0100 [thread overview]
Message-ID: <513844D5.9040203@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1303032255010.25050@localhost6.localdomain6>
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
On 04.03.2013 05:07, Nickolai Zeldovich wrote:
> read_terminal_list() and read_crypto_list() both call
>
> cur->name = grub_strdup (name);
>
> and both incorrectly check whether it failed by using "if (!name)"
> instead of "if (!cur->name)". The patch below fixes these two issues.
>
Applied thanks. Your patch was garbled though. Please send as text
attachement next time.
> Nickolai.
>
> ---
>
> --- 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 @@
> }
>
> cur->name = grub_strdup (name);
> - if (! name)
> + if (! cur->name)
> {
> grub_errno = GRUB_ERR_NONE;
> grub_free (cur);
>
> --- 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 @@
> }
>
> cur->name = grub_strdup (name);
> - if (! name)
> + if (! cur->name)
> {
> grub_errno = GRUB_ERR_NONE;
> grub_free (cur);
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
prev parent reply other threads:[~2013-03-07 7:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 4:07 [PATCH] fix two out-of-memory checks Nickolai Zeldovich
2013-03-07 7:42 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=513844D5.9040203@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).