Commit Graph

12690 Commits

Author SHA1 Message Date
Dominik Stadler 2999073715 Apply some IDE suggestions, add tests, set unit-test to isolated
Without Isolation, one test did change static settings 
and thus could cause flaky tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911891 13f79535-47bb-0310-9956-ffa450edef68
2023-08-24 08:53:01 +00:00
Dominik Stadler cdb2ba1398 Bug 66425: Avoid a NullPointerException 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=61441

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911890 13f79535-47bb-0310-9956-ffa450edef68
2023-08-24 08:48:45 +00:00
Dominik Stadler e4ba9822cc Bug 66425: Avoid a NullPointerException found via oss-fuzz
ArrayIndexOutOfBoundsException has different message depending on JDK

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911864 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 10:00:16 +00:00
Dominik Stadler 0654bf9d87 Bug 66425: Avoid a NullPointerException 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=61520

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911863 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 09:30:00 +00:00
Dominik Stadler fd29772be6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61578

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911860 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 08:26:27 +00:00
Dominik Stadler 1b88529d07 Bug 66425: Avoid a NullPointerException 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=61644

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911842 13f79535-47bb-0310-9956-ffa450edef68
2023-08-22 14:22:06 +00:00
PJ Fanning 5a4193b14d batik 1.17
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911828 13f79535-47bb-0310-9956-ffa450edef68
2023-08-21 15:16:27 +00:00
PJ Fanning c3f4201831 change test broken by bug-66988 change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911755 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 13:08:13 +00:00
PJ Fanning f07be05484 gradle 8.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911751 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 09:43:49 +00:00
PJ Fanning 1bdfdcc793 [bug-66988] Fully replace content of XWPFTableCell on setText. Thanks to Anton Oellerer. This closes #503
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911749 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 08:48:18 +00:00
PJ Fanning 1c1cff4357 gradle 8.2.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911737 13f79535-47bb-0310-9956-ffa450edef68
2023-08-17 08:48:31 +00:00
Dominik Stadler 9ae14ef6f0 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911618 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 17:37:14 +00:00
Dominik Stadler 733d3d10ea Bug 66425: Avoid a NullPointerException 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=61390

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911615 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:58 +00:00
Dominik Stadler 757708fb54 Jenkins DSL: Adjust nodes for job Test-Environment
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911614 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:54 +00:00
Dominik Stadler 0a932be11d Jenkins DSL: Add JDK 20, 21 and 22, disable JDK 18 and 19, remove JDK 10, 12, 13, 14
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911613 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:51 +00:00
PJ Fanning 5bedd077a6 curvesapi 1.08
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911604 13f79535-47bb-0310-9956-ffa450edef68
2023-08-11 14:52:47 +00:00
Dominik Stadler f034ca26b9 Bug 66425: Avoid a NullPointerException 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=61372

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911603 13f79535-47bb-0310-9956-ffa450edef68
2023-08-11 14:46:04 +00:00
PJ Fanning d152861036 [bug-66855] Formula parser incorrectly handles sheet name containing multiple single quotes in a row. Thanks to Kirill lebedev. This closes #496
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911589 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 09:38:39 +00:00
PJ Fanning a6a37bd0f0 add check for number of files inside zip
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911588 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 09:27:26 +00:00
Dominik Stadler 80264d5648 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61330

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911586 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 06:14:44 +00:00
Dominik Stadler 316738c9d0 Bug 66425: Avoid a NullPointerException found via oss-fuzz
Handle some data that can be missing properly.

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61332

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911585 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 04:54:25 +00:00
Dominik Stadler d9106c60fd Jenkins DSL: Add JDK 20 and 21 to Test-Environment job
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911584 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 04:37:47 +00:00
Dominik Stadler 107def2e65 Bug 66425: Avoid a StackOverflowException found via oss-fuzz
We try to avoid causing StackOverflow, but it was possible
to trigger one here with a specially crafted input-file.

This puts a limit on the number of nested children in place
and logs a warning when the Stream is not fully parsed.

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61256

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911577 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 16:16:49 +00:00
Dominik Stadler ccec6c4bf8 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61306

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911573 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 10:09:16 +00:00
Dominik Stadler b757cf607e Try to adjust for strange null-message for ArrayIndexOutOfBoundsException
Some CI runs seem to throw the exception with an empty message instead of 
the expected text.

