diff options
author | Werner Koch <wk@gnupg.org> | 2008-12-03 08:50:32 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-12-03 08:50:32 +0000 |
commit | ff6027ea224259298a90606f0b1ea2a65afe9286 (patch) | |
tree | f044c8649ace172e1d090bdaf4d2985ef8e19cd2 /mpi | |
parent | 80e3857a2ca8f2577c40c6902adfa08bfb937ad9 (diff) | |
download | libgcrypt-ff6027ea224259298a90606f0b1ea2a65afe9286.tar.gz |
Fix last moi-pow.c change.
Add some code to allow standalone builds of some test programs.
Diffstat (limited to 'mpi')
-rw-r--r-- | mpi/ChangeLog | 9 | ||||
-rw-r--r-- | mpi/mpi-pow.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mpi/ChangeLog b/mpi/ChangeLog index f5849559..b4f90112 100644 --- a/mpi/ChangeLog +++ b/mpi/ChangeLog @@ -1,3 +1,8 @@ +2008-12-03 Werner Koch <wk@g10code.com> + + * mpi-pow.c (gcry_mpi_powm): Fix last change. Asserts are really + useful! + 2008-12-02 Werner Koch <wk@g10code.com> * mpi-pow.c (gcry_mpi_powm): Re-indent. @@ -189,7 +194,7 @@ 2004-12-16 Werner Koch <wk@g10code.com> * config.links (mpi_optional_modules): Move entry for powerpc64 - before generic powerpc. Suggested by Rafael Ávila de Espíndola. + before generic powerpc. Suggested by Rafael Ãvila de EspÃndola. 2004-03-02 Werner Koch <wk@gnupg.org> @@ -726,7 +731,7 @@ Thu Apr 9 11:31:36 1998 Werner Koch (wk@isil.d.shuttle.de) Wed Apr 8 09:44:33 1998 Werner Koch (wk@isil.d.shuttle.de) - * config.links: Applied small fix from Ulf Möller. + * config.links: Applied small fix from Ulf Möller. Mon Apr 6 12:38:52 1998 Werner Koch (wk@isil.d.shuttle.de) diff --git a/mpi/mpi-pow.c b/mpi/mpi-pow.c index 24865543..ca7ead02 100644 --- a/mpi/mpi-pow.c +++ b/mpi/mpi-pow.c @@ -277,8 +277,12 @@ gcry_mpi_powm (gcry_mpi_t res, rsize++; } } + else if (res->d != rp) + { + MPN_COPY (res->d, rp, rsize); + rp = res->d; + } - gcry_assert (res->d == rp); if ( rsize >= msize ) { _gcry_mpih_divrem(rp + msize, 0, rp, rsize, mp, msize); |