clarify the check being performed
This commit is contained in:
parent
8fbc4039a8
commit
acb0a6f0c4
1 changed files with 3 additions and 1 deletions
|
@ -722,7 +722,9 @@ impl ZipFileData {
|
||||||
extra_field_length += 20;
|
extra_field_length += 20;
|
||||||
}
|
}
|
||||||
if extra_field_length + self.central_extra_field_len() > u16::MAX as usize {
|
if extra_field_length + self.central_extra_field_len() > u16::MAX as usize {
|
||||||
return Err(ZipError::InvalidArchive("Extra data field is too large"));
|
return Err(ZipError::InvalidArchive(
|
||||||
|
"Local + central extra data fields are too large",
|
||||||
|
));
|
||||||
}
|
}
|
||||||
let extra_field_length: u16 = extra_field_length.try_into().unwrap();
|
let extra_field_length: u16 = extra_field_length.try_into().unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue