hwpf: fix ArrayIndexOutOfBoundsException in Range.getCharacterRun() (TIKA-577)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1058176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2011-01-12 15:16:50 +00:00
parent 4358a18407
commit 5f669d2a4d
1 changed files with 5 additions and 0 deletions

View File

@ -791,6 +791,11 @@ public class Range { // TODO -instantiable superclass
int[] point = findRange(_paragraphs, _parStart, Math.max(chpx.getStart(), _start), chpx
.getEnd());
if (point[0] >= _paragraphs.size()) {
return null;
}
PAPX papx = _paragraphs.get(point[0]);
short istd = papx.getIstd();