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:
ae73e88
)
e2fsck: fix spurious duplicate directory entries with encrypted filenames
author
Theodore Ts'o
<tytso@mit.edu>
Mon, 2 Mar 2015 16:40:18 +0000
(11:40 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 2 Mar 2015 16:40:18 +0000
(11:40 -0500)
Use memcmp() instead of strncmp() since encrypted directory names can
contain NUL characters. For non-encrypted directories, we've already
checked for the case of NUL characters in file names, so it's safe to
use memcmp() here in all cases.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass2.c
patch
|
blob
|
history
diff --git
a/e2fsck/pass2.c
b/e2fsck/pass2.c
index
33e4854
..
a6624f4
100644
(file)
--- a/
e2fsck/pass2.c
+++ b/
e2fsck/pass2.c
@@
-314,7
+314,7
@@
static int dict_de_cmp(const void *a, const void *b)
if (a_len != b_len)
return (a_len - b_len);
- return
strn
cmp(de_a->name, de_b->name, a_len);
+ return
mem
cmp(de_a->name, de_b->name, a_len);
}
/*