aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-12-01 16:21:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-12-01 16:21:30 +0000
commita3dd9fd62def698e71493fb07eb886fa21d6b8c7 (patch)
tree7181f14bc3253c0ab90bcb3d4edec4253506065d /URPM.xs
parentf2a6550572f1d8b22ca3362dd3a395f393eae326 (diff)
downloadperl-URPM-a3dd9fd62def698e71493fb07eb886fa21d6b8c7.tar
perl-URPM-a3dd9fd62def698e71493fb07eb886fa21d6b8c7.tar.gz
perl-URPM-a3dd9fd62def698e71493fb07eb886fa21d6b8c7.tar.bz2
perl-URPM-a3dd9fd62def698e71493fb07eb886fa21d6b8c7.tar.xz
perl-URPM-a3dd9fd62def698e71493fb07eb886fa21d6b8c7.zip
rpmReadPackageFile() can return ok but no header :-/
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());