* gpgmeplug.c (nextCertificate): Sanity check for empty tmp_dn.
authorWerner Koch <wk@gnupg.org>
Fri, 20 Sep 2002 11:47:55 +0000 (11:47 +0000)
committerWerner Koch <wk@gnupg.org>
Fri, 20 Sep 2002 11:47:55 +0000 (11:47 +0000)
trunk/gpgmeplug/ChangeLog
trunk/gpgmeplug/gpgmeplug.c

index b2e254024d4f7cc4fe7123723b8075dab278ecce..dd359c3931ccd4a6b96c9b62e26ced69f6fa8be0 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-20  Werner Koch  <wk@gnupg.org>
+
+       * gpgmeplug.c (nextCertificate): Sanity check for empty tmp_dn.
+
 2002-08-20  Steffen Hansen  <steffen@hrhansen.dk>
 
        * Use gpgme_op_import_ext() instead of gpgme_op_import(). We
index 4dab9ef87ed37f40204f13d048aa1f3ba5fb4439..6e17c554891a4a01aa20da7c839bbaaf7d97e681 100644 (file)
@@ -2173,7 +2173,7 @@ nextCertificate( struct CertIterator* it, struct CertificateInfo** result )
       issuer_dn = tmp_dn = parse_dn( s );     
       /*it->info.issuer = xstrdup(s);*/
       it->info.issuer = reorder_dn( issuer_dn );
-      while( tmp_dn->key ) {
+      while( tmp_dn && tmp_dn->key ) {
        free( tmp_dn->key );
        free( tmp_dn->value );
        ++tmp_dn;