grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strndup broken


From: Marco Gerards
Subject: Re: strndup broken
Date: Sat, 22 Jan 2005 13:46:37 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hollis Blanchard <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]