Skip to content

Commit

Permalink
fix Meituan-Dianping#374 read centralDirStartOffset fail when the apk…
Browse files Browse the repository at this point in the history
… filesize > 2g
  • Loading branch information
xiaohongxiedaima committed May 30, 2024
1 parent f78edcf commit 7adce36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static long findCentralDirStartOffset(final FileChannel fileChannel, fina
zipCentralDirectoryStart.order(ByteOrder.LITTLE_ENDIAN);
fileChannel.position(fileChannel.size() - commentLength - 6); // 6 = 2 (Comment length) + 4 (Offset of start of central directory, relative to start of archive)
fileChannel.read(zipCentralDirectoryStart);
final long centralDirStartOffset = zipCentralDirectoryStart.getInt(0);
final long centralDirStartOffset = zipCentralDirectoryStart.getInt(0) & 0xFFFFFFFFL;
return centralDirStartOffset;
}

Expand Down

0 comments on commit 7adce36

Please sign in to comment.