mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix bug : read error when position after 2147483647 (#3829)
Co-authored-by: huang.lin <hh@chaintool.ai>
This commit is contained in:
parent
f6c8720ded
commit
c34f04b35b
|
@ -119,9 +119,8 @@ public class SeaweedInputStream extends InputStream {
|
|||
|
||||
long bytesRead = 0;
|
||||
int len = buf.remaining();
|
||||
int start = (int) this.position;
|
||||
if (start + len <= entry.getContent().size()) {
|
||||
entry.getContent().substring(start, start + len).copyTo(buf);
|
||||
if (this.position< Integer.MAX_VALUE && (this.position + len )<= entry.getContent().size()) {
|
||||
entry.getContent().substring((int)this.position, (int)(this.position + len)).copyTo(buf);
|
||||
} else {
|
||||
bytesRead = SeaweedRead.read(this.filerClient, this.visibleIntervalList, this.position, buf, SeaweedRead.fileSize(entry));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue