aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2023-08-07 20:01:19 +0000
committerDominik Stadler <centic@apache.org>2023-08-07 20:01:19 +0000
commit163ff25594bb2751ea2ea5e3df4f82fdf9219304 (patch)
treee060a2367bc285df2d7138ed1db10ed8e942b558 /poi-integration
parentf3997b49efaef3987f87e212ec41635b4339bbf9 (diff)
downloadpoi-163ff25594bb2751ea2ea5e3df4f82fdf9219304.tar.gz
poi-163ff25594bb2751ea2ea5e3df4f82fdf9219304.zip
Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing NullPointerException, but it was possible to trigger one here with a specially crafted input-file Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61266 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911523 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
index 446375affd..a9f3b37aee 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
@@ -235,7 +235,7 @@ public class TestAllFiles {
@SuppressWarnings("unchecked")
private static void verify(String file, Executable exec, Class<? extends Throwable> exClass, String exMessage, String password,
FileHandler fileHandler) {
- final String errPrefix = file + " - failed for handler " + fileHandler.getClass().getSimpleName() + ": ";
+ final String errPrefix = file.replace("\\", "/") + " - failed for handler " + fileHandler.getClass().getSimpleName() + ": ";
// this also removes the password for non encrypted files
Biff8EncryptionKey.setCurrentUserPassword(password);
if (exClass != null && AssertionFailedError.class.isAssignableFrom(exClass)) {