Re: [opensc-devel] Check the lib is initialized before logging

2011-06-23 Thread Ludovic Rousseau
2011/6/21 Ludovic Rousseau : > 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 yo

[opensc-devel] Check the lib is initialized before logging

2011-06-21 Thread Ludovic Rousseau
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: As