Prevent a ClassCastException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66089
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@
1919214 13f79535-47bb-0310-9956-
ffa450edef68
"spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx",
"spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx",
"spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx",
+ "spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4651309315719168.xls",
});
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
*/
@Internal
public void mark(int readlimit) {
+ if (!(_dataInput instanceof InputStream)) {
+ throw new IllegalStateException("Cannot use mark for dataInput of type " + _dataInput.getClass() + ", need an InputStream");
+ }
((InputStream)_dataInput).mark(readlimit);
_markedDataOffset = _currentDataOffset;
}
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6322470200934400.xls", RuntimeException.class);
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-4819588401201152.xls", RuntimeException.class);
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6537773940867072.xls", RuntimeException.class);
+ excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-4651309315719168.xls", RuntimeException.class);
return excludes;
}