Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939954AbXFHH7O (ORCPT ); Fri, 8 Jun 2007 03:59:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S938428AbXFHHZp (ORCPT ); Fri, 8 Jun 2007 03:25:45 -0400 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:55394 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938008AbXFHHZn (ORCPT ); Fri, 8 Jun 2007 03:25:43 -0400 Message-Id: <20070608072206.004104000@sous-sol.org> References: <20070608072127.352723000@sous-sol.org> User-Agent: quilt/0.46-1 Date: Fri, 08 Jun 2007 00:21:49 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, "Christoph Lameter" , Anton Altaparmakov , Adrian Bunk , Greg Kroah-Hartman Subject: [patch 22/54] ntfs_init_locked_inode(): fix array indexing Content-Disposition: inline; filename=ntfs_init_locked_inode-fix-array-indexing.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 39 -stable review patch. If anyone has any objections, please let us know. --------------------- From: Andrew Morton Local variable `i' is a byte-counter. Don't use it as an index into an array of le32's. Reported-by: "young dave" Cc: "Christoph Lameter" Acked-by: Anton Altaparmakov Cc: Cc: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- fs/ntfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.21.4.orig/fs/ntfs/inode.c +++ linux-2.6.21.4/fs/ntfs/inode.c @@ -141,7 +141,7 @@ static int ntfs_init_locked_inode(struct if (!ni->name) return -ENOMEM; memcpy(ni->name, na->name, i); - ni->name[i] = 0; + ni->name[na->name_len] = 0; } return 0; } -- - 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/