From 9843809971fc3e92952ac30bee7c116fe18aac2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 6 Jun 2000 15:28:38 -0700 Subject: [PATCH] bugfix for <!ATTLIST> and read beyond EOF (EOS?) Rev: src/modules/spider/xml.c:1.20 --- src/modules/spider/xml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/spider/xml.c b/src/modules/spider/xml.c index 4dadef1212..9156c8044e 100644 --- a/src/modules/spider/xml.c +++ b/src/modules/spider/xml.c @@ -1338,7 +1338,7 @@ static void simple_read_attributes(struct xmldata *data, SKIPSPACE(); /* Read unordered attributes */ - while(isFirstNameChar(PEEK(0))) + while(data->input.len>0 && isFirstNameChar(PEEK(0))) { int iscd; SIMPLE_READNAME(); @@ -1828,6 +1828,7 @@ static int really_low_parse_dtd(struct xmldata *data) while(PEEK(0)=='|') { READ(1); + SKIPSPACE(); SIMPLE_READNAME(); SKIPSPACE(); check_stack(1); -- GitLab