Skip to content

Commit

Permalink
#368 Include pos in array copy length calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed Mar 21, 2022
1 parent 4ac7080 commit dc00748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/lingala/zip4j/util/RawIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public long readLongLittleEndian(byte[] array, int pos) {
if (array.length - pos < 8) {
resetBytes(longBuff);
}
System.arraycopy(array, pos, longBuff, 0, array.length < 8 ? array.length - pos : 8);
System.arraycopy(array, pos, longBuff, 0, Math.min(array.length - pos, 8));

long temp = 0;
temp |= longBuff[7] & 0xff;
Expand Down

0 comments on commit dc00748

Please sign in to comment.