Problem with gcry_sexp_build
Werner Koch
wk@gnupg.org
Fri, 02 Aug 2002 11:35:34 +0200
On Thu, 1 Aug 2002 22:20:15 +0200 (MEST), cplusplushelp said:
> if(gcry_sexp_build( &s_pkey, NULL,
> "(public-key(rsa(n%m)(e%m)))",
> pkey[0] /* n */, pkey[1] /* e */ )) /*here the SEGFAULT happens!*/
You are dereferencing a pad pointer, either pkey[0] or pkey[1]. BTW,
it is good practice to send a stack backtrace in such cases: Run
under gdb and enter "bt" after it failed or do it on the core file.
Salam-Shalom,
Werner