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++
This commit is contained in:
parent
627771cfee
commit
9c4487026d
3 changed files with 45 additions and 3 deletions
|
@ -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/}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
41
textproc/p5-XML-SAX/patches/patch-ab
Normal file
41
textproc/p5-XML-SAX/patches/patch-ab
Normal file
|
@ -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({});
|
Loading…
Reference in a new issue