This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0056e611f0 Update CompressedRTF.java
0056e611f0 is described below
commit 0056e611f013215b661447eb6ffc55dddf5bec56
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Jun 2 00:05:31 2026 +0100
Update CompressedRTF.java
---
poi-scratchpad/src/main/java/org/apache/poi/hmef/CompressedRTF.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/poi-scratchpad/src/main/java/org/apache/poi/hmef/CompressedRTF.java
b/poi-scratchpad/src/main/java/org/apache/poi/hmef/CompressedRTF.java
index 167d82c780..925ace90be 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/CompressedRTF.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/CompressedRTF.java
@@ -168,7 +168,7 @@ public final class CompressedRTF extends LZWDecompresser {
long remaining = getCompressedSize();
byte[] buffer = IOUtils.safelyAllocate(Math.min(8192L, remaining),
MAX_RECORD_LENGTH);
while (remaining > 0) {
- int read = src.read(buffer, 0, (int)Math.min(buffer.length,
remaining));
+ int read = src.read(buffer, 0,
Math.toIntExact(Math.min(buffer.length, remaining)));
if (read < 0) {
throw new IOException("Not enough data to read " +
getCompressedSize() + " bytes of uncompressed RTF");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]