aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaxim Valyanskiy <maxcom@apache.org>2012-01-30 12:55:29 +0000
committerMaxim Valyanskiy <maxcom@apache.org>2012-01-30 12:55:29 +0000
commit91f163c97a2c5683c77967e8998d018887348b8f (patch)
tree85dc914c8fd2dd1c2013d5111ea43ad1ab3564cc /src
parentd8627fa5e1801bcbadaa22418dd2e851933d41af (diff)
downloadpoi-91f163c97a2c5683c77967e8998d018887348b8f.tar.gz
poi-91f163c97a2c5683c77967e8998d018887348b8f.zip
bug#52560 - ArrayIndexOutOfBoundsException: -2 on NPOIFSFileSystem.readBAT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1237629 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
index fbfd04d77a..def2af198d 100644
--- a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
+++ b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
@@ -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);
}
}