Re: [opensc-devel] [opensc-commits] svn opensc changed [3659] Improve this function even more.

2009-03-06 Thread Weitao Sun
Hi aj, webmas...@opensc-project.org wrote: Revision: 3659 Author: aj Date: 2009-03-05 18:37:55 + (Thu, 05 Mar 2009) Log Message: --- Improve this function even more. Modified Paths: -- trunk/src/pkcs15init/pkcs15-lib.c Modified:

Re: [opensc-devel] [opensc-commits] svn opensc changed [3659] Improve this function even more.

2009-03-06 Thread Andreas Jellinghaus
Am Freitag 06 März 2009 09:46:48 schrieb Weitao Sun: Hi aj, - 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. no, it would set end = p -1; and then while (p end) is false, thus we