https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9215413a684c0592b8e3c…
commit 9215413a684c0592b8e3ccfc97bda99fc5f79e2c
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Nov 30 12:04:14 2019 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Jan 18 13:19:22 2020 +0100
[FLTMGR] Safely query object name in FltpGetObjectName. CID 1420811
---
drivers/filters/fltmgr/Object.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/filters/fltmgr/Object.c b/drivers/filters/fltmgr/Object.c
index 8173f6376a0..db32f48e578 100644
--- a/drivers/filters/fltmgr/Object.c
+++ b/drivers/filters/fltmgr/Object.c
@@ -263,8 +263,8 @@ NTSTATUS
FltpGetObjectName(_In_ PVOID Object,
_Inout_ PUNICODE_STRING ObjectName)
{
- POBJECT_NAME_INFORMATION ObjectNameInfo = NULL;
OBJECT_NAME_INFORMATION LocalNameInfo;
+ POBJECT_NAME_INFORMATION ObjectNameInfo = &LocalNameInfo;
ULONG ReturnLength;
NTSTATUS Status;
@@ -310,7 +310,7 @@ FltpGetObjectName(_In_ PVOID Object,
}
}
- if (ObjectNameInfo)
+ if (ObjectNameInfo != &LocalNameInfo)
{
ExFreePoolWithTag(ObjectNameInfo, FM_TAG_UNICODE_STRING);
}