bug#52560 - ArrayIndexOutOfBoundsException: -2 on NPOIFSFileSystem.readBAT

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1237629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2012-01-30 12:55:29 +00:00
parent 32cb03878c
commit 32b830954e

View File

@ -369,7 +369,7 @@ public class NPOIFSFileSystem extends BlockStore
for(int j=0; j<bigBlockSize.getXBATEntriesPerBlock(); j++) {
int fatAt = xfat.getValueAt(j);
if(fatAt == POIFSConstants.UNUSED_BLOCK) break;
if(fatAt == POIFSConstants.UNUSED_BLOCK || fatAt == POIFSConstants.END_OF_CHAIN) break;
readBAT(fatAt, loopDetector);
}
}