Skip to content

Commit

Permalink
clarify the check being performed
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed May 24, 2024
1 parent 8fbc403 commit acb0a6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ impl ZipFileData {
extra_field_length += 20;
}
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();

Expand Down

0 comments on commit acb0a6f

Please sign in to comment.