From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: strndup broken
Date: Sat, 22 Jan 2005 13:46:37 +0000 [thread overview]
Message-ID: <87brbh7f0i.fsf@marco.marco-g.com> (raw)
In-Reply-To: <CD9263C3-6C37-11D9-9A0A-000A95A0560C@penguinppc.org> (Hollis Blanchard's message of "Fri, 21 Jan 2005 23:38:11 -0600")
Hollis Blanchard <hollis@penguinppc.org> writes:
>> Can you check if it works for you? If I don't hear anything I will
>> commit it next week or so.
>
> This exposed a stupid bug I introduced months ago:
>
> --- disk/powerpc/ieee1275/ofdisk.c 27 Dec 2004 13:46:20 -0000
> 1.6
> +++ disk/powerpc/ieee1275/ofdisk.c 22 Jan 2005 05:37:16 -0000
> @@ -50,12 +50,12 @@ grub_ofdisk_open (const char *name, grub
> {
> grub_ieee1275_phandle_t dev;
> grub_ieee1275_ihandle_t dev_ihandle = 0;
> - char *devpath = 0;
> + char *devpath;
> /* XXX: This should be large enough for any possible case. */
> char prop[64];
> int actual;
>
> - devpath = grub_strndup (name, grub_strlen (devpath) + 2);
> + devpath = grub_strndup (name, grub_strlen (name) + 2);
> if (! devpath)
> return grub_errno;
>
> `devpath' is clearly NULL here.
Sorry, I don't know what you mean? If you mean this patch fixes a bug
you introduced, please write a changelog so this can be committed
ASAP. :)
> I think it's in all our best interests to get a working strndup in
> soon. :)
Yeah! I guess you mean that you have tested grub_strndup and that it
works? In that case please tell me so I can apply it now. :)
Thanks,
Marco
prev parent reply other threads:[~2005-01-22 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-08 23:48 strndup broken Hollis Blanchard
2005-01-21 20:19 ` Marco Gerards
2005-01-22 5:38 ` Hollis Blanchard
2005-01-22 13:46 ` Marco Gerards [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=87brbh7f0i.fsf@marco.marco-g.com \
--to=metgerards@student.han.nl \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.