diff options
author | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2006-06-11 01:39:12 +0000 |
---|---|---|
committer | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2006-06-11 01:39:12 +0000 |
commit | 05ad8778579b547e575fbf0f28c3dc71061367d7 (patch) | |
tree | e197137e0569880f22417f1a383617be817dff41 /RPM4 | |
parent | 0762ad3825a8adf674c5a9d13143aff233acc2c7 (diff) | |
download | perl-RPM4-05ad8778579b547e575fbf0f28c3dc71061367d7.tar perl-RPM4-05ad8778579b547e575fbf0f28c3dc71061367d7.tar.gz perl-RPM4-05ad8778579b547e575fbf0f28c3dc71061367d7.tar.bz2 perl-RPM4-05ad8778579b547e575fbf0f28c3dc71061367d7.tar.xz perl-RPM4-05ad8778579b547e575fbf0f28c3dc71061367d7.zip |
- fix segfault in Header->files(): refresh stack
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@103 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4')
-rw-r--r-- | RPM4/src/RPM4.xs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 3da7112..6fb1003 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -1294,9 +1294,10 @@ Header_files(header, scaremem = O_SCAREMEM) #ifdef HDLISTDEBUG PRINTF_CALL; #endif + SPAGAIN; Files = rpmfiNew(ts, header, RPMTAG_BASENAMES, scaremem); - if (Files != NULL && (Files = rpmfiInit(Files, 0)) != NULL && rpmfiNext(Files) >= 0) { - XPUSHs(sv2_mortal(sv_setref_pv(newSVpv("", 0), bless_rpmfi, Files))); + if (Files != NULL && (Files = rpmfiInit(Files, 0)) != NULL && rpmfiNext(Files) >= 0) { + XPUSHs(sv_setref_pv(sv_newmortal(), bless_rpmfi, (void *)Files)); #ifdef HDRPMMEM PRINTF_NEW(bless_rpmfi, Files, Files->nrefs); #endif |