https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3f45a25c574e4d81efa8…
commit b3f45a25c574e4d81efa8b5ac9e7d112447e6ab8
Author: Mark Harmstone <mark(a)harmstone.com>
AuthorDate: Mon Sep 9 19:39:58 2019 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Oct 5 23:20:51 2019 +0200
[FREELDR] Fix bug in Btrfs filename lookups. (#1951)
---
boot/freeldr/freeldr/lib/fs/btrfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/freeldr/freeldr/lib/fs/btrfs.c b/boot/freeldr/freeldr/lib/fs/btrfs.c
index 2b88d6f6b39..aa12d0e066c 100644
--- a/boot/freeldr/freeldr/lib/fs/btrfs.c
+++ b/boot/freeldr/freeldr/lib/fs/btrfs.c
@@ -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;