aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-09-12 10:42:43 +0000
committerThierry Vignaud <tv@mageia.org>2011-09-12 10:42:43 +0000
commit2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f (patch)
tree3f7549745fab4940c09cfcd6affb511517406d6a
parenta95fa2ffc18886d93453942e63bba279bb97ec3e (diff)
downloadperl-URPM-2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f.tar
perl-URPM-2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f.tar.gz
perl-URPM-2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f.tar.bz2
perl-URPM-2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f.tar.xz
perl-URPM-2ca93e25d9cd5d3ff73a8e4993d80de11f07b41f.zip
(Urpm_spec2srcheader) fix urpmi segfaulting on 'urpmi foobar.spec' when some
files are missing
-rw-r--r--NEWS2
-rw-r--r--URPM.xs2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5bec9e2..8595cbd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix urpmi segfaulting on 'urpmi foobar.spec' when some files are missing
+
Version 3.38.2 - 09 November 2011
- fix spec2srcheader() for rpm-4.9.x
diff --git a/URPM.xs b/URPM.xs
index fda00d6..568affd 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3846,8 +3846,8 @@ Urpm_spec2srcheader(specfile)
#define SPEC_FORCE 1
#ifdef RPM490
spec = rpmSpecParse(specfile, SPEC_ANYARCH|SPEC_FORCE, NULL);
- header = rpmSpecSourceHeader(spec);
if (spec) {
+ header = rpmSpecSourceHeader(spec);
#else
if (!parseSpec(ts, specfile, "/", NULL, 0, NULL, NULL, SPEC_ANYARCH, SPEC_FORCE)) {
#endif