* getkey.c (premerge_public_with_secret): Fix subkey<->binding sig
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 14 Sep 2004 02:00:39 +0000 (02:00 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 14 Sep 2004 02:00:39 +0000 (02:00 +0000)
mismatch when some secret subkeys are missing.  Discovered by Michael
Roth.

g10/ChangeLog
g10/getkey.c

index d141064..9fb26ea 100644 (file)
@@ -1,5 +1,9 @@
 2004-09-13  David Shaw  <dshaw@jabberwocky.com>
 
+       * getkey.c (premerge_public_with_secret): Fix subkey<->binding sig
+       mismatch when some secret subkeys are missing.  Discovered by
+       Michael Roth.
+
        * main.h, keylist.c (print_subpackets_colon): Make a public
        function.
 
index 3002e1e..8676758 100644 (file)
@@ -2173,7 +2173,7 @@ premerge_public_with_secret ( KBNODE pubblock, KBNODE secblock )
                 assert ( last );
                 /* find the next subkey */
                 for (next=pub->next,ll=pub;
-                     next && pub->pkt->pkttype != PKT_PUBLIC_SUBKEY;
+                     next && next->pkt->pkttype != PKT_PUBLIC_SUBKEY;
                      ll = next, next = next->next ) 
                     ;
                 /* make new link */