winspool: More error checks for XcvDataW.
This commit is contained in:
parent
619621d9ea
commit
b86a7644d9
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue