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
Thanks in advance,
gregor herrmann, Debian Perl Group