[git] GnuPG - branch, master, updated. gnupg-2.1.3-23-gf77fd57

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri May 1 07:05:35 CEST 2015


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, master has been updated
       via  f77fd572db658959fa40aa8c181be919e688b707 (commit)
      from  01a2a61bc4b34817c4216888265f65d59a33dad3 (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 f77fd572db658959fa40aa8c181be919e688b707
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Apr 30 17:02:42 2015 +0900

    g10: fix cmp_public_key.
    
    * g10/free-packet.c (cmp_public_keys): Compare opaque
    data at the first entry of the array when it's unknown algo.
    
    --
    
    (forwardported from 2.0 commit 43429c7869152f301157e4b24790b3801dce0f0a)
    
    GnuPG-bug-id: 1962

diff --git a/g10/free-packet.c b/g10/free-packet.c
index 49d54f4..670f256 100644
--- a/g10/free-packet.c
+++ b/g10/free-packet.c
@@ -434,11 +434,14 @@ cmp_public_keys( PKT_public_key *a, PKT_public_key *b )
 	return -1;
 
     n = pubkey_get_npkey( b->pubkey_algo );
-    if( !n )
-	return -1; /* can't compare due to unknown algorithm */
-    for(i=0; i < n; i++ ) {
-	if( mpi_cmp( a->pkey[i], b->pkey[i] ) )
-	    return -1;
+    if( !n ) { /* unknown algorithm, rest is in opaque MPI */
+	if( mpi_cmp( a->pkey[0], b->pkey[0] ) )
+	    return -1; /* can't compare due to unknown algorithm */
+    } else {
+	for(i=0; i < n; i++ ) {
+	    if( mpi_cmp( a->pkey[i], b->pkey[i] ) )
+		return -1;
+	}
     }
 
     return 0;

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

Summary of changes:
 g10/free-packet.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)


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




More information about the Gnupg-commits mailing list