diff options
author | Dominik Stadler <centic@apache.org> | 2023-10-03 06:05:30 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-10-03 06:05:30 +0000 |
commit | 360c05d9e3496cb6b49e73732615fd9daedf40aa (patch) | |
tree | a9ad8a1b361f4a46e96a4276e3f4c9181bdb237d /poi/src | |
parent | 105966cc29113e90a47943bed1d9752e768353ea (diff) | |
download | poi-360c05d9e3496cb6b49e73732615fd9daedf40aa.tar.gz poi-360c05d9e3496cb6b49e73732615fd9daedf40aa.zip |
Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions
and StackOverflowException, but it was possible to trigger them
Also improve some exception messages
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62698
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62606
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62685
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912707 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi/src')
-rw-r--r-- | poi/src/main/java/org/apache/poi/hssf/record/OldStringRecord.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/hssf/record/OldStringRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/OldStringRecord.java index 0334925cd8..91a00265ff 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/OldStringRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/OldStringRecord.java @@ -89,7 +89,7 @@ public final class OldStringRecord implements GenericRecord { try { return CodePageUtil.getStringFromCodePage(data, cp); } catch (UnsupportedEncodingException uee) { - throw new IllegalArgumentException("Unsupported codepage requested", uee); + throw new IllegalArgumentException("Unsupported codepage requested: " + cp, uee); } } |