Newbie question - gcry_sexp_build Seg. Fault

t.fromm at dresearch.de t.fromm at dresearch.de
Fri Nov 5 02:17:43 CET 2004


On Thu, 4 Nov 2004, António Pinto wrote:

> I'm getting a seg. fault while running the following code:
>
> ------------------------
> 	gcry_sexp_build (&plain, NULL, "(data (flags raw) (value %d))", &data); /* SEG FAULT */

Typo here: you want to use tha value of (int) data, not the value at the
address this (uninitialised) int points to. Try '...lue %d))", data);' .

Regards,
Thilo

/* Dipl.-Ing. (FH) Thilo Fromm, MSc., Hardware & Software
 * DResearch Digital Media Systems GmbH
 * Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
 * Tel: +49 (30) 515932-228  mailto:t.fromm at dresearch.de
 * Fax: +49 (30) 515932-299      http://www.dresearch.de */







More information about the Gcrypt-devel mailing list