Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BaCAq-0000WE-7z for mharc-grub-devel@gnu.org; Tue, 15 Jun 2004 07:32:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BaCAo-0000Vr-4N for grub-devel@gnu.org; Tue, 15 Jun 2004 07:32:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BaCAn-0000Vf-3n for grub-devel@gnu.org; Tue, 15 Jun 2004 07:32:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BaCAn-0000Vc-0j for grub-devel@gnu.org; Tue, 15 Jun 2004 07:32:13 -0400 Received: from [195.113.31.125] (helo=artax.karlin.mff.cuni.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BaC9i-0006ah-0b for grub-devel@gnu.org; Tue, 15 Jun 2004 07:31:06 -0400 Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17122) id B456C43B2; Tue, 15 Jun 2004 13:31:03 +0200 (CEST) Date: Tue, 15 Jun 2004 13:31:03 +0200 To: grub-devel@gnu.org Message-ID: <20040615113103.GA4639@artax.karlin.mff.cuni.cz> Mail-Followup-To: grub-devel@gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i From: ebik@artax.karlin.mff.cuni.cz (Tomas Ebenlendr) Subject: normal/cmdline bug & patch X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.4 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: Tue, 15 Jun 2004 11:32:14 -0000 My grub sumetimes prevent to boot / unload normal mode. Here is patch after 2 days work. (I made grub to log to LPT, this can bochs save to file, it is not clean patch, so I don't post it here.) Here is bugfix: "hist_end - i" cannot be greater than hist_size, but it can be smaller than zero --- grub2_x/normal/cmdline.c 2004-06-05 00:20:18.000000000 +0200 +++ grub2_patched/normal/cmdline.c 2004-06-15 13:18:59.000000000 +0200 @@ -55,8 +55,8 @@ for (i = 0; i < delsize; i++) { int pos = hist_end - i; - if (pos > hist_size) - pos -= hist_size; + if (pos < hist_size) + pos += hist_size; grub_free (old_hist_lines[pos]); } -- Tomas 'ebi' Ebenlendr http://get.to/ebik PF 2004.45508177747