Bug 45437 - WordExtractor throws OutOfMemoryError on password protected Word files
Summary: WordExtractor throws OutOfMemoryError on password protected Word files
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-19 02:15 UTC by Zsolt Koppany
Modified: 2008-07-24 01:58 UTC (History)
0 users



Attachments
test data (19.50 KB, application/octet-stream)
2008-07-19 02:16 UTC, Zsolt Koppany
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt Koppany 2008-07-19 02:15:35 UTC
Using POI-3.1-final I get the stack trace below:

java.lang.OutOfMemoryError: Java heap space
    at org.apache.poi.hwpf.model.UnhandledDataStructure.<init>(UnhandledDataStructure.java:28)
    at org.apache.poi.hwpf.model.FIBFieldHandler.<init>(FIBFieldHandler.java:162)
    at org.apache.poi.hwpf.model.FileInformationBlock.fillVariableFields(FileInformationBlock.java:67)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:177)
    at org.apache.poi.hwpf.extractor.WordExtractor.<init>(WordExtractor.java:56)
    at org.apache.poi.hwpf.extractor.WordExtractor.<init>(WordExtractor.java:48)
Comment 1 Zsolt Koppany 2008-07-19 02:16:57 UTC
Created attachment 22284 [details]
test data

This attachment reproduced the bug.
Comment 2 Nick Burch 2008-07-21 12:36:23 UTC
Fix applied to svn trunk. It'll now throw an org.apache.poi.EncryptedDocumentException
Comment 3 Zsolt Koppany 2008-07-21 22:36:28 UTC
Can you provide the patched class as an attachment?
Comment 4 Nick Burch 2008-07-22 03:00:20 UTC
Just grab it from svn / grab a nightly build

http://poi.apache.org/subversion.html
http://encore.torchbox.com/poi-svn-build/
Comment 5 Zsolt Koppany 2008-07-23 02:23:39 UTC
Which class(es) did you modify?