summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libopkg/opkg_download.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c
index 428cad5..6acdc32 100644
--- a/libopkg/opkg_download.c
+++ b/libopkg/opkg_download.c
@@ -252,8 +252,12 @@ opkg_verify_file (opkg_conf_t *conf, char *text_file, char *sig_file)
return -1;
err = gpgme_op_verify (ctx, sig, text, NULL);
+ if (err)
+ return -1;
result = gpgme_op_verify_result (ctx);
+ if (!result)
+ return -1;
/* see if any of the signitures matched */
s = result->signatures;