[Top][All Lists]

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

Re: GRUB 1.95 cannot read the ufs filesystem

From: Johan Rydberg
Subject: Re: GRUB 1.95 cannot read the ufs filesystem
Date: Wed, 18 Apr 2007 12:49:48 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

"Hitoshi Ozeki" <address@hidden> writes:

> At first, When we use the 'strcmp' for the purpose of comparision C-strings,
> It requires to terminate with the NIL sentry('\0').
> ----begin-------------------------------
> grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
> {
>   char fpath[grub_strlen (path)];  <-- not enough.
>   char *name = fpath;
>   char *next;
>   unsigned int pos = 0;
>   int dirino;
>   grub_strncpy (fpath, path, grub_strlen (path));   <--without NIL.
> ----end---------------------------------

It feels easier to just add +1 at both the location.  Can anyone else
comment on this, please?

> The '.label' should set to 0.
> On the original code, The 'label' function returns the invalid pointer,
> so the 'ls -l' command gets wrong.



Attachment: pgpKqiHQC2Soh.pgp
Description: PGP signature

reply via email to

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