Hello community,

here is the log from the commit of package perl-XML-LibXML for openSUSE:Factory 
checked in at 2012-05-29 11:44:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-LibXML (Old)
 and      /work/SRC/openSUSE:Factory/.perl-XML-LibXML.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-XML-LibXML", Maintainer is "dlova...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-XML-LibXML/perl-XML-LibXML.changes  
2012-04-17 22:00:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-XML-LibXML.new/perl-XML-LibXML.changes     
2012-05-29 11:44:23.000000000 +0200
@@ -1,0 +2,12 @@
+Fri May 25 08:40:07 UTC 2012 - dval...@suse.com
+
+- STRLEN has 64 bits here and int has 32, so the (int*) cast in
+XML::LibXML::Document::toStringHTML() makes htmlDocDumpMemory() store
+the 32-bit length of the result into a 64-bit variable.  Depending on
+the endianness, it either works OK (LE) or corrupts the variable (BE)
+
+Just use an 'int' instead, and cast it to an STRLEN later in the
+newSVpvn() call.
+
+
+-------------------------------------------------------------------

New:
----
  perl-XML-LibXML-bigendian.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-XML-LibXML.spec ++++++
--- /var/tmp/diff_new_pack.DV6gkU/_old  2012-05-29 11:44:24.000000000 +0200
+++ /var/tmp/diff_new_pack.DV6gkU/_new  2012-05-29 11:44:24.000000000 +0200
@@ -37,6 +37,7 @@
 Provides:       perl-XML-LibXML-Common = %{version}
 Obsoletes:      perl-XML-LibXML-Common < %{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Patch:          perl-XML-LibXML-bigendian.patch
 %{perl_requires}
 
 %description
@@ -47,6 +48,7 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
+%patch -p1
 
 %build
 # [2,7,1,0], # broken release, broken utf-16
@@ -58,10 +60,6 @@
 make %{?_smp_mflags}
 
 %check
-%ifarch ppc64 s390x
-# see rhbz#769537
-rm t/12html.t
-%endif
 make test
 
 %install

++++++ perl-XML-LibXML-bigendian.patch ++++++
STRLEN has 64 bits here and int has 32, so the (int*) cast in
XML::LibXML::Document::toStringHTML() makes htmlDocDumpMemory() store
the 32-bit length of the result into a 64-bit variable.  Depending on
the endianness, it either works OK (LE) or corrupts the variable (BE)

Just use an 'int' instead, and cast it to an STRLEN later in the
newSVpvn() call.
---
 LibXML.xs |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/LibXML.xs b/LibXML.xs
index 8ac23bf..581cc48 100644
--- a/LibXML.xs
+++ b/LibXML.xs
@@ -2930,13 +2930,13 @@ toStringHTML(self)
        XML::LibXML::Document::serialize_html = 1
     PREINIT:
         xmlChar *result=NULL;
-        STRLEN len = 0;
+        int len = 0;
         PREINIT_SAVED_ERROR
     CODE:
         PERL_UNUSED_VAR(ix);
         xs_warn( "use no formated toString!" );
         INIT_ERROR_HANDLER;
-        htmlDocDumpMemory(self, &result, (int*)&len);
+        htmlDocDumpMemory(self, &result, &len);
         CLEANUP_ERROR_HANDLER;
         REPORT_ERROR(0);
 
-- 
1.7.10
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to