Fatal: memory at 0x804a3dc corrupted (underflow=40)
Timo Schulz
twoaday@freakmail.de
Tue, 22 Oct 2002 16:31:21 +0200
On Tue Oct 22 2002; 17:58, Ruediger Sonderfeld wrote:
> /* extract the MPI values */
> if(! (list=gcry_sexp_find_token(s_ciph,"a",0)))
> return -1;
> if(! (resarr[0]=gcry_sexp_nth_mpi(list,1,0)))
> return -1;
>++ gcry_sexp_release ( list );
>
> if(alg==GCRY_PK_ELG||alg==GCRY_PK_ELG_E)
> {
> if(! (list=gcry_sexp_find_token(s_ciph,"b",0)))
> return -1;
> if(! (resarr[1]=gcry_sexp_nth_mpi(list,1,0)))
> return -1;
> }
>** gcry_sexp_release ( list );
> gcry_mpi_print(GCRYMPI_FMT_USG,to,&nto,resarr[0]);
> return 0;
>
Correcte me if I'm wrong but...if you use RSA, the list is released at ++.
Then the next if statement is not used (it's RSA) and then you release
the list *again* at **. I would say this is not right.
Only free the list again, if ELG is used.
Timo