Skip to content

Commit

Permalink
reader-pcsc: Avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakuje committed Feb 12, 2024
1 parent 8b4cdc4 commit 67b85ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libopensc/reader-pcsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ static int pcsc_internal_transmit(sc_reader_t *reader,
rv = priv->gpriv->SCardTransmit(card, &sSendPci, sendbuf, dwSendLength,
&sRecvPci, recvbuf, &dwRecvLength);
} else {
if (!priv->gpriv->SCardControlOLD) {
if (priv->gpriv->SCardControlOLD) {
rv = priv->gpriv->SCardControlOLD(card, sendbuf, dwSendLength,
recvbuf, &dwRecvLength);
} else if (!priv->gpriv->SCardControl) {
} else if (priv->gpriv->SCardControl) {
rv = priv->gpriv->SCardControl(card, (DWORD)control, sendbuf, dwSendLength,
recvbuf, dwRecvLength, &dwRecvLength);
}
Expand Down

0 comments on commit 67b85ce

Please sign in to comment.