I'm trying to investigate the problem

I've found that ct_card_lock is returning -7 (IFD_ERROR_LOCKED) for the
second card 'CT_init (ctn=1, pn=0)'
while is returning IFD_SUCCESS for the first one 'CT_init (ctn=0, pn=0)'
(why?)

so CT_init call CT_close what raises later a segmentation fault (using a
address freed)

ctapi.c:591~594

    if (ct_card_lock(h, 0, IFD_LOCK_EXCLUSIVE, &ct->lock) < 0) {
        CT_close(ctn);
        return ERR_HTSI;
    }


My question is why ct_card_lock is returning -7 LOCKED for the newly card?


On Tue, Sep 13, 2011 at 7:14 PM, Iuri Diniz <iuridi...@gmail.com> wrote:

> Hello people
>
> I want some help of you in order to get 2 tokens Aladdin eToken PRO 64
> working at same time
>
> When I have pcscd running with one token everything is fine, but with two,
> they don't work and sometimes I get a segfault on libopenctapi.so
>
> I have some background in C, so I used valgrind to run pcscd in order to
> discovery what is happing and valgrind is saying that libopenctapi.so is
> using a memory location already free'd (see attached file)
>
> I have tested at 2 Ubuntu 11.04 (x86 64 bits and 32bits with default
> package) and 1 Debian 6.0 (x86 32 bits with last compiled packages)
>
> If someone has the key to fix this problem or can give me where I can get
> start in order to try to fix the problem, I will appreciate that.
>
>
> --
> Iuri Diniz
> http://iuridiniz.com [Sou um agitador, não um advogado]
> http://blog.igdium.com [Linux on Limbo]
>



-- 
Iuri Diniz
http://iuridiniz.com [Sou um agitador, não um advogado]
http://blog.igdium.com [Linux on Limbo]
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to