From af48368712593c700d8e4e464982b9db1ccf03c0 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Jan 2012 16:18:12 +0000 Subject: (Spec_binheader,Spec_binrpm) use right iterator (should fix a random segfault on Mageia build system) git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@168 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/NEWS | 2 ++ RPM4/src/RPM4.xs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'RPM4') diff --git a/RPM4/NEWS b/RPM4/NEWS index fd8e257..e8e56b7 100644 --- a/RPM4/NEWS +++ b/RPM4/NEWS @@ -1,3 +1,5 @@ +- fix for a random segfault + Version 0.25 - 14 December 2011 - disable tests segfaulting in rpmSpecBuild() diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 2d377ee..43b9368 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -2764,7 +2764,7 @@ Spec_binheader(spec) PPCODE: #ifdef RPM4_9_0 rpmSpecPkgIter iter = rpmSpecPkgIterInit(spec); - while ((pkg = rpmSpecSrcIterNext(iter)) != NULL) + while ((pkg = rpmSpecPkgIterNext(iter)) != NULL) XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_header, (void *)headerLink(rpmSpecPkgHeader(pkg))))); #else for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) @@ -2806,7 +2806,7 @@ Spec_binrpm(spec) PPCODE: #ifdef RPM4_9_0 rpmSpecPkgIter iter = rpmSpecPkgIterInit(spec); - while ((pkg = rpmSpecSrcIterNext(iter)) != NULL) { + while ((pkg = rpmSpecPkgIterNext(iter)) != NULL) { #else for(pkg = spec->packages; pkg != NULL; pkg = pkg->next) { if (pkg->fileList == NULL) -- cgit v1.2.1