Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
750000c
)
libext2fs: avoid dereferencing beyond allocated memory in xattr code
author
Theodore Ts'o
<tytso@mit.edu>
Fri, 11 Nov 2016 23:38:20 +0000
(18:38 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Fri, 11 Nov 2016 23:38:20 +0000
(18:38 -0500)
Detected by ASAN.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext_attr.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/ext_attr.c
b/lib/ext2fs/ext_attr.c
index
e8fd10c
..
5eeb940
100644
(file)
--- a/
lib/ext2fs/ext_attr.c
+++ b/
lib/ext2fs/ext_attr.c
@@
-308,7
+308,7
@@
static int find_ea_index(char *fullname, char **name, int *index)
struct ea_name_index *e;
for (e = ea_names; e->name; e++) {
- if (
mem
cmp(fullname, e->name, strlen(e->name)) == 0) {
+ if (
strn
cmp(fullname, e->name, strlen(e->name)) == 0) {
*name = (char *)fullname + strlen(e->name);
*index = e->index;
return 1;