Hi, On Wednesday, 20. April 2011, Martin Paljak wrote: > On Apr 19, 2011, at 14:41 , Frank Morgner wrote: > > On Tuesday, April 19 at 02:03PM, Martin Paljak wrote: > >> On Mon, Apr 18, 2011 at 23:22, Peter Marschall <pe...@adpm.de> wrote: > > Looking at your patch - I like the approach more: > - removes code duplication (there's one more instance in piv-tool.c) > - feels like easier to read (but verification would need attention what I > can't afford right now, sickathome) - has a nice debug log statement. > > It would be nice if the patch > - removed the 3rd instance of same code in piv-tool.c (and reverted r5370) > - had some doxygen documentation in apdu.c and opensc.h > - not really important, but probably would be good if the function had a > name similar to the reverse function (apdu2bytes) > > Peter, can you verify if this works for you as well (and/or is it free of > the mentioned memory overrun problem) ?
Yes Frank's patch works for me too [he is right: my patch has a bug], and his patch is also OK wrt to the memory overrun: Frank correctly checks length before further actions (the bug was in the original code in opensc-tool.c & opensc-explorer.c. In #260 I have attached an update of Frank's patch that applies to r5378 (as of today 15:00 CET DST): it backs out the changes of my patch and restores his version again. Best PEter -- Peter Marschall pe...@adpm.de _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel