[FREELDR] Fix bug in Btrfs filename lookups. (#1951)

This commit is contained in:
Mark Harmstone 2019-09-09 19:39:58 +01:00 committed by Hermès Bélusca-Maïto
parent a7f97cc70f
commit b3f45a25c5
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -619,7 +619,7 @@ static BOOLEAN BtrFsLookupDirItemI(const struct btrfs_root_item *root, u64 dir_h
name_buf = (char *) item + sizeof(*item);
TRACE("Compare names %.*s and %.*s\n", name_len, name, item->name_len, name_buf);
if (_strnicmp(name, name_buf, name_len) == 0)
if (name_len == item->name_len && _strnicmp(name, name_buf, name_len) == 0)
{
*ret_item = *item;
result = TRUE;