winprint: Fix parameters validation in EnumPrintProcessorDatatypesW.

This commit is contained in:
Piotr Caban 2022-12-03 18:42:10 +01:00 committed by Alexandre Julliard
parent 0538557512
commit a98fb06a5b

View file

@ -81,7 +81,7 @@ BOOL WINAPI EnumPrintProcessorDatatypesW(WCHAR *server, WCHAR *name, DWORD level
*no = 0;
*needed = sizeof(*info) + sizeof(raw);
if (level != 1 || !datatypes)
if (level != 1 || (size && !datatypes))
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;