Commit Graph

78 Commits

Author SHA1 Message Date
Dominik Stadler a27029d1af Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64212

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915006 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:42 +00:00
Dominik Stadler 94ace1c4b0 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64943

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915004 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:31 +00:00
Dominik Stadler 4d175324f2 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
2023-12-30 19:39:24 +00:00
Dominik Stadler 8507fdf371 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent ClassCastException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63504

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914991 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:42 +00:00
Dominik Stadler 8e3b60f63d Bug 66425: Avoid exceptions found via poi-fuzz
Prevent StackOverflow via endless nesting

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65303

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914989 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:32 +00:00
Dominik Stadler 53cfc2cc96 Allow all IndexOutOfBoundsException to have either empty message or some message
Newer JDKs add a more useful exception message, so we need to be a bit more
lenient for these in integration tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914708 13f79535-47bb-0310-9956-ffa450edef68
2023-12-16 12:09:02 +00:00
Dominik Stadler 15dd62d659 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a ClassCastException and trigger some more
code in integration-testing.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63358

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914404 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:52 +00:00
Dominik Stadler c7329fbd38 Bug 66425: Avoid exceptions found via poi-fuzz
Change an assertion which can be triggered via an
input-document.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63309

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914403 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:45 +00:00
Dominik Stadler f1589b8d66 Bug 66425: Avoid exceptions found via poi-fuzz
Add an xsb file to ooxml-lite which seems to be
missing in some cases

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63652

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914402 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:38 +00:00
Dominik Stadler 9fda604fb8 Bug 66425: Avoid exceptions found via poi-fuzz
Capture and report integer overflow as normal
parsing/format exceptions

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63628

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914401 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:34 +00:00
Dominik Stadler 4cff905375 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=63142

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913385 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 10:08:09 +00:00
Dominik Stadler 56eb1ccff6 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
2023-10-27 10:08:04 +00:00
Dominik Stadler a227fa9443 integration-tests: Enable testing extracting for OPCFileHandler and fix single test
Enable running "extract" also for OPCFileHandler
Add additional expected failures in stress.xls

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912933 13f79535-47bb-0310-9956-ffa450edef68
2023-10-13 09:25:13 +00:00
Dominik Stadler 638a9be903 Bug 66425: Avoid exceptions found via poi-fuzz
Fix one expected exception-text which is different
on newer Java versions

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912804 13f79535-47bb-0310-9956-ffa450edef68
2023-10-08 05:41:26 +00:00
Dominik Stadler 2276c3571d Exception text changed for some file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912800 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:13:01 +00:00
Dominik Stadler e43c1bc911 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing ConcurrentModificationException,
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=62861

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912797 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:50 +00:00
Dominik Stadler 5cd4fa5488 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing ClassCastExceptions,
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=62795

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912796 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:43 +00:00
Dominik Stadler eb11f3324f Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
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=62745

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912795 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:35 +00:00
Dominik Stadler 50b4da40b8 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
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=62706

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912794 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:30 +00:00
Dominik Stadler 6fae5bbc18 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
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=62697

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912793 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:25 +00:00
Dominik Stadler c331c5d26a 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=62626

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912792 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:18 +00:00
Dominik Stadler c79fb75cbc Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62548 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62564

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912464 13f79535-47bb-0310-9956-ffa450edef68
2023-09-21 15:06:28 +00:00
Dominik Stadler ce919673c4 Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62530 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62491

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912433 13f79535-47bb-0310-9956-ffa450edef68
2023-09-20 14:55:19 +00:00
Dominik Stadler e7cb6ef5b2 Set one file to IGNORE as IBM JDK throws a different Exception
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912406 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 20:30:59 +00:00
Dominik Stadler 54f8384f0a Set one test-file to "IGNORED" in poi-integration
It was processing fine on some JVM versions, but failed with an error on others.
Seems there is a difference in XmlParsers across versions of the JVM.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912404 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 18:25:59 +00:00
Dominik Stadler 88bbfbb3f7 Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61562
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62068

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912383 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 06:38:37 +00:00
Dominik Stadler 9e2ce70d2b Bug 66425: Avoid NullPointerExceptions and ClassCastExceptions found via poi-fuzz
We try to avoid throwing NullPointerException and ClassCastExceptions, but it was possible
to trigger them

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62414
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62442
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62450

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912365 13f79535-47bb-0310-9956-ffa450edef68
2023-09-17 14:38:24 +00:00
Dominik Stadler cc4ccbae1d Bug 66425: Avoid NullPointerExceptions found via poi-fuzz
We try to avoid throwing NullPointerException, but it was possible
to trigger one here

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912281 13f79535-47bb-0310-9956-ffa450edef68
2023-09-13 10:59:54 +00:00
Dominik Stadler e94297bb64 Bug 66425: Avoid a NullPointerException found via oss-fuzz
Ignore results of one file because the Exception is different in Java 8 and Java 11

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912254 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:21 +00:00
Dominik Stadler 481c00bc6f 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=62170

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912252 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:13 +00:00
Dominik Stadler e666d3756e 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=62208

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912251 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:06 +00:00
Dominik Stadler dbd8808432 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=62216

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912250 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:01 +00:00
Dominik Stadler d7884a4e0f Adjust expected exception text for 47889.xlsx
The actual message depends on the version of Java

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912200 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:17 +00:00
Dominik Stadler 5cb768379d 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=62128

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912199 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:13 +00:00
Dominik Stadler f90415ef0e 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=62151

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912198 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:06 +00:00
Dominik Stadler e686e84512 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 add SXSSFWorkbook.write() to integrationtests

Fixes https://oss-fuzz.com/testcase-detail/5185049589579776

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912162 13f79535-47bb-0310-9956-ffa450edef68
2023-09-07 12:20:28 +00:00
Dominik Stadler 5c2a89412b 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

Fixes https://oss-fuzz.com/testcase-detail/4959857092198400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912157 13f79535-47bb-0310-9956-ffa450edef68
2023-09-07 08:35:23 +00:00
Dominik Stadler 5d073e3586 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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912139 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 14:48:58 +00:00
Dominik Stadler 24bf8c33f2 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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912138 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 14:33:59 +00:00
Dominik Stadler b801711afe 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=62059

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912127 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 10:38:51 +00:00
Dominik Stadler 4b03c24ec8 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=62074

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912125 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 09:48:21 +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 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 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
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 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