Skip to content

Commit

Permalink
Fix i2srandreplace (#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
mineo333 authored Aug 30, 2024
1 parent a8bccf9 commit 1113879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libafl/src/mutators/token_mutations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ where
}
CmpValues::U16(v) => {
if len >= size_of::<u16>() {
for i in off..len - (size_of::<u16>() - 1) {
for i in off..=len - size_of::<u16>() {
let val =
u16::from_ne_bytes(bytes[i..i + size_of::<u16>()].try_into().unwrap());
if val == v.0 {
Expand Down Expand Up @@ -501,7 +501,7 @@ where
}
CmpValues::U32(v) => {
if len >= size_of::<u32>() {
for i in off..len - (size_of::<u32>() - 1) {
for i in off..=len - size_of::<u32>() {
let val =
u32::from_ne_bytes(bytes[i..i + size_of::<u32>()].try_into().unwrap());
if val == v.0 {
Expand Down Expand Up @@ -530,7 +530,7 @@ where
}
CmpValues::U64(v) => {
if len >= size_of::<u64>() {
for i in off..len - (size_of::<u64>() - 1) {
for i in off..=len - size_of::<u64>() {
let val =
u64::from_ne_bytes(bytes[i..i + size_of::<u64>()].try_into().unwrap());
if val == v.0 {
Expand Down

0 comments on commit 1113879

Please sign in to comment.