setupapi: Return FALSE if a NULL buffer is passed in.
This commit is contained in:
parent
1fd2bc5215
commit
4d3853ce9f
|
@ -3065,7 +3065,9 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyA(
|
|||
|
||||
if (RequiredSize)
|
||||
*RequiredSize = size;
|
||||
if (!l)
|
||||
if (!PropertyBuffer)
|
||||
; /* do nothing, ret is already FALSE, last error is already set */
|
||||
else if (!l)
|
||||
ret = TRUE;
|
||||
else
|
||||
SetLastError(l);
|
||||
|
@ -3119,7 +3121,9 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
|
|||
|
||||
if (RequiredSize)
|
||||
*RequiredSize = size;
|
||||
if (!l)
|
||||
if (!PropertyBuffer)
|
||||
; /* do nothing, ret is already FALSE, last error is already set */
|
||||
else if (!l)
|
||||
ret = TRUE;
|
||||
else
|
||||
SetLastError(l);
|
||||
|
|
Loading…
Reference in New Issue