GnuPG 1.9.95: gpg2 segfaults on build test

Werner Koch wk at gnupg.org
Sun Nov 12 18:38:39 CET 2006


On Sat, 11 Nov 2006 13:00, umq.461 at gmail.com said:

> At Fri, 10 Nov 2006 11:44:53 +0100,
> Werner Koch wrote:
>> Well, sitting at the SFScon at Bozen, Marcus and me tracked down the
>> bug.  It is very easy to fix and actually an oversight when I wrote
>> mpi_read.  It reveals it self only on 64 bit machines because there
>> sizeof(unsigned int) != sizeof(size_t).  gcc should have emitted a
>> warning when compiling on 64 bit. I agree that gnupg is a lot of code
>> and such warnings are easily overlooked.
>
>> I attach a patch.  Most of it is just re-indentation.
>
> Here I attach a set of patch to avoid ``incompatible pointer type'' warnings.
> I'm not sure if this causes any side-effects.

Thanks for looking into this.  I can't use the patches because

  sprintf (numbuf, "%zd:", rsa_n_len);

is not portable enough ("%zd").  As there are several of such
problems, I will build a x64 cross compiler and check myself.



Shalom-Salam,

   Werner





More information about the Gnupg-devel mailing list