- make sure all APDU fields are zero when processing -s option
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@954 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
4aef09109b
commit
556c216c4b
|
@ -279,15 +279,13 @@ int send_apdu(void)
|
|||
}
|
||||
len = len0;
|
||||
p = buf;
|
||||
memset(&apdu, 0, sizeof(apdu));
|
||||
apdu.cla = *p++;
|
||||
apdu.ins = *p++;
|
||||
apdu.p1 = *p++;
|
||||
apdu.p2 = *p++;
|
||||
apdu.resp = rbuf;
|
||||
apdu.resplen = sizeof(rbuf);
|
||||
apdu.data = NULL;
|
||||
apdu.datalen = 0;
|
||||
apdu.lc = apdu.le = 0;
|
||||
len -= 4;
|
||||
if (len > 1) {
|
||||
apdu.lc = *p++;
|
||||
|
|
Loading…
Reference in New Issue