2011/6/21 Ludovic Rousseau <ludovic.rouss...@gmail.com>:
> Hello,
>
> I found a bug that leads to an assert.
> Check the lib is initialized before logging
>
> C_CloseSession() and C_CloseAllSessions() were calling sc_debug() before
> any check on the validity of the context. So if C_Initialize() was not
> previously called you get an assert:
> log.c:76: sc_do_log_va: Assertion `ctx != ((void *)0)' failed.
>
> Patch attached and available at
> https://github.com/LudovicRousseau/OpenSC/commit/ce2d3c09bed53e4a9e77e327d39f0a4e2187ba3a
>
> The solution is to call sc_pkcs11_lock() _before_ using sc_debug() so
> the context valitity is checked
>
> Martin, please merge my master branch.

Another one quiet similar
https://github.com/LudovicRousseau/OpenSC/commit/b7c2836d943db19fb6bd6cd945b5bfe10e93ca63

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to