From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1He7gU-0002aH-07 for mharc-grub-devel@gnu.org; Wed, 18 Apr 2007 06:46:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1He7gS-0002ZU-DX for grub-devel@gnu.org; Wed, 18 Apr 2007 06:46:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1He7gQ-0002Yb-US for grub-devel@gnu.org; Wed, 18 Apr 2007 06:46:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1He7gQ-0002YY-Lb for grub-devel@gnu.org; Wed, 18 Apr 2007 06:46:42 -0400 Received: from mxfep04.bredband.com ([195.54.107.79]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1He7ba-0004AZ-O6 for grub-devel@gnu.org; Wed, 18 Apr 2007 06:41:43 -0400 Received: from ironport2.bredband.com ([195.54.107.84] [195.54.107.84]) by mxfep04.bredband.com with ESMTP id <20070418104126.YOXU2732.mxfep04.bredband.com@ironport2.bredband.com> for ; Wed, 18 Apr 2007 12:41:26 +0200 Received: from c-e8df71d5.029-19-73746f13.cust.bredbandsbolaget.se (HELO localhost.localdomain) ([213.113.223.232]) by ironport2.bredband.com with ESMTP; 18 Apr 2007 12:41:21 +0200 From: Johan Rydberg To: The development of GRUB 2 In-Reply-To: <000001c7811e$9f928490$030010ac@ozeki> (Hitoshi Ozeki's message of "Wed, 18 Apr 2007 03:31:32 +0900") References: <000001c7811e$9f928490$030010ac@ozeki> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Date: Wed, 18 Apr 2007 12:49:48 +0200 Message-ID: <87fy6yq7n7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-detected-kernel: Solaris 8 (1) Subject: Re: GRUB 1.95 cannot read the ufs filesystem X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2007 10:46:44 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable "Hitoshi Ozeki" writes: > At first, When we use the 'strcmp' for the purpose of comparision C-strin= gs, > 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 =3D fpath; > char *next; > unsigned int pos =3D 0; > int dirino; >=20=20=20 > 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 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBGJffP3CqIy3K3X2ERAlkMAKC4ngAo911NAFke1qVg+36HgeIJwQCgmAdX jps/OHYpdL9HCCxaaV8XHwk= =PL0x -----END PGP SIGNATURE----- --=-=-=--