---- opensc-0.7.0/src/libopensc/card-default.c.orig Thu May 2 15:55:06 2002
-+++ opensc-0.7.0/src/libopensc/card-default.c Tue Mar 11 15:17:27 2003
-@@ -58,6 +58,7 @@
- apdu.datalen = 0;
- apdu.lc = 0;
- apdu.le = 256;
-+ apdu.resp = &rbuf;
- apdu.resplen = sizeof(rbuf);
- r = sc_transmit_apdu(card, &apdu);
- SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+file->acl[op] can contain special value (1,2,3) cast to pointer; it must be
+passed through sc_file_get_acl_entry before dereferencing.
+
+--- opensc-0.8.1/src/libopensc/card-setcos.c.orig Wed Sep 3 11:28:54 2003
++++ opensc-0.8.1/src/libopensc/card-setcos.c Wed Jul 21 13:16:44 2004
+@@ -152,8 +152,11 @@
+ for (i = 0; i < 6; i++)
+ idx[i] = ef_idx[i];
+ }
+- for (i = 0; i < 6; i++)
+- buf[i] = acl_to_byte(file->acl[idx[i]]);
++ for (i = 0; i < 6; i++) {
++ const struct sc_acl_entry *entry;
++ entry = sc_file_get_acl_entry(file, idx[i]);
++ buf[i] = acl_to_byte(entry);
++ }
+
+ sc_file_set_sec_attr(file, buf, 6);
+ }