mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
mpi: Minor fix for mpi_pow.
* mpi/mpi-pow.c (mpi_powm): Fix allocation size. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
12029f83fd
commit
554ded4854
@ -162,7 +162,7 @@ mpi_powm( MPI res, MPI base, MPI exponent, MPI mod)
|
|||||||
|
|
||||||
{
|
{
|
||||||
mpi_size_t i;
|
mpi_size_t i;
|
||||||
mpi_ptr_t xp = xp_marker = mpi_alloc_limb_space( 2 * (msize + 1), msec );
|
mpi_ptr_t xp = xp_marker = mpi_alloc_limb_space( size, msec );
|
||||||
int c;
|
int c;
|
||||||
mpi_limb_t e;
|
mpi_limb_t e;
|
||||||
mpi_limb_t carry_limb;
|
mpi_limb_t carry_limb;
|
||||||
@ -499,7 +499,7 @@ mpi_powm (MPI res, MPI base, MPI expo, MPI mod)
|
|||||||
struct karatsuba_ctx karactx;
|
struct karatsuba_ctx karactx;
|
||||||
mpi_ptr_t tp;
|
mpi_ptr_t tp;
|
||||||
|
|
||||||
xp = xp_marker = mpi_alloc_limb_space( 2 * (msize + 1), msec );
|
xp = xp_marker = mpi_alloc_limb_space( size, msec );
|
||||||
|
|
||||||
memset( &karactx, 0, sizeof karactx );
|
memset( &karactx, 0, sizeof karactx );
|
||||||
negative_result = (ep[0] & 1) && bsign;
|
negative_result = (ep[0] & 1) && bsign;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user