aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 512ce12..e0559c1 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3327,7 +3327,7 @@ Urpm_verify_signature(filename)
*result = '\0';
switch(rc) {
case RPMRC_OK:
- {
+ if (h) {
char *fmtsig = headerSprintf(
h,
"%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:"
@@ -3335,7 +3335,7 @@ Urpm_verify_signature(filename)
rpmTagTable, rpmHeaderFormats, NULL);
snprintf(result, sizeof(result), "OK (%s)", fmtsig);
free(fmtsig);
- }
+ } else snprintf(result, sizeof(result), "NOT OK (bad rpm): %s", rpmErrorString());
break;
case RPMRC_NOTFOUND:
snprintf(result, sizeof(result), "NOT OK (signature not found): %s", rpmErrorString());