setupapi: Error out if ReturnBuffer is NULL but ReturnBufferSize is not 0.
This commit is contained in:
parent
a1141ee764
commit
f201c9e984
|
@ -168,7 +168,15 @@ BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,
|
|||
*RequiredSize = size;
|
||||
|
||||
if (!ReturnBuffer)
|
||||
{
|
||||
if (ReturnBufferSize)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (size > ReturnBufferSize)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue