projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c356804
)
[UDMIHELP] Initialize output buffer if DMI string is NULL
author
Stanislav Motylkov
<x86corez@gmail.com>
Wed, 15 Aug 2018 17:43:01 +0000
(20:43 +0300)
committer
Stanislav Motylkov
<x86corez@gmail.com>
Sat, 29 Sep 2018 14:11:08 +0000
(17:11 +0300)
sdk/lib/udmihelp/udmihelp.c
patch
|
blob
|
history
diff --git
a/sdk/lib/udmihelp/udmihelp.c
b/sdk/lib/udmihelp/udmihelp.c
index
a7070eb
..
4b9695c
100644
(file)
--- a/
sdk/lib/udmihelp/udmihelp.c
+++ b/
sdk/lib/udmihelp/udmihelp.c
@@
-151,7
+151,13
@@
GetSMBiosStringW(
SIZE_T cChars;
if (!DmiString)
SIZE_T cChars;
if (!DmiString)
+ {
+ if (cchBuf >= 1)
+ {
+ *pBuf = 0;
+ }
return 0;
return 0;
+ }
cChars = MultiByteToWideChar(CP_OEMCP, 0, DmiString, -1, pBuf, cchBuf);
cChars = MultiByteToWideChar(CP_OEMCP, 0, DmiString, -1, pBuf, cchBuf);