From a33e7ba3c780c319496d9f3b71c6ce7dcc4d01cd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 15 Apr 2004 15:18:30 +0000 Subject: [PATCH] (gpgme_get_key): Return an error if FPR is NULL. --- gpgme/ChangeLog | 4 ++++ gpgme/keylist.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 26c4630..94e407f 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2004-04-15 Werner Koch + + * keylist.c (gpgme_get_key): Return an error if FPR is NULL. + 2004-04-08 Werner Koch * verify.c (_gpgme_verify_status_handler): Ignore the error status diff --git a/gpgme/keylist.c b/gpgme/keylist.c index 99499de..eb8597e 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -838,7 +838,7 @@ gpgme_get_key (gpgme_ctx_t ctx, const char *fpr, gpgme_key_t *r_key, gpgme_error_t err; gpgme_key_t key; - if (!ctx || !r_key) + if (!ctx || !r_key || !fpr) return gpg_error (GPG_ERR_INV_VALUE); if (strlen (fpr) < 16) /* We have at least a key ID. */ -- 2.26.2