aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2017-10-03 19:06:24 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2017-10-03 19:06:24 +0200
commit87dbde4f3b078173e53cd45cac000c2d2751b370 (patch)
treee39cbd11280cd0b303f24b53a7944163b2eb5a65
parent9f2fb1c976ac6befb1364f78609888a02fc59826 (diff)
downloadperl-URPM-87dbde4f3b078173e53cd45cac000c2d2751b370.tar
perl-URPM-87dbde4f3b078173e53cd45cac000c2d2751b370.tar.gz
perl-URPM-87dbde4f3b078173e53cd45cac000c2d2751b370.tar.bz2
perl-URPM-87dbde4f3b078173e53cd45cac000c2d2751b370.tar.xz
perl-URPM-87dbde4f3b078173e53cd45cac000c2d2751b370.zip
fix segfault when checking invalid signatures
This is a rpm-4.14 regression where rpmReadPackageFile() no longer initialize the header when the pkg is corrupted
-rw-r--r--NEWS1
-rw-r--r--URPM.xs2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 81444b7..bb7c2d7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- testsuite:
+ o fix segfault with rpm-4.14 when checking invalid signatures
o revert workaround perl-5.26 vs librpm bug which results on exit cleanup
Version 5.14 - 7 September 2017
diff --git a/URPM.xs b/URPM.xs
index 8926770..cf2eac6 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3136,7 +3136,7 @@ Urpm_verify_signature(filename, prefix=NULL)
char result[1024];
rpmRC rc;
FD_t fd;
- Header h;
+ Header h = headerNew();
CODE:
fd = Fopen(filename, "r");
if (fd == NULL)