From: Johan Rydberg <jrydberg@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: GRUB 1.95 cannot read the ufs filesystem
Date: Wed, 18 Apr 2007 12:48:31 +0200 [thread overview]
Message-ID: <87hcreq7pc.fsf@gnu.org> (raw)
In-Reply-To: <000001c7811e$9f928490$030010ac@ozeki> (Hitoshi Ozeki's message of "Wed, 18 Apr 2007 03:31:32 +0900")
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
"Hitoshi Ozeki" <h-ozeki@ck2.so-net.ne.jp> 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.
Marco?
~j
[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2007-04-18 10:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 19:14 GRUB 1.95 cannot read the ufs filesystem Hitoshi Ozeki
2007-04-16 12:26 ` Johan Rydberg
2007-04-16 12:28 ` Johan Rydberg
2007-04-17 18:31 ` Hitoshi Ozeki
2007-04-18 10:48 ` Johan Rydberg [this message]
2007-04-18 10:49 ` Johan Rydberg
2007-04-18 21:13 ` Hitoshi Ozeki
2007-09-03 20:49 ` Yoshinori K. Okuji
2007-09-04 1:57 ` Bean
2007-09-19 2:35 ` Hitoshi Ozeki
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=87hcreq7pc.fsf@gnu.org \
--to=jrydberg@gnu.org \
--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.