View | Details | Raw Unified | Return to bug 53810
Collapse All | Expand All

(-)a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java (-3 / +7 lines)
Lines 356-361 public class NPOIFSFileSystem extends BlockStore Link Here
356
          readBAT(fatAt, loopDetector);
356
          readBAT(fatAt, loopDetector);
357
       }
357
       }
358
       
358
       
359
360
       int remain = _header.getBATCount() - _header.getBATArray().length;
361
359
       // Now read the XFAT blocks, and the FATs within them
362
       // Now read the XFAT blocks, and the FATs within them
360
       BATBlock xfat; 
363
       BATBlock xfat; 
361
       int nextAt = _header.getXBATIndex();
364
       int nextAt = _header.getXBATIndex();
Lines 366-377 public class NPOIFSFileSystem extends BlockStore Link Here
366
          xfat.setOurBlockIndex(nextAt);
369
          xfat.setOurBlockIndex(nextAt);
367
          nextAt = xfat.getValueAt(bigBlockSize.getXBATEntriesPerBlock());
370
          nextAt = xfat.getValueAt(bigBlockSize.getXBATEntriesPerBlock());
368
          _xbat_blocks.add(xfat);
371
          _xbat_blocks.add(xfat);
369
          
372
370
          for(int j=0; j<bigBlockSize.getXBATEntriesPerBlock(); j++) {
373
          int limit = Math.min(bigBlockSize.getXBATEntriesPerBlock(), remain);
374
          for(int j=0; j<limit; j++) {
371
             int fatAt = xfat.getValueAt(j);
375
             int fatAt = xfat.getValueAt(j);
372
             if(fatAt == POIFSConstants.UNUSED_BLOCK || fatAt == POIFSConstants.END_OF_CHAIN) break;
376
             if(fatAt == POIFSConstants.UNUSED_BLOCK || fatAt == POIFSConstants.END_OF_CHAIN) break;
373
             readBAT(fatAt, loopDetector);
377
             readBAT(fatAt, loopDetector);
374
          }
378
          }
379
          remain -= limit;
375
       }
380
       }
376
       
381
       
377
       // We're now able to load steams
382
       // We're now able to load steams
378
- 

Return to bug 53810