Hi aj, webmas...@opensc-project.org wrote: > Revision: 3659 > Author: aj > Date: 2009-03-05 18:37:55 +0000 (Thu, 05 Mar 2009) > > Log Message: > ----------- > Improve this function even more. > > Modified Paths: > -------------- > trunk/src/pkcs15init/pkcs15-lib.c > Modified: trunk/src/pkcs15init/pkcs15-lib.c > =================================================================== > --- trunk/src/pkcs15init/pkcs15-lib.c 2009-03-05 15:28:17 UTC (rev 3658) > +++ trunk/src/pkcs15init/pkcs15-lib.c 2009-03-05 18:37:55 UTC (rev 3659) > > static int > sc_pkcs15init_parse_info(sc_card_t *card, > @@ -3719,12 +3724,18 @@ > unsigned int nopts = 0; > size_t n; > > - end = p + len; > - while (p < end && (tag = *p++) != 0 && tag != 0xFF) { > + end = p + (len - 1); value of len may be 0,this cause segment fault later. > > + while (p < end)) { /* more bytes to look at */ > this line can not compile, with 2 ')'
-- Weitao Sun <wei...@ftsafe.com> TEL:+86 010 62304466 ext. 585 FAX:+86 010 62304477 Entersafe R&D Dep.<www.entersafe.com> Feitian Technologies Co., Ltd.<www.ftsafe.com> 5th Floor, Building 7A, No.40 Xueyuan Road Haidian District, Beijing, P.R. China, 100083 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel