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)
|
if (RequiredSize)
|
||||||
*RequiredSize = size;
|
*RequiredSize = size;
|
||||||
if (!l)
|
if (!PropertyBuffer)
|
||||||
|
; /* do nothing, ret is already FALSE, last error is already set */
|
||||||
|
else if (!l)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
else
|
else
|
||||||
SetLastError(l);
|
SetLastError(l);
|
||||||
@ -3119,7 +3121,9 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
|
|||||||
|
|
||||||
if (RequiredSize)
|
if (RequiredSize)
|
||||||
*RequiredSize = size;
|
*RequiredSize = size;
|
||||||
if (!l)
|
if (!PropertyBuffer)
|
||||||
|
; /* do nothing, ret is already FALSE, last error is already set */
|
||||||
|
else if (!l)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
else
|
else
|
||||||
SetLastError(l);
|
SetLastError(l);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user