mirror of https://github.com/apache/poi.git
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent ClassCastException Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63736 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb1aaf1e4e
commit
4d175324f2
|
@ -36,6 +36,10 @@ public class AgileEncryptionInfoBuilder implements EncryptionInfoBuilder {
|
|||
|
||||
@Override
|
||||
public void initialize(EncryptionInfo info, LittleEndianInput dis) throws IOException {
|
||||
if (!(dis instanceof InputStream)) {
|
||||
throw new IllegalArgumentException("Had unexpected type of input: " + (dis == null ? "<null>" : dis.getClass()));
|
||||
}
|
||||
|
||||
EncryptionDocument ed = parseDescriptor((InputStream)dis);
|
||||
info.setHeader(new AgileEncryptionHeader(ed));
|
||||
info.setVerifier(new AgileEncryptionVerifier(ed));
|
||||
|
|
|
@ -89,6 +89,7 @@ public abstract class BaseTestIteratingXLS {
|
|||
// fuzzed binaries
|
||||
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);
|
||||
return excludes;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue