Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270448AbTHLOv1 (ORCPT ); Tue, 12 Aug 2003 10:51:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270385AbTHLOup (ORCPT ); Tue, 12 Aug 2003 10:50:45 -0400 Received: from i238006.ppp.asahi-net.or.jp ([61.125.238.6]:20722 "EHLO mitou.y-sato.ddo.jp") by vger.kernel.org with ESMTP id S270352AbTHLOuH (ORCPT ); Tue, 12 Aug 2003 10:50:07 -0400 Date: Tue, 12 Aug 2003 23:50:06 +0900 Message-ID: From: Yoshinori Sato To: linux kernel Mailing List Subject: Re: generic strncpy - off-by-one error In-Reply-To: References: User-Agent: Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 591 Lines: 22 I made a mistake. This is a good patch. --- lib/string.c~ 2003-08-09 20:30:36.000000000 +0900 +++ lib/string.c 2003-08-12 23:27:08.000000000 +0900 @@ -89,7 +89,7 @@ while (count && (*dest++ = *src++) != '\0') count--; - while (count) { + while (count > 1) { *dest++ = 0; count--; } -- Yoshinori Sato - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/