Fixed length check against wrong variable.

This commit is contained in:
Armin Novak 2013-10-02 16:48:54 +02:00
parent 918797914b
commit c5b3ee9b85

View File

@ -1869,10 +1869,10 @@ static UINT32 handle_Transmit(SMARTCARD_DEVICE* scard, IRP* irp)
/* Just check for too few bytes, there may be more actual
* data than is used due to padding. */
if (linkedLen < ioSendPci.rq->cbPciLength)
if (linkedLen < ioRecvPci.rq->cbPciLength)
{
DEBUG_WARN("SCARD_IO_REQUEST with invalid extra byte length %d [%d]",
ioSendPci.rq->cbPciLength - sizeof(SCARD_IO_REQUEST), linkedLen);
ioRecvPci.rq->cbPciLength - sizeof(SCARD_IO_REQUEST), linkedLen);
status = SCARD_F_INTERNAL_ERROR;
goto finish;
}