From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JMoIU-00014V-A2 for mharc-grub-devel@gnu.org; Wed, 06 Feb 2008 12:42:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMoIT-00012s-0k for grub-devel@gnu.org; Wed, 06 Feb 2008 12:42:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMoIR-00010l-5C for grub-devel@gnu.org; Wed, 06 Feb 2008 12:42:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMoIQ-00010b-Qh for grub-devel@gnu.org; Wed, 06 Feb 2008 12:42:54 -0500 Received: from mailout11.sul.t-online.de ([194.25.134.85] helo=mailout11.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMoIQ-0008KU-LP for grub-devel@gnu.org; Wed, 06 Feb 2008 12:42:54 -0500 Received: from fwd31.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1JMoIP-0002Fl-03; Wed, 06 Feb 2008 18:42:53 +0100 Received: from [10.3.2.2] (Z4tR7cZBrhAgMF3J9VNPRsxSqVv3onNkrPdSc4uZVSsAbDxBhXv5Pe-5cMQmqcUwPP@[217.235.192.71]) by fwd31.aul.t-online.de with esmtp id 1JMoHw-2EcqeG0; Wed, 6 Feb 2008 18:42:24 +0100 Message-ID: <47A9F17A.7090209@t-online.de> Date: Wed, 06 Feb 2008 18:42:18 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: The development of GRUB 2 References: <47A8EB0D.6070103@t-online.de> <20080206002439.GC2704@thorin> In-Reply-To: <20080206002439.GC2704@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: Z4tR7cZBrhAgMF3J9VNPRsxSqVv3onNkrPdSc4uZVSsAbDxBhXv5Pe-5cMQmqcUwPP X-TOI-MSGID: d494958e-e2dc-4b38-9f86-fdd72fe4ada0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Fix crash on open of nonexisting tar/cpio file, fix cpio trailer detection 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, 06 Feb 2008 17:42:57 -0000 Robert Millan wrote: > >> 2008-02-05 Christian Franke >> >> * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE >> and (*ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on last >> > > I would suggest "(and set *ofs = 0)" here to make it clearer. > > OK. 2008-02-06 Christian Franke * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on last block of a cpio or tar stream. Check for "TRAILER!!!" instead of any empty data block to detect last block of a cpio stream. (grub_cpio_dir): Fix constness of variable np. (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if cpio or tar trailer is detected. This fixes a crash on open of a non existing file.