--- HTMLparser.c 2003-07-24 00:32:08.000000000 +0800 +++ HTMLparser.c.patched 2003-07-28 14:36:28.000000000 +0800 @@ -4358,10 +4358,11 @@ (buf[base + 2] == '-') && (buf[base + 3] == '-')) { incomment = 1; } - /* do not increment base, some people use */ + /* do not increment past */ + base += 2; } if (incomment) { - if (base + 3 < len) + if (base + 3 > len) return(-1); if ((buf[base] == '-') && (buf[base + 1] == '-') && (buf[base + 2] == '>')) {