Fix one expected exception-text which is different
on newer Java versions
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63143
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@
1913384 13f79535-47bb-0310-9956-
ffa450edef68
EXCLUDED.put("clusterfuzz-testcase-minimized-POIHSLFFuzzer-5231088823566336.ppt", FileNotFoundException.class);
EXCLUDED.put("clusterfuzz-testcase-minimized-POIFuzzer-6411649193738240.ppt", FileNotFoundException.class);
EXCLUDED.put("clusterfuzz-testcase-minimized-POIHSLFFuzzer-4838893004128256.ppt", FileNotFoundException.class);
+ EXCLUDED.put("clusterfuzz-testcase-minimized-POIHSLFFuzzer-4624961081573376.ppt", FileNotFoundException.class);
}
public static Stream<Arguments> files() {
pFile.getName().equals("clusterfuzz-testcase-minimized-POIFuzzer-5681320547975168.ppt") ||
pFile.getName().equals("clusterfuzz-testcase-minimized-POIHSLFFuzzer-5231088823566336.ppt") ||
pFile.getName().equals("clusterfuzz-testcase-minimized-POIFuzzer-6411649193738240.ppt") ||
- pFile.getName().equals("clusterfuzz-testcase-minimized-POIHSLFFuzzer-4838893004128256.ppt")) {
+ pFile.getName().equals("clusterfuzz-testcase-minimized-POIHSLFFuzzer-4838893004128256.ppt") ||
+ pFile.getName().equals("clusterfuzz-testcase-minimized-POIHSLFFuzzer-4624961081573376.ppt")) {
throw new FileNotFoundException();
}
}
throw new EncryptedDocumentException("Unsupported chaining mode - "+ keyData.getCipherChaining());
}
- int hashSize = keyData.getHashSize();
+ Integer hashSizeObj = keyData.getHashSize();
+ if (hashSizeObj == null) {
+ throw new EncryptedDocumentException("Invalid hash size: " + hashSizeObj);
+ }
+ int hashSize = hashSizeObj;
HashAlgorithm ha = keyData.getHashAlgorithm();
setHashAlgorithm(ha);