Skip to content

Commit

Permalink
[bugfix] Header length verification correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
corwin-of-amber committed Dec 3, 2021
1 parent 2f668ac commit 60dcdaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl Header {
if self.v3.refcount_order > 6 {
return Err(Error::FileFormat(format!("bad refcount_order {}", self.v3.refcount_order)));
}
if self.v3.header_length as u64 != actual_length {
if self.v3.header_length as u64 != io.position() {
return Err(Error::FileFormat(format!("header is {} bytes, file claims {}",
io.position(),
self.v3.header_length)));
Expand Down

0 comments on commit 60dcdaf

Please sign in to comment.