Package: libxml-libxml-perl 
Version: 1.59-2

When XML::LibXML::SAX encounters an empty CDATA section while parsing an
XML file, it will sometimes call the "characters" method of the SAX
handler with an empty hash value as argument. This is wrong, and breaks
XML::RSS::Parser.

When the parser sees <![CDATA[]]>, it calls
  $handler->characters( { } );

This is wrong. It should either call
  $handler->characters( { Data => "" } );
or not call the method at all.

Sample program:
--
use XML::LibXML::SAX;
use strict;
use warnings;

package a;
sub new($) { return bless { }; }
sub characters($$) { my ($s, $d) = @_; print "'$d->{Data}'\n"; }

my $p = XML::LibXML::SAX->new(Handler => a->new());
$p->parse_string('<a> <![CDATA[]]> </a>');
--

Running the sample program results in:
Use of uninitialized value in concatenation (.) or string at libxmlbug.pl line 
7.

Greetings,
  Joris.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to