DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27929>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27929 Opening XLS file with drop down list throws ArrayIndexOutofBoundsException ------- Additional Comments From [EMAIL PROTECTED] 2004-04-29 09:34 ------- I was able to track down this bug even for an 'empty' workbook (that is, nothing is visible there). The error occurs if in a call to static method SubRecord.createSubRecord( short subRecordSid, short size, byte[] data, int offset ) the 'size' parameters exceeds the available space in the 'data' buffer. As a consequence. I implemented a workaround that works for me by doing some checks in method ObjRecord::fillFields() before the thread of control proceeds to SubRecord.createSubRecords() there. I'm well aware this patch might be dangerous. Find the diff of file ObjRecord.java below, the entire new file is placed into a separate attachment (that still contains some useful trace messages). 99c99,107 < Record subRecord = SubRecord.createSubRecord(subRecordSid, subRecordSize, data, pos + 4); --- > Record subRecord = null; > if (size - (pos+4) < subRecordSize) > { > subRecord = SubRecord.createSubRecord(subRecordSid,size-(pos+4)), data, pos+4); > } > else > { > subRecord = SubRecord.createSubRecord(subRecordSid, subRecordSize, data, pos+4); > } 103d110 < --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
