7030632: Pasting HTML that was copied from MS Word results in IOException
Reviewed-by: uta, denis
This commit is contained in:
parent
d097a2cab1
commit
b91701fce6
@ -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.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user