hwpf: ignore incorrect ListFormatOverride reference that causes IndexOutOfBoundException

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1064110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2011-01-27 12:42:12 +00:00
parent e57d3c7631
commit 9269c0850c
2 changed files with 5 additions and 1 deletions

View File

@ -165,6 +165,10 @@ public final class ListTables
return _overrideList.get(lfoIndex - 1);
}
public int getOverrideCount() {
return _overrideList.size();
}
public int getOverrideIndexFromListID(int lstid)
{
int returnVal = -1;

View File

@ -37,7 +37,7 @@ public final class ListEntry
{
super(papx, parent);
if(tables != null) {
if(tables != null && _props.getIlfo() < tables.getOverrideCount()) {
ListFormatOverride override = tables.getOverride(_props.getIlfo());
_overrideLevel = override.getOverrideLevel(_props.getIlvl());
_level = tables.getLevel(override.getLsid(), _props.getIlvl());