In working with OpenSC, I found that sc_list_files doesn't return the length of the applicable buffer, but instead the # of files.
Here's a patch which fixes my wrong assumption in card-muscle.c -- Thomas Harning @ Identity Alliance
Index: card-muscle.c =================================================================== --- card-muscle.c (revision 764) +++ card-muscle.c (working copy) @@ -486,7 +486,7 @@ buf[1] = objectId[3]; if(buf[0] == 0x00 && buf[1] == 0x00) continue; /* No directories/null names outside of root */ buf += 2; - count+=2; + count+=1; } } return count;
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel