From: Werner Koch Date: Fri, 20 Sep 2002 11:47:55 +0000 (+0000) Subject: * gpgmeplug.c (nextCertificate): Sanity check for empty tmp_dn. X-Git-Tag: gpgme-1.2.0@1385~811 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=50d2a3abfbc7e2807dfd5b94b548a226109f465d;p=gpgme.git * gpgmeplug.c (nextCertificate): Sanity check for empty tmp_dn. --- diff --git a/trunk/gpgmeplug/ChangeLog b/trunk/gpgmeplug/ChangeLog index b2e2540..dd359c3 100644 --- a/trunk/gpgmeplug/ChangeLog +++ b/trunk/gpgmeplug/ChangeLog @@ -1,3 +1,7 @@ +2002-09-20 Werner Koch + + * gpgmeplug.c (nextCertificate): Sanity check for empty tmp_dn. + 2002-08-20 Steffen Hansen * Use gpgme_op_import_ext() instead of gpgme_op_import(). We diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index 4dab9ef..6e17c55 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -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;