Skip to content

Commit

Permalink
Change example to use str::as_bytes instead of array comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Mar 3, 2022
1 parent d4d1c46 commit 1aa53e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;

fuzz_target!(|data: &[u8]| {
if data == b"banana!" {
if data == "banana!".as_bytes() {
panic!("success!");
}
});

0 comments on commit 1aa53e0

Please sign in to comment.