aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2004-06-27 18:31:34 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2004-06-27 18:31:34 +0000
commit37142a2e429d3f3d5e05658935b3604c5f3fde58 (patch)
tree76d639b3d7647e0f9b19649ff8f959db20b7226b
parentd55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a (diff)
downloadperl-URPM-37142a2e429d3f3d5e05658935b3604c5f3fde58.tar
perl-URPM-37142a2e429d3f3d5e05658935b3604c5f3fde58.tar.gz
perl-URPM-37142a2e429d3f3d5e05658935b3604c5f3fde58.tar.bz2
perl-URPM-37142a2e429d3f3d5e05658935b3604c5f3fde58.tar.xz
perl-URPM-37142a2e429d3f3d5e05658935b3604c5f3fde58.zip
- fix segfault in queryformat if tag does not exist (return nothing instead)
-rw-r--r--URPM.xs4
1 files changed, 3 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index 7b18190..6db9d48 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2313,7 +2313,9 @@ Pkg_queryformat(pkg, fmt)
if (pkg->h) {
s = headerSprintf(pkg->h, fmt,
rpmTagTable, rpmHeaderFormats, NULL);
- XPUSHs(sv_2mortal(newSVpv(s,0)));
+ if (s) {
+ XPUSHs(sv_2mortal(newSVpv(s,0)));
+ }
}
void