Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a bug in the RewindableInputStream

  • Loading branch information...
commit 4f4b2f428afba535fcc271b08e8fd3b9140a2580 1 parent 72aedc0
@carllerche carllerche authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/com/strobecorp/kirk/RewindableInputStream.java
View
2  src/com/strobecorp/kirk/RewindableInputStream.java
@@ -292,7 +292,7 @@ private long fillBufFromTmpFile(long length) throws IOException {
}
}
- buf.clear().limit((int) length);
+ buf.clear().limit(Math.min((int) length, buf.capacity()));
if ( buffered > position ) {
tmpFile.position(position);
Please sign in to comment.
Something went wrong with that request. Please try again.