rpms/perl-XML-LibXSLT/devel perl-XML-LibXSLT-refcount.patch, NONE, 1.1 perl-XML-LibXSLT.spec, 1.18, 1.19

Štěpán Kasal kasal at fedoraproject.org
Wed Mar 18 13:44:47 UTC 2009


Author: kasal

Update of /cvs/extras/rpms/perl-XML-LibXSLT/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28738

Modified Files:
	perl-XML-LibXSLT.spec 
Added Files:
	perl-XML-LibXSLT-refcount.patch 
Log Message:
- patch to fix a refcounting bug leading to segfaults (#490781)

perl-XML-LibXSLT-refcount.patch:

--- NEW FILE perl-XML-LibXSLT-refcount.patch ---
2009-03-18  Stepan Kasal  <skasal at redhat.com>

	* LibXSLT.xs: prevent reference count bug
	http://rt.cpan.org/Public/Bug/Display.html?id=40844
	Fix provided by Jim Radford.

--- XML-LibXSLT-1.68/LibXSLT.xs.refcount	2008-11-05 14:19:41.000000000 +0100
+++ XML-LibXSLT-1.68/LibXSLT.xs	2009-03-18 14:30:55.000000000 +0100
@@ -285,7 +285,10 @@
 			} else {
                             /* need to copy the node as libxml2 will free it */
                             xmlNodePtr tnode_cpy = xmlCopyNode(tnode, 1);
-                            element = x_PmmNodeToSv(tnode_cpy, NULL);
+                            ProxyNodePtr owner = NULL;
+                            if( tnode_cpy != NULL && tnode_cpy->doc != NULL)
+                                owner = x_PmmOWNERPO(x_PmmNewNode((xmlNodePtr) tnode_cpy->doc));
+                            element = x_PmmNodeToSv(tnode_cpy, owner);
                         }
                         XPUSHs( sv_2mortal(element) );
                     }


Index: perl-XML-LibXSLT.spec
===================================================================
RCS file: /cvs/extras/rpms/perl-XML-LibXSLT/devel/perl-XML-LibXSLT.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- perl-XML-LibXSLT.spec	27 Feb 2009 04:38:55 -0000	1.18
+++ perl-XML-LibXSLT.spec	18 Mar 2009 13:44:17 -0000	1.19
@@ -4,7 +4,7 @@
 
 # NOTE: also update perl-XML-LibXML to a compatible version.  See below why.
 Version:	1.68
-Release:	2%{?dist}
+Release:	3%{?dist}
 
 Summary:	Perl module for interfacing to GNOME's libxslt
 
@@ -15,7 +15,10 @@
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	perl(ExtUtils::MakeMaker)
 BuildRequires:	libxslt-devel >= 1.1.18, gdbm-devel
-Requires:  	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+# http://rt.cpan.org/Public/Bug/Display.html?id=40844 , #490781
+Patch0:		perl-XML-LibXSLT-refcount.patch
 
 # the package shares code with perl-XML-LibXML, we have to require a compatible version
 # see https://bugzilla.redhat.com/show_bug.cgi?id=469480
@@ -28,6 +31,7 @@
 
 %prep
 %setup -q -n XML-LibXSLT-%{version}
+%patch0 -p1 -b .refcount
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
@@ -56,6 +60,9 @@
 %{_mandir}/man3/*.3*
 
 %changelog
+* Wed Mar 18 2009 Stepan Kasal <skasal at redhat.com> - 1.68-3
+- patch to fix a refcounting bug leading to segfaults (#490781)
+
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.68-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the Fedora-perl-devel-list mailing list