projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug in early-HTLC-fulfill handling
[rust-lightning]
/
fuzz
/
fuzz_targets
/
msg_targets
/
msg_update_add_htlc_target.rs
diff --git
a/fuzz/fuzz_targets/msg_targets/msg_update_add_htlc_target.rs
b/fuzz/fuzz_targets/msg_targets/msg_update_add_htlc_target.rs
index a6489cb41ad99d17fb109e1e9e6ebf789a684e27..93cdaa42c9ba6b093265d42e0fc14cc5a0c54448 100644
(file)
--- a/
fuzz/fuzz_targets/msg_targets/msg_update_add_htlc_target.rs
+++ b/
fuzz/fuzz_targets/msg_targets/msg_update_add_htlc_target.rs
@@
-9,15
+9,11
@@
use lightning::util::reset_rng_state;
use lightning::ln::msgs::{MsgEncodable, MsgDecodable};
mod utils;
use lightning::ln::msgs::{MsgEncodable, MsgDecodable};
mod utils;
-use utils::slice_to_be16;
#[inline]
pub fn do_test(data: &[u8]) {
reset_rng_state();
#[inline]
pub fn do_test(data: &[u8]) {
reset_rng_state();
- let mut read_pos = 0;
- loop {
- test_msg!(msgs::UpdateAddHTLC, data, read_pos);
- }
+ test_msg!(msgs::UpdateAddHTLC, data);
}
#[cfg(feature = "afl")]
}
#[cfg(feature = "afl")]
@@
-40,13
+36,11
@@
fn main() {
}
}
}
}
+extern crate hex;
#[cfg(test)]
mod tests {
#[cfg(test)]
mod tests {
- use utils::extend_vec_from_hex;
#[test]
fn duplicate_crash() {
#[test]
fn duplicate_crash() {
- let mut a = Vec::new();
- extend_vec_from_hex("00", &mut a);
- super::do_test(&a);
+ super::do_test(&::hex::decode("00").unwrap());
}
}
}
}