setupapi: Return FALSE if a NULL buffer is passed in.

This commit is contained in:
Juan Lang 2007-10-24 10:37:29 -07:00 committed by Alexandre Julliard
parent 1fd2bc5215
commit 4d3853ce9f

View file

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