Commit Graph

614 Commits

Author SHA1 Message Date
PJ Fanning a139a17909 [github-692] D* functions are incompatible with the diamond operator. Thanks to Luk Spiewak. This closes #692
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920817 13f79535-47bb-0310-9956-ffa450edef68
2024-09-20 20:20:34 +00:00
Dominik Stadler 0559accac4 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a possible NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919562 13f79535-47bb-0310-9956-ffa450edef68
2024-07-28 11:02:18 +00:00
PJ Fanning c05eebf415 add chinese hssf test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919373 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 14:19:35 +00:00
PJ Fanning 889ba37ae9 remove 22742.xls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919372 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 13:36:06 +00:00
Dominik Stadler 0dea4a301c Bug 66425: Avoid exceptions found via poi-fuzz
Processing formats uses regular expressions. Very complex formats
can recurse very deeply and thus can cause StackOVerflows depending
on the used stack-size.

In order to handle this a bit more gracefully, we now catch this
and report a better exception with details about the parsed 
format and potential mitigation.

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919342 13f79535-47bb-0310-9956-ffa450edef68
2024-07-18 07:09:32 +00:00
Dominik Stadler 09fbfd5be4 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible OutOfMemoryException with many child-records

This avoids having too many children in EscherRecords, the limit of
100_000 is arbitrarily chosen and can be adjusted if needed  

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62924 and maybe others

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919272 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 05:26:42 +00:00
Dominik Stadler 2582e5e0c1 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible StackOverflowException

This adds support of counting of the "nesting level" into the base 
EscherRecord and thus makes this existing limitation much more effective
as it kicks in for more types of nested records. 

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919256 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 13:02:43 +00:00
Dominik Stadler e2044c958b Bug 66425: Avoid exceptions found via poi-fuzz
Prevent too much memory usage

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919237 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:41:04 +00:00
Dominik Stadler a042165133 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919215 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:56 +00:00
Dominik Stadler fc17f113d8 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a ClassCastException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919214 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:50 +00:00
Dominik Stadler 7601beb592 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919213 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:43 +00:00
Dominik Stadler 148ac23c0d List expected failures in stress.xls instead of fully excluding them
We list expected failures in stress.xls to verify that
the error message is correct and no unexpected exception
is introduced

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919212 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:38 +00:00
PJ Fanning bfd4645a72 add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919064 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 14:16:47 +00:00
Dominik Stadler 397cee3a12 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918985 13f79535-47bb-0310-9956-ffa450edef68
2024-07-07 06:40:31 +00:00
PJ Fanning 6e07ce50dd add dataformatter test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918819 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 09:42:02 +00:00
PJ Fanning 8a37350e94 rename file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918803 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 22:50:04 +00:00
PJ Fanning f8a990051b throw exception if xlsx contains duplicate file names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918800 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 21:36:31 +00:00
Dominik Stadler 3f243f65ab Change one exception to warning-log to avoid regressions in mass-tests
This avoids "breaking" a few documents which could be opened before.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918118 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 11:31:31 +00:00
Dominik Stadler 329a659739 Avoid NPE and improve error message when saving a package-part fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918117 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 09:39:57 +00:00
PJ Fanning af5d4b9f22 [bug-69021] add guard around cast
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917779 13f79535-47bb-0310-9956-ffa450edef68
2024-05-17 10:00:28 +00:00
Dominik Stadler 3800aa5418 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917269 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 13:32:30 +00:00
Dominik Stadler 5813a6d2d3 One integration-test file now fails in "additional" as well
Not sure which change introduced this as it worked initially...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917223 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 16:12:36 +00:00
Dominik Stadler 8c101982e0 Integration tests: Add writing out the document
This will cover some more functionality

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:35 +00:00
PJ Fanning eebb3717e0 [bug-63189] support hyperlink relationships. Thanks to Ohyoung Kwon. This closes #617
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917134 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 09:23:54 +00:00
Dominik Stadler 9453fa908a Bug 66425: Avoid exceptions found via poi-fuzz
Use correct default date-format, add some tests

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917070 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:46 +00:00
Dominik Stadler c4e8388742 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917069 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:38 +00:00
Dominik Stadler 51637fcc43 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a few NullPointerException

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917068 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:33 +00:00
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 5cc8b9958c 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=63266

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913383 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 10:07:57 +00:00
PJ Fanning fee050b391 revert change to github-321.xlsx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913343 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 09:55:33 +00:00
PJ Fanning 9dec19ba00 commons-io 2.15.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913340 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 09:07:54 +00:00
PJ Fanning c8d0332c60 update test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913328 13f79535-47bb-0310-9956-ffa450edef68
2023-10-25 16:39:46 +00:00
PJ Fanning e80ae0bb07 [bug-67784] add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913068 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 16:05:08 +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