projects
/
wrapfs-3.14.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d840db
)
ntfs_init_locked_inode(): fix array indexing
author
Andrew Morton
<akpm@linux-foundation.org>
Sun, 22 Jul 2007 14:09:40 +0000
(16:09 +0200)
committer
Adrian Bunk
<bunk@stusta.de>
Sun, 22 Jul 2007 14:09:40 +0000
(16:09 +0200)
Local variable `i' is a byte-counter. Don't use it as an index into an array
of le32's.
Reported-by: "young dave" <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/ntfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/ntfs/inode.c
b/fs/ntfs/inode.c
index 55263b7de9c00ef6ac55cc26701ede1677cf1e18..409581aa3eebca123584dd522106917f0371b413 100644
(file)
--- a/
fs/ntfs/inode.c
+++ b/
fs/ntfs/inode.c
@@
-135,7
+135,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;
}