[pacman-dev] [PATCH] signing: fix segfault on unknown key
Dave Reisner
d at falconindy.com
Thu Sep 22 15:28:42 EDT 2011
Jump to the error label here, the same as other cases when we don't have
valid key data to work with.
Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
lib/libalpm/signing.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 66607fc..2c26f4e 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -247,6 +247,7 @@ static int key_search(alpm_handle_t *handle, const char *fpr,
err = gpgme_get_key(ctx, fpr, &key, 0);
if(gpg_err_code(err) == GPG_ERR_EOF) {
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup failed, unknown key\n");
+ CHECK_ERR();
} else if(gpg_err_code(err) != GPG_ERR_NO_ERROR) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"gpg error: %s\n", gpgme_strerror(err));
--
1.7.6.3
More information about the pacman-dev
mailing list