https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6363f7820dbe6a7a3b3f4e...
commit 6363f7820dbe6a7a3b3f4e73d5e0bbc30d787a4b Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sun Dec 29 22:16:34 2024 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Mon Jan 6 21:30:18 2025 +0100
[NTOS:IO] Fix special case in IopQueryNameInternal() (#7592)
CORE-13525
This case is invoked from NtQueryObject(ObjectNameInformation). --- ntoskrnl/io/iomgr/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c index bfe11ab295b..865cd52fc78 100644 --- a/ntoskrnl/io/iomgr/file.c +++ b/ntoskrnl/io/iomgr/file.c @@ -2108,10 +2108,11 @@ IopQueryNameInternal(IN PVOID ObjectBody, _SEH2_LEAVE; }
- /* In such case, zero output */ + /* In such case, zero the output and reset the status */ LocalReturnLength = FIELD_OFFSET(FILE_NAME_INFORMATION, FileName); LocalFileInfo->FileNameLength = 0; LocalFileInfo->FileName[0] = OBJ_NAME_PATH_SEPARATOR; + Status = STATUS_SUCCESS; } else {