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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Dominik Stadler
57d746827f
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=61162
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911459 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 12:13:13 +00:00
PJ Fanning
273067b103
apply some spelling fixes
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910659 13f79535-47bb-0310-9956-ffa450edef68
2023-06-28 11:55:29 +00:00
PJ Fanning
99634d6af6
apply some spelling fixes
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910627 13f79535-47bb-0310-9956-ffa450edef68
2023-06-27 11:48:38 +00:00
Dominik Stadler
d3e35e740a
Remove deprecation warnings reported with newer commons-io
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910300 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 08:53:08 +00:00
PJ Fanning
5fb90fdcce
remove temporary hacks
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908529 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 20:40:14 +00:00
PJ Fanning
17899fc75b
temporary hack to build to see if the gradle toolchain logic is what is breaking all our https://ci-builds.apache.org/ builds for Java 8
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908515 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 13:17:53 +00:00
PJ Fanning
27344ca661
use 'an'
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908483 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 11:35:26 +00:00
Dominik Stadler
b8cc997cd0
Bug 66521: Add a utility to clear all thread locals
...
Otherwise some applications may complain about left-over things,
e.g. Tomcat sometimes reports warning logs if Threads are not
cleaned up before being passed back into the global thread-pool.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908263 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 06:49:12 +00:00
Dominik Stadler
5b84aae94c
Update/fix JavaDoc and add "throws"
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908240 13f79535-47bb-0310-9956-ffa450edef68
2023-03-10 08:08:16 +00:00
PJ Fanning
aa9069c7df
[bug-66518] license header
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908193 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:30:58 +00:00
PJ Fanning
dcc66fde79
[bug-66518] fix issue in AbstractExcelUtils.getColor(HSSFColor)
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908192 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:04:59 +00:00
PJ Fanning
9a181c1a2d
[bug-66518] fix issue in AbstractExcelUtils.getColor(HSSFColor)
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908191 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:03:19 +00:00
PJ Fanning
2f2e61311a
add test
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908190 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 10:57:31 +00:00
PJ Fanning
729e012804
try to fix gradle issues
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907808 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 20:08:44 +00:00
PJ Fanning
d07d8e42b9
revert use of ExceptionUtil on caught exceptions (not useful)
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907654 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 15:03:26 +00:00
PJ Fanning
3968e289e4
fix up use of ExceptionUtil in main poi-scratchpad module
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907652 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 14:51:27 +00:00
Dominik Stadler
c8c06d1ec0
Saxon-HE is included in more place, combine these into the main gradle build
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906427 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 19:58:45 +00:00
Dominik Stadler
1ff1e84e4a
Avoid some NullPointerException and ClassCastExceptions found when fuzzing Apache POI
...
This mostly only makes thrown runtime-exceptions a bit more consistent and
improves information in exceptions.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906360 13f79535-47bb-0310-9956-ffa450edef68
2023-01-03 19:52:03 +00:00
Dominik Stadler
49526667ab
Change more assertions to proper checks
...
A broken input-document should not trigger assertions,
but proper exceptions with useful information for the user
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906327 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:48 +00:00
Dominik Stadler
059283c9e6
Prevent more cases of unbounded allocation
...
Test WordToTextConverter with all sample files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906326 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:44 +00:00
Dominik Stadler
5724a77cf2
Avoid some NullPointerExceptions and ClassCastExceptions found when fuzzing Apache POI
...
This mostly only makes thrown exceptions a bit more consistent
or may allow some broken documents to be still read.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906322 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:32 +00:00
PJ Fanning
37994bf3e2
[github-409] Textruns not honouring highlight. Thans to gffloodg. This closes #409
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906248 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 17:45:21 +00:00
PJ Fanning
78516f50dc
try to get rid of cached module-info classes
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906232 13f79535-47bb-0310-9956-ffa450edef68
2022-12-27 18:45:15 +00:00
PJ Fanning
5e212e4a33
doesn't matter what jdk vendor is used to build module-info classes
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906212 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 10:05:10 +00:00
PJ Fanning
8898d2d15a
try to fix build
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906208 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 00:24:29 +00:00
PJ Fanning
edee60d87a
rebuild module-info.class files even if Java8 used
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906207 13f79535-47bb-0310-9956-ffa450edef68
2022-12-25 23:56:32 +00:00
PJ Fanning
1494812da8
try to build sboms
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906146 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 17:52:29 +00:00
PJ Fanning
b8d4597ea4
cyclonedx per module
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906134 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 11:23:43 +00:00
PJ Fanning
a0abaf205a
license issue
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905063 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 09:44:37 +00:00
PJ Fanning
c838c6cd6c
[bug-66335] apply rest of fix
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905062 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 09:13:05 +00:00
PJ Fanning
c4a0266cb3
[bug-66335] add test case for issue and add some of the code from purported fix
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905061 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 08:33:38 +00:00