[interchange-cvs] interchange - jon modified lib/Vend/Parser.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Wed May 10 18:47:31 EDT 2006
User: jon
Date: 2006-05-10 22:47:31 GMT
Modified: lib/Vend Parser.pm
Log:
Fix bug in parser that can cause an infinite loop when malformed ITL
opening tags are encountered.
Bug found and original patch supplied by Dan Collis-Puro <dan at endpoint.com>.
Revision Changes Path
2.12 +4 -10 interchange/lib/Vend/Parser.pm
rev 2.12, prev_rev 2.11
Index: Parser.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Parser.pm,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -u -r2.11 -r2.12
--- Parser.pm 30 Apr 2005 15:09:58 -0000 2.11
+++ Parser.pm 10 May 2006 22:47:31 -0000 2.12
@@ -1,6 +1,6 @@
# Vend::Parser - Interchange parser class
#
-# $Id: Parser.pm,v 2.11 2005/04/30 15:09:58 mheins Exp $
+# $Id: Parser.pm,v 2.12 2006/05/10 22:47:31 jon Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1997-2002 Red Hat, Inc.
@@ -69,7 +69,7 @@
use HTML::Entities ();
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.11 $, 10);
+$VERSION = substr(q$Revision: 2.12 $, 10);
sub new
@@ -246,21 +246,15 @@
} elsif ($$buf =~ s|^([^\]\n]+\])||) {
$eaten .= $1;
$self->start($tag, {}, [], $eaten);
- } elsif (length $$buf) {
+ } else {
#::logDebug("eaten $eaten");
# Not a conforming start tag, regard it as normal text
$self->text($eaten);
- } else {
- $$buf = $eaten; # need more data to know
- return $self;
}
- } elsif (length $$buf) {
+ } else {
#::logDebug("eaten $eaten");
$self->text($eaten);
- } else {
- $$buf = $eaten; # need more data to parse
- return $self;
}
} elsif (length $$buf) {
::logDebug("remaining: $$buf");
More information about the interchange-cvs
mailing list