Skip to content

Commit c3de15d

Browse files
author
flc
committed
1 parent af1bf44 commit c3de15d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libopensc/card-westcos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ static int westcos_sign_decipher(int mode, sc_card_t *card,
11311131
apdu.datalen = data_len;
11321132
apdu.data = data;
11331133
apdu.lc = data_len;
1134-
apdu.le = outlen;
1134+
apdu.le = outlen > 240 ? 240 : outlen;
11351135
apdu.resp = out;
11361136
apdu.resplen = outlen;
11371137

@@ -1143,7 +1143,7 @@ static int westcos_sign_decipher(int mode, sc_card_t *card,
11431143
goto out2;
11441144

11451145
/* correct */
1146-
r = outlen;
1146+
r = apdu.resplen;
11471147
goto out2;
11481148
}
11491149

0 commit comments

Comments
 (0)