Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1fc799e1b4efdbc405d87d9f154d64d9bc299e5c
Commit:     1fc799e1b4efdbc405d87d9f154d64d9bc299e5c
Parent:     ebdf7d399e67499dbd2a6b5154805fb049846cbb
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Thu May 31 00:40:49 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu May 31 07:58:13 2007 -0700

    ntfs_init_locked_inode(): fix array indexing
    
    Local variable `i' is a byte-counter.  Don't use it as an index into an 
array
    of le32's.
    
    Reported-by: "young dave" <[EMAIL PROTECTED]>
    Cc: "Christoph Lameter" <[EMAIL PROTECTED]>
    Acked-by: Anton Altaparmakov <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Cc: Adrian Bunk <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ntfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 074791c..b532a73 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -140,7 +140,7 @@ static int ntfs_init_locked_inode(struct inode *vi, 
ntfs_attr *na)
                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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to