setupapi: Error out if ReturnBuffer is NULL but ReturnBufferSize is not 0.

This commit is contained in:
James Hawkins 2006-02-09 12:12:36 +01:00 committed by Alexandre Julliard
parent a1141ee764
commit f201c9e984
1 changed files with 8 additions and 0 deletions

View File

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