]> git.pld-linux.org Git - packages/opensc.git/blame - opensc-segv.patch
- release 2 (rebuild with new openct)
[packages/opensc.git] / opensc-segv.patch
CommitLineData
e2cbe747
JB
1file->acl[op] can contain special value (1,2,3) cast to pointer; it must be
2passed through sc_file_get_acl_entry before dereferencing.
3
4--- opensc-0.8.1/src/libopensc/card-setcos.c.orig Wed Sep 3 11:28:54 2003
5+++ opensc-0.8.1/src/libopensc/card-setcos.c Wed Jul 21 13:16:44 2004
6@@ -152,8 +152,11 @@
7 for (i = 0; i < 6; i++)
8 idx[i] = ef_idx[i];
9 }
10- for (i = 0; i < 6; i++)
11- buf[i] = acl_to_byte(file->acl[idx[i]]);
12+ for (i = 0; i < 6; i++) {
13+ const struct sc_acl_entry *entry;
14+ entry = sc_file_get_acl_entry(file, idx[i]);
15+ buf[i] = acl_to_byte(entry);
16+ }
17
18 sc_file_set_sec_attr(file, buf, 6);
19 }
This page took 0.059421 seconds and 4 git commands to generate.