Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MaeHE-0002V0-9G for mharc-grub-devel@gnu.org; Mon, 10 Aug 2009 19:27:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaeHD-0002TE-4w for grub-devel@gnu.org; Mon, 10 Aug 2009 19:27:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaeH8-0002OU-M6 for grub-devel@gnu.org; Mon, 10 Aug 2009 19:27:38 -0400 Received: from [199.232.76.173] (port=48182 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaeH8-0002OR-Iv for grub-devel@gnu.org; Mon, 10 Aug 2009 19:27:34 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:39254) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaeH8-0007nl-7N for grub-devel@gnu.org; Mon, 10 Aug 2009 19:27:34 -0400 Received: by bwz22 with SMTP id 22so3188622bwz.42 for ; Mon, 10 Aug 2009 16:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=mEyTpGfIyt7xOJapKohE14nCz5IkTUi6VSkKrg4U+os=; b=TB8GbLSmGCPMgHSho9Ry/f5AOvNPhBlI/7raSzWDC8hSvsUeaJ/bwmuXIZgVXY7RVE U/DgSG+SVWUobcgYTsQJlspTXwac0IFeXGKSAFsRpxlMKQ2Utehm5kB2dV3caYN12iq3 +ObtA8GPKGLG7shKiBHUvvbpppFif1VM5mCG8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Jq0A0VMhMNaU1c0CnP7YZr8TTCOJBIIR2SyQZ8xym9NqN2ikaaRdRo44vv35bh+WqU LtnX2SgmrAjyrLvzj8TvD3g0Q1ocS6jmAYV/0LxEiepbsrF5pSu5egZB8fzX05huwzZM H/U7rSPtRwJHIfBwFSEsYdkotaXi59wS8yd/E= MIME-Version: 1.0 Received: by 10.204.60.212 with SMTP id q20mr6436335bkh.200.1249946852599; Mon, 10 Aug 2009 16:27:32 -0700 (PDT) In-Reply-To: References: Date: Tue, 11 Aug 2009 01:27:32 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: HFS endianness 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: Mon, 10 Aug 2009 23:27:39 -0000 On Tue, Aug 11, 2009 at 1:15 AM, Vladimir 'phcoder' Serbinenko wrote: > Hello I was looking which FS were little and which are big-endian. > This attracted my attention in hfs.c: > =A0/* Adjust len so it we can't read past the end of the file. =A0*/ > =A0if (len > grub_le_to_cpu32 (data->size)) > =A0 =A0len =3D grub_le_to_cpu32 (data->size); > Which looks suspicious for big-endian FS. Can anyone check? If note > this mail will be note to self > Actualy this code has another bug it doesn't take 'pos' into account. Unfortunately same bug is present on several other FSes. I'll look through them and will send a patch > -- > Regards > Vladimir 'phcoder' Serbinenko > > Personal git repository: http://repo.or.cz/w/grub2/phcoder.git > --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git