From: SourceForge.net <no...@so...> - 2011-10-06 17:19:21
|
Bugs item #3419740, was opened at 2011-10-06 11:19 Message generated for change (Tracker Item Submitted) made by kd7ike You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3419740&group_id=13153 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kim Ebert (kd7ike) Assigned to: Nobody/Anonymous (nobody) Summary: StringIndexOutOfBoundsException when lexing a web page Initial Comment: Possible fix for lexer bug. === modified file 'jtidy/src/main/java/org/w3c/tidy/Lexer.java' --- jtidy/src/main/java/org/w3c/tidy/Lexer.java 2010-05-06 23:18:10 +0000 +++ jtidy/src/main/java/org/w3c/tidy/Lexer.java 2010-11-02 02:18:59 +0000 @@ -1821,7 +1821,12 @@ if (TidyUtils.isLetter((char) c)) { continue; } - matches = container.element.equalsIgnoreCase(TidyUtils.getString(lexbuf, start, + /* Fix for bug #991 */ + if ((start + container.element.length()) > lexsize) + matches = false; + /* End Fix */ + else + matches = container.element.equalsIgnoreCase(TidyUtils.getString(lexbuf, start, container.element.length())); if (matches) { nested++; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3419740&group_id=13153 |