Skip to content

Commit 2a2f1dc

Browse files
committed
COMPRESS-432 make sure code doesn't get stuck in infinite loop
1 parent dcb0486 commit 2a2f1dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/commons/compress/archivers/zip/X0017_StrongEncryptionHeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public void parseCentralDirectoryFormat(final byte[] data, final int offset, fin
310310
this.hashAlg = HashAlgorithm.getAlgorithmByCode(ZipShort.getValue(data, offset + 12));
311311
this.hashSize = ZipShort.getValue(data, offset + 14);
312312
// srlist... hashed public keys
313-
for (int i = 0; i < this.rcount; i++) {
313+
for (long i = 0; i < this.rcount; i++) {
314314
for (int j = 0; j < this.hashSize; j++) {
315315
// ZipUtil.signedByteToUnsignedInt(data[offset + 16 + (i * this.hashSize) + j]));
316316
}

0 commit comments

Comments
 (0)