提交 bc2c3e57 编写于 作者: D dav

7030632: Pasting HTML that was copied from MS Word results in IOException

Reviewed-by: uta, denis
上级 e7f0d56f
......@@ -830,7 +830,14 @@ class HTMLCodec extends InputStream {
if( -1 == iStartOffset ){
throw new IOException(FAILURE_MSG + "invalid HTML format.");
}
iReadCount = bufferedStream.skip(iStartOffset);
int curOffset = 0;
while (curOffset < iStartOffset){
curOffset += bufferedStream.skip(iStartOffset - curOffset);
}
iReadCount = curOffset;
if( iStartOffset != iReadCount ){
throw new IOException(FAILURE_MSG + "Byte stream ends in description.");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册