Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Jl3fS-0007zk-WF for mharc-grub-devel@gnu.org; Sun, 13 Apr 2008 10:58:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jl3fR-0007yf-8s for grub-devel@gnu.org; Sun, 13 Apr 2008 10:58:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jl3fP-0007x2-Lt for grub-devel@gnu.org; Sun, 13 Apr 2008 10:58:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jl3fP-0007ws-IT for grub-devel@gnu.org; Sun, 13 Apr 2008 10:58:51 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jl3fP-0003Zw-A3 for grub-devel@gnu.org; Sun, 13 Apr 2008 10:58:51 -0400 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Jl3fN-0006bz-PO for grub-devel@gnu.org; Sun, 13 Apr 2008 16:58:50 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Jl3f4-0006xj-FA for grub-devel@gnu.org; Sun, 13 Apr 2008 16:58:30 +0200 Date: Sun, 13 Apr 2008 16:58:30 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080413145830.GA25883@thorin> References: <000001c88a35$7994bdf0$5101670a@zhanghuan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <000001c88a35$7994bdf0$5101670a@zhanghuan> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: bug fixed on grub_strncat() 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: Sun, 13 Apr 2008 14:58:54 -0000 Both fixed, thank you! On Thu, Mar 20, 2008 at 10:52:45AM +0800, zhanghuan wrote: > grub_strncat() eats the last char copid from 'dest', this patch should fix it. > > diff -ur grub-1.96/kern/misc.c grub-1.96fix/kern/misc.c > --- grub-1.96/kern/misc.c 2008-02-03 21:11:31.000000000 +0800 > +++ grub-1.96fix/kern/misc.c 2008-03-20 10:39:36.000000000 +0800 > @@ -110,7 +110,8 @@ > > while ((*p++ = *src++) != '\0' && --c) > ; > - *(--p) = '\0'; > + if (!c) > + *(p) = '\0'; > > > > PS: no body cares about previous patch I sent?? > I put it below, it is easy to understand when you read it. > > diff -ur grub-1.96/kern/env.c grub-1.96fix/kern/env.c > --- grub-1.96/kern/env.c 2008-01-06 15:15:07.000000000 +0800 > +++ grub-1.96fix/kern/env.c 2008-03-12 10:02:07.000000000 +0800 > @@ -124,7 +124,7 @@ > { > struct grub_env_var *p, *q; > > - for (p = current_context->prev->vars[i]; p; p = q) > + for (p = current_context->vars[i]; p; p = q) > { > q = p->next; > grub_free (p); > > > Zhang Huan > Tel: (86)10-6260-0549 > Mailing: P. O. Box 2704# Beijing > Postcode: 100080 > National Research Centre for High Performance Computers > Institute of Computing Technology, Chinese Academy of Sciences > No. 6, South Kexueyuan Road, Haidian District > Beijing, China > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)