summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-01-31 16:22:21 +0100
committerWerner Koch <wk@gnupg.org>2007-01-31 16:22:21 +0100
commit7759f3017eb9462f5a0911b56ba96c7a356c1303 (patch)
treefe1bd32e929d125337d16ce12ce76a86c912c1a8
parentUpdated po files for the release (diff)
downloadgnupg2-gnupg-2.0.2.tar.xz
gnupg2-gnupg-2.0.2.zip
Fix NULL pointer dereferencegnupg-2.0.2
-rw-r--r--g10/ChangeLog2
-rw-r--r--g10/verify.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 6c8148e60..53f6b8528 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,7 @@
2007-01-31 Werner Koch <wk@g10code.com>
+ * verify.c (verify_signatures): Do no dereference a NULL afx.
+
* passphrase.c (passphrase_get): Set the cancel flag on all error
from the agent. Fixes a bug reported by Tom Duerbusch.
diff --git a/g10/verify.c b/g10/verify.c
index e8f5891a4..014e53af1 100644
--- a/g10/verify.c
+++ b/g10/verify.c
@@ -115,7 +115,7 @@ verify_signatures( int nfiles, char **files )
rc = proc_signature_packets( NULL, fp, sl, sigfile );
free_strlist(sl);
iobuf_close(fp);
- if( (afx->no_openpgp_data && rc == -1) || rc == G10ERR_NO_DATA ) {
+ if( (afx && afx->no_openpgp_data && rc == -1) || rc == G10ERR_NO_DATA ) {
log_error(_("the signature could not be verified.\n"
"Please remember that the signature file (.sig or .asc)\n"
"should be the first file given on the command line.\n") );