Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch added
* HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML
parsing, applied his patch
* result/HTML/attrents.html result/HTML/attrents.html.err
result/HTML/attrents.html.sax test/HTML/attrents.html:
added the test and result case provided by Mikhail Sogrine
Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index e4a5226..dad6402 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -1946,6 +1946,13 @@
for ( ; bits >= 0; bits-= 6) {
*out++ = ((c >> bits) & 0x3F) | 0x80;
}
+
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
} else {
ent = htmlParseEntityRef(ctxt, &name);
if (name == NULL) {