[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.18-7-gcd53cdb

by Werner Koch cvs at cvs.gnupg.org
Thu Sep 11 17:06:47 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-1-4 has been updated
       via  cd53cdbc3774fb193bdebcdc5d7019ddebc16dbc (commit)
      from  b89f57fe5db364f78154671e1b2fe1ecd1b5c407 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cd53cdbc3774fb193bdebcdc5d7019ddebc16dbc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 11 17:06:16 2014 +0200

    mpi: Improve mpi_invm to detect bad input.
    
    * mpi/mpi-inv.c (mpi_invm): Return 0 for bad input.
    --
    
    Without this patch the function may enter an endless loop.  This is a
    backport from libgcrypt.
    
    GnuPG-bug-id: 1713

diff --git a/mpi/mpi-inv.c b/mpi/mpi-inv.c
index b762630..361c57e 100644
--- a/mpi/mpi-inv.c
+++ b/mpi/mpi-inv.c
@@ -165,6 +165,11 @@ mpi_invm( MPI x, MPI a, MPI n )
     int sign;
     int odd ;
 
+    if (!mpi_cmp_ui (a, 0))
+        return 0; /* Inverse does not exists.  */
+    if (!mpi_cmp_ui (n, 1))
+        return 0; /* Inverse does not exists.  */
+
     u = mpi_copy(a);
     v = mpi_copy(n);
 

-----------------------------------------------------------------------

Summary of changes:
 mpi/mpi-inv.c |    5 +++++
 1 file changed, 5 insertions(+)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list