diff options
author | bouyer <bouyer@pkgsrc.org> | 2009-08-16 18:21:04 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2009-08-16 18:21:04 +0000 |
commit | 9c4487026dbc1ccde5fd184564afde6f20c9e16e (patch) | |
tree | 60a280eba301aecd3aced4d967ab602c87a58e27 /textproc | |
parent | 627771cfee9306dfc294f9bab05ec67c884ec472 (diff) | |
download | pkgsrc-9c4487026dbc1ccde5fd184564afde6f20c9e16e.tar.gz |
Add patch derived from
http://rt.cpan.org/Public/Bug/Display.html?id=43174
Fix an issue where "]]>" close tag could be skipped if split in 2 bufffers
when reading.
PKGREVISION++
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/p5-XML-SAX/Makefile | 4 | ||||
-rw-r--r-- | textproc/p5-XML-SAX/distinfo | 3 | ||||
-rw-r--r-- | textproc/p5-XML-SAX/patches/patch-ab | 41 |
3 files changed, 45 insertions, 3 deletions
diff --git a/textproc/p5-XML-SAX/Makefile b/textproc/p5-XML-SAX/Makefile index c5fbff99fc0..37f589214a7 100644 --- a/textproc/p5-XML-SAX/Makefile +++ b/textproc/p5-XML-SAX/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.25 2009/05/02 16:21:45 reed Exp $ +# $NetBSD: Makefile,v 1.26 2009/08/16 18:21:04 bouyer Exp $ DISTNAME= XML-SAX-0.96 PKGNAME= p5-${DISTNAME} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= textproc perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=XML/} diff --git a/textproc/p5-XML-SAX/distinfo b/textproc/p5-XML-SAX/distinfo index 342254d1227..7b2392093a8 100644 --- a/textproc/p5-XML-SAX/distinfo +++ b/textproc/p5-XML-SAX/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.8 2008/08/06 21:43:55 he Exp $ +$NetBSD: distinfo,v 1.9 2009/08/16 18:21:04 bouyer Exp $ SHA1 (XML-SAX-0.96.tar.gz) = ae050fcd129d247855bf480c1e44cdc2db823e9e RMD160 (XML-SAX-0.96.tar.gz) = 9b230c84fdad560d99e8fc616e6c58921bb1e2f4 Size (XML-SAX-0.96.tar.gz) = 62775 bytes SHA1 (patch-aa) = d474262178b0a36da51ed0cdfd56e75272f25d71 +SHA1 (patch-ab) = a1850ba4918732f58da4fb53b2cf07104182b96b diff --git a/textproc/p5-XML-SAX/patches/patch-ab b/textproc/p5-XML-SAX/patches/patch-ab new file mode 100644 index 00000000000..0fdb9ed6fd6 --- /dev/null +++ b/textproc/p5-XML-SAX/patches/patch-ab @@ -0,0 +1,41 @@ +$NetBSD: patch-ab,v 1.1 2009/08/16 18:21:04 bouyer Exp $ + +From http://rt.cpan.org/Public/Bug/Display.html?id=43174 + +--- SAX/PurePerl.pm.orig 2009-08-16 17:34:04.000000000 +0200 ++++ SAX/PurePerl.pm 2009-08-16 17:36:40.000000000 +0200 +@@ -308,21 +308,27 @@ + + $self->start_cdata({}); + +- $data = $reader->data; ++ my $chars; + while (1) { +- $self->parser_error("EOF looking for CDATA section end", $reader) +- unless length($data); ++ # do not miss "]]>", so try to read at least 3 chars ++ $data = $reader->data(3); ++ $self->parser_error ++ ("EOF looking for CDATA section end", $reader) ++ unless length($data) >= 3; + + if ($data =~ /^(.*?)\]\]>/s) { +- my $chars = $1; ++ $chars = $1; + $reader->move_along(length($chars) + 3); + $self->characters({Data => $chars}); + last; + } + else { +- $self->characters({Data => $data}); +- $reader->move_along(length($data)); +- $data = $reader->data; ++ # the last one or two "]" could be the beginning of a "]]>", ++ # so do no eat them ++ $data =~ /^(.*?)\]{0,2}+$/s; ++ $chars = $1; ++ $reader->move_along(length($chars)); ++ $self->characters({Data => $chars}); + } + } + $self->end_cdata({}); |