You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2021/05/14 16:08:05 UTC
[commons-compress] branch master updated (de39b85 -> 2d1392d)
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git.
from de39b85 COMPRESS-567 turn possible RuntimeExceptions into IOExceptions
new ed32eb9 actually, InputStream wants an IIOBE here
new 2d1392d fix single-byte read when nothing has been read
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/commons/compress/utils/BoundedArchiveInputStream.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[commons-compress] 02/02: fix single-byte read when nothing has
been read
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 2d1392d2544165df2ae6bdb73f7473fd30dad33f
Author: Stefan Bodewig <st...@innoq.com>
AuthorDate: Fri May 14 18:05:39 2021 +0200
fix single-byte read when nothing has been read
Credit to OSS-Fuzz
---
.../org/apache/commons/compress/utils/BoundedArchiveInputStream.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java b/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
index b8e351c..d685968 100644
--- a/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
@@ -58,7 +58,7 @@ public abstract class BoundedArchiveInputStream extends InputStream {
singleByteBuffer.rewind();
}
int read = read(loc, singleByteBuffer);
- if (read < 0) {
+ if (read < 1) {
return read;
}
loc++;
[commons-compress] 01/02: actually, InputStream wants an IIOBE here
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit ed32eb968ef124b9c0e19ccdda2c9d60dbfe451e
Author: Stefan Bodewig <st...@innoq.com>
AuthorDate: Fri May 14 18:02:58 2021 +0200
actually, InputStream wants an IIOBE here
---
.../org/apache/commons/compress/utils/BoundedArchiveInputStream.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java b/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
index 4f7ec27..b8e351c 100644
--- a/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/BoundedArchiveInputStream.java
@@ -71,7 +71,7 @@ public abstract class BoundedArchiveInputStream extends InputStream {
return 0;
}
if (off < 0 || len > b.length - off) {
- throw new IllegalArgumentException("offset or len are out of bounds");
+ throw new IndexOutOfBoundsException("offset or len are out of bounds");
}
if (len > end - loc) {