You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/10/13 20:38:52 UTC
[Bug 57080] New: IndexOutOfBoundsException in poi decryptor
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: dev@poi.apache.org
Reporter: pj.fanning@workday.com
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #4 from Nick Burch <ap...@gagravarr.org> ---
Can you try it with NPOIFSFileSystem rather than POIFSFileSystem?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
Andreas Beeker <an...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Andreas Beeker <an...@gmx.de> ---
Fixed with r1631600
The ole entry size was to big, so I've limited it based on the encrypted size
rounded to the next block size.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
PJ Fanning <pj...@workday.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |3.10-FINAL
OS|Mac OS X 10.4 |Mac OS X 10.9
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
--- Comment #5 from PJ Fanning <pj...@workday.com> ---
With NPOIFSFileSystem, I get:
java.lang.IndexOutOfBoundsException: Can't read past the end of the stream
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:164)
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:142)
at
org.apache.poi.poifs.filesystem.NDocumentInputStream.readFully(NDocumentInputStream.java:248)
at
org.apache.poi.poifs.filesystem.NDocumentInputStream.read(NDocumentInputStream.java:150)
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
Andreas Beeker <an...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
OS| |All
--- Comment #1 from Andreas Beeker <an...@gmx.de> ---
> I will add a zip file containing a test case and the xlsx file.
the xlsx and its password is enough. I'll have a look onto it.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
--- Comment #2 from PJ Fanning <pj...@workday.com> ---
Created attachment 32103
--> https://issues.apache.org/bugzilla/attachment.cgi?id=32103&action=edit
xlsx file that causes issue (password=pwd123)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
--- Comment #7 from PJ Fanning <pj...@workday.com> ---
Thanks for the quick response. I have verified that the latest source fixes
this for both POIFSFileSystem and NPOIFSFileSystem.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57080] IndexOutOfBoundsException in poi decryptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57080
PJ Fanning <pj...@workday.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #3 from PJ Fanning <pj...@workday.com> ---
Thanks Andreas.
Attached xlsx file, password=pwd123.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org