Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FTaiJ-0004ED-F8 for mharc-grub-devel@gnu.org; Wed, 12 Apr 2006 04:28:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTaiH-0004Df-Kq for grub-devel@gnu.org; Wed, 12 Apr 2006 04:28:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTaiF-0004DD-Va for grub-devel@gnu.org; Wed, 12 Apr 2006 04:28:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTaiF-0004D9-PM for grub-devel@gnu.org; Wed, 12 Apr 2006 04:28:31 -0400 Received: from [194.109.24.34] (helo=smtp-vbr14.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTanI-0006Ff-SD for grub-devel@gnu.org; Wed, 12 Apr 2006 04:33:45 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr14.xs4all.nl (8.13.6/8.13.6) with ESMTP id k3C8S9Zv008610; Wed, 12 Apr 2006 10:28:10 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: Lubomir Kundrak References: <20060411120822.GF48945@meta.morph.sk> <20060412060630.GG48945@meta.morph.sk> From: Marco Gerards Date: Wed, 12 Apr 2006 10:29:17 +0200 In-Reply-To: <20060412060630.GG48945@meta.morph.sk> (Lubomir Kundrak's message of "Wed, 12 Apr 2006 08:06:30 +0200") Message-ID: <87hd4ztcwy.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Cc: grub-devel@gnu.org Subject: Re: [patch] strncpy misuse in ufs.c] 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, 12 Apr 2006 08:28:34 -0000 Lubomir Kundrak writes: > EEh.... should actually read > > --- ufs.c.orig 2006-04-10 12:17:10.000000000 +0200 > +++ ufs.c 2006-04-10 12:17:32.000000000 +0200 > @@ -400,7 +400,7 @@ > unsigned int pos = 0; > int dirino; > > - grub_strncpy (fpath, path, grub_strlen (path)); > + grub_strncpy (fpath, path, sizeof (fpath)+); Why the floating plus? Isn't this wrong? Can you please explain what the patch exactly fixes and why the current code is wrong? Also, please submit a changelog entry. -- Marco