Skip to content

Commit

Permalink
Update src/lib.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Duffy <[email protected]>
  • Loading branch information
XiangpengHao and a10y authored Oct 3, 2024
1 parent 0b92095 commit 3b579dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl<'a> Decompressor<'a> {
let length = unsafe { *self.lengths.get_unchecked(code as usize) };
// SAFETY: out_pos is always 8 bytes or more from the end of decoded buffer
unsafe {
let write_addr = ptr.add(out_pos) as *mut u64;
let write_addr = ptr.byte_add(out_pos) as *mut u64;
// Perform 8 byte unaligned write.
write_addr.write_unaligned(symbol.as_u64());
}
Expand Down

0 comments on commit 3b579dd

Please sign in to comment.