https://git.reactos.org/?p=reactos.git;a=commitdiff;h=230e6b94926dd58c1105e…
commit 230e6b94926dd58c1105e67e0a6702cbb9c7394b
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Thu Jun 17 17:49:40 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Mon Jun 28 10:20:57 2021 +0200
[NTOS:INBV] Do not ignore RtlUnicodeStringToOemString return value
CORE-17637
---
ntoskrnl/inbv/inbv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c
index ae7ca62f6f8..78da5d5dd84 100644
--- a/ntoskrnl/inbv/inbv.c
+++ b/ntoskrnl/inbv/inbv.c
@@ -960,7 +960,12 @@ NtDisplayString(IN PUNICODE_STRING DisplayString)
Status = STATUS_NO_MEMORY;
goto Quit;
}
- RtlUnicodeStringToOemString(&OemString, &CapturedString, FALSE);
+ Status = RtlUnicodeStringToOemString(&OemString, &CapturedString, FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ ExFreePoolWithTag(OemString.Buffer, TAG_OSTR);
+ goto Quit;
+ }
/* Display the string */
InbvDisplayString(OemString.Buffer);