* pubkey-enc.c (get_it): Fix segv, test for revoked only when PK
authorWerner Koch <wk@gnupg.org>
Wed, 23 Oct 2002 07:11:01 +0000 (07:11 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 23 Oct 2002 07:11:01 +0000 (07:11 +0000)
has been assigned.

g10/ChangeLog
g10/pubkey-enc.c

index 88ce90c..d4d565d 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-23  Werner Koch  <wk@gnupg.org>
+
+       * pubkey-enc.c (get_it): Fix segv, test for revoked only when PK
+       has been assigned.
+
 2002-10-18  Timo Schulz  <ts@winpt.org>
 
        * keylist.c: (print_pubkey_info): New.
index 2c8771c..1cf2c38 100644 (file)
@@ -245,7 +245,7 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid )
             }
         }
 
-        if ( pk->is_revoked ) {
+        if ( pk &&  pk->is_revoked ) {
             log_info( _("NOTE: key has been revoked") );
             putc( '\n', log_stream() );
             show_revocation_reason( pk, 1 );