FixedSizeBlock::interpret should either check alignment or use read_unaligned
#198
Labels
fix merged
Fix is merged, but the issue will stay open until it's released.
read
is used here:zip2/src/spec.rs
Line 112 in ad111aa
However the alignment hasn't been verified prior to this. It so happens that
FixedSizeBlock
is (currently) only implemented onrepr(packed)
structs (which have 1-byte alignment), however the alignment should still be verified orread_unaligned
should be used.If these should always be
repr(packed)
, maybe add anassert_eq!(std::mem::align_of::<Self>(), 1)
?The text was updated successfully, but these errors were encountered: