mirror of https://github.com/apache/poi.git
Bug 66425: Avoid exceptions found via poi-fuzz
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
This commit is contained in:
parent
5cc8b9958c
commit
56eb1ccff6
|
@ -69,6 +69,7 @@ public abstract class BaseTestPPTIterating {
|
|||
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() {
|
||||
|
|
|
@ -68,7 +68,8 @@ public class TestPPTXMLDump extends BaseTestPPTIterating {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,11 @@ public class AgileEncryptionHeader extends EncryptionHeader {
|
|||
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);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue