[svn] GnuPG - r5050 - in branches/STABLE-BRANCH-1-4: g10 keyserver

svn author wk cvs at cvs.gnupg.org
Wed Jun 24 16:01:21 CEST 2009


Author: wk
Date: 2009-06-24 16:01:20 +0200 (Wed, 24 Jun 2009)
New Revision: 5050

Modified:
   branches/STABLE-BRANCH-1-4/g10/ChangeLog
   branches/STABLE-BRANCH-1-4/g10/passphrase.c
   branches/STABLE-BRANCH-1-4/g10/revoke.c
   branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
   branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c
Log:
Fix a couple of minor bugs.


Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog	2009-06-17 11:57:24 UTC (rev 5049)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog	2009-06-24 14:01:20 UTC (rev 5050)
@@ -1,3 +1,8 @@
+2009-06-24  Werner Koch  <wk at g10code.com>
+
+	* passphrase.c (passphrase_to_dek): Do not deref a PW of NULL.
+	* revoke.c (gen_revoke): Remove unused malloc of PK.
+
 2009-06-17  Werner Koch  <wk at g10code.com>
 
 	* parse-packet.c (parse): Use a casted -1 instead of a 32 bit

Modified: branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/ChangeLog	2009-06-17 11:57:24 UTC (rev 5049)
+++ branches/STABLE-BRANCH-1-4/keyserver/ChangeLog	2009-06-24 14:01:20 UTC (rev 5050)
@@ -1,3 +1,8 @@
+2009-06-24  Werner Koch  <wk at g10code.com>
+
+	* gpgkeys_ldap.c (send_key): Do not loop over a NULL modlist in
+	fail.  Reported by Fabian Keil.
+
 2009-06-09  David Shaw  <dshaw at jabberwocky.com>
 
 	* Makefile.am (gpgkeys_hkp_LDADD): Need DNSLIBS for the resolver

Modified: branches/STABLE-BRANCH-1-4/g10/passphrase.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/passphrase.c	2009-06-17 11:57:24 UTC (rev 5049)
+++ branches/STABLE-BRANCH-1-4/g10/passphrase.c	2009-06-24 14:01:20 UTC (rev 5050)
@@ -1003,7 +1003,7 @@
        get_last_passphrase(). */
     dek = xmalloc_secure_clear ( sizeof *dek );
     dek->algo = cipher_algo;
-    if( !*pw && mode == 2 )
+    if( (!pw || !*pw) && mode == 2 )
 	dek->keylen = 0;
     else
 	hash_passphrase( dek, pw, s2k, mode==2 );

Modified: branches/STABLE-BRANCH-1-4/g10/revoke.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/revoke.c	2009-06-17 11:57:24 UTC (rev 5049)
+++ branches/STABLE-BRANCH-1-4/g10/revoke.c	2009-06-24 14:01:20 UTC (rev 5050)
@@ -488,8 +488,6 @@
     keyid_from_sk( sk, sk_keyid );
     print_seckey_info (sk);
 
-    pk = xmalloc_clear( sizeof *pk );
-
     /* FIXME: We should get the public key direct from the secret one */
 
     pub_keyblock=get_pubkeyblock(sk_keyid);

Modified: branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c	2009-06-17 11:57:24 UTC (rev 5049)
+++ branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_ldap.c	2009-06-24 14:01:20 UTC (rev 5050)
@@ -777,13 +777,16 @@
 
  fail:
   /* Unwind and free the whole modlist structure */
-  for(ml=modlist;*ml;ml++)
+  if (modlist)
     {
-      free_mod_values(*ml);
-      free(*ml);
+      for(ml=modlist;*ml;ml++)
+        {
+          free_mod_values(*ml);
+          free(*ml);
+        }
+      free(modlist);
     }
 
-  free(modlist);
   free(addlist);
   free(dn);
   free(key);




More information about the Gnupg-commits mailing list