]> git.pld-linux.org Git - packages/opensc.git/blob - opensc-segv.patch
- release 2 (rebuild with new openct)
[packages/opensc.git] / opensc-segv.patch
1 file->acl[op] can contain special value (1,2,3) cast to pointer; it must be
2 passed 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.053369 seconds and 3 git commands to generate.