Problem with test
Werner Koch
wk at gnupg.org
Fri Aug 25 16:34:34 CEST 2006
On Tue, 22 Aug 2006 12:54, Brad Hards said:
> I don't see this problem on an ia32 box. I can't see how, but possibly it is a
> 64-bit problem?
Please try the patch below (in libgrypt/mpi/). This should fix it.
Shalom-Salam,
Werner
===================================================================
--- mpi-bit.c (revision 1172)
+++ mpi-bit.c (working copy)
@@ -256,7 +256,17 @@
x->nlimbs = xsize;
if ( xsize )
- _gcry_mpih_rshift (x->d, a->d, x->nlimbs, nbits );
+ {
+ if (nbits )
+ _gcry_mpih_rshift (x->d, a->d, x->nlimbs, nbits );
+ else
+ {
+ /* The rshift helper function is not specified for
+ NBITS==0, thus we do a plain copy here. */
+ for (i=0; i < x->nlimbs; i++ )
+ x->d[i] = a->d[i];
+ }
+ }
}
MPN_NORMALIZE (x->d, x->nlimbs);
}
More information about the Gcrypt-devel
mailing list