Fix an off-by-one error in large-file detection

Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
This commit is contained in:
Chris Hennick 2024-05-24 13:03:45 -07:00 committed by GitHub
parent 1bb0b14456
commit f90bdf76b8
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -789,7 +789,7 @@ impl ZipFileData {
pub(crate) fn zip64_extra_field_block(&self) -> Option<Zip64ExtraFieldBlock> { pub(crate) fn zip64_extra_field_block(&self) -> Option<Zip64ExtraFieldBlock> {
let uncompressed_size: Option<u64> = let uncompressed_size: Option<u64> =
if self.uncompressed_size > spec::ZIP64_BYTES_THR || self.large_file { if self.uncompressed_size >= spec::ZIP64_BYTES_THR || self.large_file {
Some(spec::ZIP64_BYTES_THR) Some(spec::ZIP64_BYTES_THR)
} else { } else {
None None