I get an intermittent C_Initialize crash when opensc is initialized 
shortly after login. The crash occurs here:

#0  C_Initialize (pInitArgs=<optimized out>) at pkcs11-global.c:254
254     pkcs11-global.c: No such file or directory.
        in pkcs11-global.c

Thread 3 (Thread 0x7f573a1b2700 (LWP 2063)):
#0  C_Initialize (pInitArgs=<optimized out>) at pkcs11-global.c:254
         slot = 0x0
         rv = 0
         i = 1
         ctx_opts = {ver = 0, app_name = 0x7f573958d113 "opensc-pkcs11", 
flags = 0, thread_ctx = 0x7f5739796ac0}
         rc = <optimized out>
#1  C_Initialize (pInitArgs=<optimized out>) at pkcs11-global.c:191
         rv = 0
         current_pid = <optimized out>

As you can see the slot variable is set to NULL at line 254, and the 
null pointer is dereferenced. Should I patch this by adding a check for 
that?

Filed ticket here: https://www.opensc-project.org/opensc/ticket/383

Cheers,

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

Reply via email to