poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "martijn.list" <martijn.l...@gmail.com>
Subject ArrayIndexOutOfBoundsException in EscherMetafileBlip#fillFields
Date Wed, 13 Oct 2010 15:18:08 GMT
Hi,

I get an ArrayIndexOutOfBoundsException when extracting an image from an
Excel file.

The exception is thrown when handling a DrawingGroupRecord event and
calling DrawingGroupRecord#decode() on the DrawingGroupRecord.

The exception is thrown because data does is not large enough (i.e.,
field_5_cbSave is larger than data.length - pos)

LINE 93 in EscherMetafileBlip:

System.arraycopy( data, pos, raw_pictureData, 0, field_5_cbSave );

Stacktrace:

java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at
org.apache.poi.ddf.EscherMetafileBlip.fillFields(EscherMetafileBlip.java:93)
	at org.apache.poi.ddf.EscherBSERecord.fillFields(EscherBSERecord.java:79)
	at
org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:53)
	at
org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:53)
	at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.convertToEscherRecords(AbstractEscherHolderRecord.java:82)
	at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.decode(AbstractEscherHolderRecord.java:260)
	at
mitm.common.extractor.impl.office.ExcelPOIExtractor$RecordEventListener.handleDrawingGroupRecord(ExcelPOIExtractor.java:451)
	at
mitm.common.extractor.impl.office.ExcelPOIExtractor$RecordEventListener.processRecord(ExcelPOIExtractor.java:475)
	at
org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener.processRecord(FormatTrackingHSSFListener.java:82)
	at
org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequest.java:112)
	at
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:147)
	at
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106)

Any idea what might be the problem?



Kind regards,

Martijn

PS I'm using trunk

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message