[UDMIHELP] Initialize output buffer if DMI string is NULL

This commit is contained in:
Stanislav Motylkov 2018-08-15 20:43:01 +03:00
parent c356804550
commit bae6e075e0
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92

View file

@ -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);