mirror of https://github.com/vitalif/e2fsprogs
e2fsck: fix spurious duplicate directory entries with encrypted filenames
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>debian
parent
ae73e88e82
commit
baa14bd17f
|
@ -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 strncmp(de_a->name, de_b->name, a_len);
|
||||
return memcmp(de_a->name, de_b->name, a_len);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue