Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Fixes minimal negative overflow in signed_off_str().
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Dec 29, 2023
1 parent 58ea841 commit f23ef64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/disassembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn byteswap_str(name: &str, insn: &ebpf::Insn) -> String {
#[inline]
fn signed_off_str(value: i16) -> String {
if value < 0 {
format!("-{:#x}", -value)
format!("-{:#x}", -(value as isize))
} else {
format!("+{value:#x}")
}
Expand Down

0 comments on commit f23ef64

Please sign in to comment.