I could not reproduce this consistently and so we only can disable a
check in this case.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911572 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 09:53:54 +00:00
Dominik Stadler fdeae16b0c Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61317

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911565 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 07:23:04 +00:00
Dominik Stadler e25c467209 Combine steps for tasks "jenkins" and "jenkinsLite" in one place
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911564 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 07:22:30 +00:00
Dominik Stadler 2e8afc0c01 Bug 66425: Avoid a StackOverflowException found via oss-fuzz
We try to avoid causing StackOverflow, but it was possible
to trigger one here with a specially crafted input-file.

This puts a limit on the number of nested properties in place
and logs a warning when the StyleSheet is not fully parsed.

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61252

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911563 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 05:45:21 +00:00
Dominik Stadler 543d6ad54b Do not disable all files for poi-integration in build.gradle
It seems doing it this way can kick in even when using JDK 11+ due 
to the Gradle toolchain.

Let's rather do a more specific exclusion in code to only exclude files
which actually cause JDK 8 to hang.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911562 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 05:44:01 +00:00
Dominik Stadler e706f37170 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61276

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911536 13f79535-47bb-0310-9956-ffa450edef68
2023-08-08 08:48:13 +00:00
Dominik Stadler 1b7613329e Bug 66425: Add memory-safeguard in one more place
We try to generally avoid overly large allocations in places
where arrays are allocated. 

We add one more such check for pictures in HSLF.

We might need to increase the used value of 10MB if users report 
larger files being used frequently. 

Overriding this check via IOUtils is possible.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911525 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 20:35:59 +00:00
Dominik Stadler 163ff25594 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
2023-08-07 20:01:19 +00:00
Dominik Stadler f3997b49ef Bug 66425: Avoid a ClassCastException found via oss-fuzz
Fix previous changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911522 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 19:59:04 +00:00
PJ Fanning ac9da84c86 use of junit internal StringUtils is causing build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911519 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 19:11:54 +00:00
PJ Fanning 3b9a7c42c1 use of junit internal StringUtils is causing build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911518 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 18:33:24 +00:00
Dominik Stadler 8e40aabb18 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61259

Also fix handling of NullPointerException

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911517 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 16:18:46 +00:00
Dominik Stadler 738d533a83 Reduce log4j2 level for integration tests to ERROR
Otherwise there is lots of output that is likely rarely useful. 

This can be changed locally for testing easily whenever necessary.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911516 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 15:17:10 +00:00
Dominik Stadler 5efa428ca0 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61242

Also enhance output of some test-failures and allow an empty exception message

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911515 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 15:15:38 +00:00
Dominik Stadler 2c5264277a Bug 66425: Avoid an AssertionError found via oss-fuzz
We try to avoid throwing AssertionError to be triggered by input data, 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=61251

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911514 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 14:32:11 +00:00
Dominik Stadler f6b1435db1 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61243

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911507 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 12:09:31 +00:00
Dominik Stadler ed12f1bb49 Open configuration file for integration-tests read-only to not fail if the file is opened by an Application locally
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911504 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 11:11:45 +00:00
Dominik Stadler a8b31c37a6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
Add exception details and fix expected exceptions to make tests run again

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911503 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 11:11:08 +00:00
Dominik Stadler 31fd087a48 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61249

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911501 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 09:42:17 +00:00
Dominik Stadler 6f054ddce1 Fix expected exception text and print out which FileHandler failed in integration-tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911495 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 17:13:46 +00:00
Dominik Stadler 1e8e95c3a6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, but it was possible
to trigger one here with a specially crafted input-file

Also rework test a bit to use try-with-resources and proper formatting

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61221

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911494 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 14:57:47 +00:00
PJ Fanning e5ff0e4eb6 upgrade junit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911476 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 08:39:16 +00:00
PJ Fanning 91c4ec6a45 avoid creating enumeration twice
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911470 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 22:20:38 +00:00
PJ Fanning ddef604f46 upgrade com.dorongold.task-tree
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911469 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 14:42:47 +00:00
PJ Fanning bfd3a59813 add back gradle wrapper jar due to windows build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911468 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 14:15:21 +00:00
PJ Fanning 0d18765c29 update jobs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911466 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:43:48 +00:00