mirror of https://github.com/apache/poi.git
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64212 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d54c8f16e6
commit
a27029d1af
|
@ -132,13 +132,15 @@ public final class FeatRecord extends StandardRecord {
|
|||
cellRef.serialize(out);
|
||||
}
|
||||
|
||||
sharedFeature.serialize(out);
|
||||
if (sharedFeature != null) {
|
||||
sharedFeature.serialize(out);
|
||||
}
|
||||
}
|
||||
|
||||
protected int getDataSize() {
|
||||
return 12 + 2+1+4+2+4+2+
|
||||
(cellRefs.length * CellRangeAddress.ENCODED_SIZE)
|
||||
+sharedFeature.getDataSize();
|
||||
(cellRefs.length * CellRangeAddress.ENCODED_SIZE) +
|
||||
(sharedFeature == null ? 0 : sharedFeature.getDataSize());
|
||||
}
|
||||
|
||||
public int getIsf_sharedFeatureType() {
|
||||
|
|
|
@ -45,6 +45,7 @@ class TestBiffViewer extends BaseTestIteratingXLS {
|
|||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5786329142919168.xls", IllegalStateException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5889658057523200.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5175219985448960.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6137883240824832.xls", IndexOutOfBoundsException.class);
|
||||
|
||||
return excludes;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ class TestRecordLister extends BaseTestIteratingXLS {
|
|||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5786329142919168.xls", RecordFormatException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5889658057523200.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5175219985448960.xls", RecordFormatException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6137883240824832.xls", RecordFormatException.class);
|
||||
|
||||
return excludes;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue