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 return 0; if p is NULL and len is 0 ... hmm, right, problem. > > + while (p < end)) { /* more bytes to look at */ > > this line can not compile, with 2 ')' ouch, yes. where is the brown paperbag? now I'm back to test compiling my changes. thanks! Regards, Andreas _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel