winspool: More error checks for XcvDataW.

This commit is contained in:
Detlef Riekenberg 2007-01-15 05:38:28 +01:00 committed by Alexandre Julliard
parent 619621d9ea
commit b86a7644d9
1 changed files with 12 additions and 0 deletions

View File

@ -6684,6 +6684,18 @@ BOOL WINAPI XcvDataW( HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
return FALSE;
}
if (!pcbOutputNeeded) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!pszDataName || !pdwStatus || (!pOutputData && (cbOutputData > 0))) {
SetLastError(RPC_X_NULL_REF_POINTER);
return FALSE;
}
*pcbOutputNeeded = 0;
*pdwStatus = printer->pm->monitor->pfnXcvDataPort(printer->hXcv, pszDataName,
pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);