https://issues.apache.org/bugzilla/show_bug.cgi?id=57080

            Bug ID: 57080
           Summary: IndexOutOfBoundsException in poi decryptor
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POIFS
          Assignee: [email protected]
          Reporter: [email protected]

Hi,
I will add a zip file containing a test case and the xlsx file.
The password protected xlsx was generated using the extenxls jar and I suspect
that it creates metadata that is not 100% valid.
If I resave the xlsx using Excel 2011, the file can be decrypted ok with poi
(v3.10.1).
Would it be possible for someone to look at why the IndexOutOfBoundsException
is happening and if the code could workaround from the underlying xlsx issue?

Regards,
PJ

java.lang.ArrayIndexOutOfBoundsException: 12
    at
org.apache.poi.poifs.storage.DocumentBlock.getDataInputBlock(DocumentBlock.java:177)
    at
org.apache.poi.poifs.filesystem.POIFSDocument.getDataInputBlock(POIFSDocument.java:284)
    at
org.apache.poi.poifs.filesystem.ODocumentInputStream.getDataInputBlock(ODocumentInputStream.java:107)
    at
org.apache.poi.poifs.filesystem.ODocumentInputStream.readFully(ODocumentInputStream.java:245)
    at
org.apache.poi.poifs.filesystem.ODocumentInputStream.read(ODocumentInputStream.java:140)
    at
org.apache.poi.poifs.filesystem.DocumentInputStream.read(DocumentInputStream.java:118)
    at
org.apache.poi.poifs.filesystem.DocumentInputStream.read(DocumentInputStream.java:114)
    at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:103)
    at javax.crypto.CipherInputStream.read(CipherInputStream.java:224)
    at org.apache.poi.util.BoundedInputStream.read(BoundedInputStream.java:121)
    at org.apache.poi.util.BoundedInputStream.read(BoundedInputStream.java:103)
    at org.apache.poi.util.IOUtils.toByteArray(IOUtils.java:48)
    at test.PoiTest.decrypt(PoiTest.java:22)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to