[perl-XML-SAX] Specify all dependencies and fix RT#20126
Jitka Plesnikova
jplesnik at fedoraproject.org
Wed Aug 15 16:16:38 UTC 2012
commit 9c5934b4b43faa185095c01389d408780cf55be4
Author: Jitka Plesnikova <jplesnik at redhat.com>
Date: Wed Aug 15 18:16:25 2012 +0200
Specify all dependencies and fix RT#20126
perl-XML-SAX-0.99-rt20126.patch | 42 +++++++++++++++++++++++++++++++++++++++
perl-XML-SAX.spec | 21 +++++++++++++++++-
2 files changed, 61 insertions(+), 2 deletions(-)
---
diff --git a/perl-XML-SAX-0.99-rt20126.patch b/perl-XML-SAX-0.99-rt20126.patch
new file mode 100644
index 0000000..5f0d100
--- /dev/null
+++ b/perl-XML-SAX-0.99-rt20126.patch
@@ -0,0 +1,42 @@
+diff --git a/SAX/PurePerl.pm b/SAX/PurePerl.pm
+--- a/SAX/PurePerl.pm 2006-04-24 01:20:09.000000000 +0200
++++ b/SAX/PurePerl.pm 2012-08-09 12:47:48.736728516 +0200
+@@ -595,22 +595,23 @@ sub Comment {
+
+ my $data = $reader->data(4);
+ if ($data =~ /^<!--/) {
+- $reader->move_along(4);
++ $reader->move_along(4); # skip comment start
++ $data = $reader->data;
++ while ($data !~ m!-->!) {
++ my $n = $reader->read_more;
++ $self->parser_error("End of data seen while looking for close comment marker", $reader)
++ unless $n;
++ $data = $reader->data;
++ }
++
+ my $comment_str = '';
+- while (1) {
+- my $data = $reader->data;
+- $self->parser_error("End of data seen while looking for close comment marker", $reader)
+- unless length($data);
+- if ($data =~ /^(.*?)-->/s) {
+- $comment_str .= $1;
+- $self->parser_error("Invalid comment (dash)", $reader) if $comment_str =~ /-$/;
+- $reader->move_along(length($1) + 3);
+- last;
+- }
+- else {
+- $comment_str .= $data;
+- $reader->move_along(length($data));
+- }
++ if ($data =~ /^(.*?)-->/s) {
++ $comment_str = $1;
++ $self->parser_error("Invalid comment (dash)", $reader) if $comment_str =~ /-$/;
++ $reader->move_along(length($1) + 3);
++ }
++ else {
++ return 0;
+ }
+
+ $self->comment({ Data => $comment_str });
diff --git a/perl-XML-SAX.spec b/perl-XML-SAX.spec
index 0375bd9..5082c43 100644
--- a/perl-XML-SAX.spec
+++ b/perl-XML-SAX.spec
@@ -1,19 +1,31 @@
Summary: XML-SAX Perl module
Name: perl-XML-SAX
Version: 0.99
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/XML-SAX/
Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Fix rt#20126
+Patch0: perl-XML-SAX-0.99-rt20126.patch
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(base)
+BuildRequires: perl(Carp)
+BuildRequires: perl(constant)
+BuildRequires: perl(Encode)
+BuildRequires: perl(Exporter)
+BuildRequires: perl(Fatal)
+BuildRequires: perl(File::Path)
+BuildRequires: perl(File::Spec)
+BuildRequires: perl(IO::File)
+BuildRequires: perl(Test)
BuildRequires: perl(XML::NamespaceSupport) >= 0.03
# XML::SAX::Base became independent package, BR just for test
BuildRequires: perl(XML::SAX::Base)
+BuildRequires: perl(XML::SAX::Exception)
Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
# Remove bogus XML::SAX::PurePerl* dependencies and unversioned provides
@@ -31,6 +43,7 @@ JAXP specification (SAX part), only without the javaness.
%prep
%setup -q -n XML-SAX-%{version}
+%patch0 -p1
%build
@@ -84,6 +97,10 @@ rm -rf "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" || :
%changelog
+* Wed Aug 15 2012 Jitka Plesnikova <jplesnik at redhat.com> - 0.99-6
+- Fixed incorrect parsing of comments (RT#20126).
+- Specify all dependencies.
+
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.99-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list