https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bae6e075e0412d0a32769…
commit bae6e075e0412d0a32769aad6041c48bcf60b517
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Aug 15 20:43:01 2018 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sat Sep 29 17:11:08 2018 +0300
[UDMIHELP] Initialize output buffer if DMI string is NULL
---
sdk/lib/udmihelp/udmihelp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sdk/lib/udmihelp/udmihelp.c b/sdk/lib/udmihelp/udmihelp.c
index a7070eb33d..4b9695c4f2 100644
--- a/sdk/lib/udmihelp/udmihelp.c
+++ b/sdk/lib/udmihelp/udmihelp.c
@@ -151,7 +151,13 @@ GetSMBiosStringW(
SIZE_T cChars;
if (!DmiString)
+ {
+ if (cchBuf >= 1)
+ {
+ *pBuf = 0;
+ }
return 0;
+ }
cChars = MultiByteToWideChar(CP_OEMCP, 0, DmiString, -1, pBuf, cchBuf);