https://git.reactos.org/?p=reactos.git;a=commitdiff;h=93c0d324e0b4b1fe0b4cc…
commit 93c0d324e0b4b1fe0b4cc9c15e24f6e99d7076cd
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Thu Jun 17 17:24:34 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Mon Jun 28 10:20:57 2021 +0200
[NTOS:EX] Do not ignore RtlAnsiStringToUnicodeString return value
CORE-17637
---
ntoskrnl/ex/sysinfo.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index f02f0a1cce1..7a57c8d2c33 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -1008,7 +1008,11 @@ QSI_DEF(SystemProcessInformation)
else
{
RtlInitAnsiString(&ImageName, Process->ImageFileName);
- RtlAnsiStringToUnicodeString(&SpiCurrent->ImageName,
&ImageName, FALSE);
+ Status =
RtlAnsiStringToUnicodeString(&SpiCurrent->ImageName, &ImageName, FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ SpiCurrent->ImageName.Length = 0;
+ }
}
}
else