summaryrefslogtreecommitdiff
path: root/mpi
diff options
context:
space:
mode:
Diffstat (limited to 'mpi')
-rw-r--r--mpi/ChangeLog9
-rw-r--r--mpi/mpi-pow.c6
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);