Refix Shm ID (#194)

* print sender id

* storing sender id to env

* typo fix

* clippy fixes

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
This commit is contained in:
Dominik Maier 2021-06-30 09:06:51 +02:00 committed by GitHub
parent e479b4fa24
commit de4071bf23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -53,26 +53,26 @@ pub fn libafl_main() {
.expect("No valid core count given!"); .expect("No valid core count given!");
let broker_port = matches let broker_port = matches
.value_of("broker_port") .value_of("broker_port")
.map(|s| s.parse().expect("Invalid broker port".into())) .map(|s| s.parse().expect("Invalid broker port"))
.unwrap_or(1337); .unwrap_or(1337);
let remote_broker_addr = matches let remote_broker_addr = matches
.value_of("remote_broker_addr") .value_of("remote_broker_addr")
.map(|s| s.parse().expect("Invalid broker address".into())); .map(|s| s.parse().expect("Invalid broker address"));
let input_dirs: Vec<PathBuf> = matches let input_dirs: Vec<PathBuf> = matches
.values_of("input") .values_of("input")
.map(|v| v.map(|s| PathBuf::from(s)).collect()) .map(|v| v.map(PathBuf::from).collect())
.unwrap_or(vec![]); .unwrap_or_default();
let output_dir = matches let output_dir = matches
.value_of("output") .value_of("output")
.map(|s| PathBuf::from(s)) .map(PathBuf::from)
.unwrap_or(workdir.clone()); .unwrap_or_else(|| workdir.clone());
let token_files: Vec<&str> = matches let token_files: Vec<&str> = matches
.values_of("tokens") .values_of("tokens")
.map(|v| v.collect()) .map(|v| v.collect())
.unwrap_or(vec![]); .unwrap_or_default();
let timeout_ms = matches let timeout_ms = matches
.value_of("timeout") .value_of("timeout")
.map(|s| s.parse().expect("Invalid timeout".into())) .map(|s| s.parse().expect("Invalid timeout"))
.unwrap_or(10000); .unwrap_or(10000);
// let cmplog_enabled = matches.is_present("cmplog"); // let cmplog_enabled = matches.is_present("cmplog");
@ -197,7 +197,7 @@ pub fn libafl_main() {
// In case the corpus is empty (on first run), reset // In case the corpus is empty (on first run), reset
if state.corpus().count() < 1 { if state.corpus().count() < 1 {
if input_dirs.len() == 0 { if input_dirs.is_empty() {
// Generator of printable bytearrays of max size 32 // Generator of printable bytearrays of max size 32
let mut generator = RandBytesGenerator::new(32); let mut generator = RandBytesGenerator::new(32);

View File

@ -475,7 +475,7 @@ unsafe fn _llmp_next_msg_ptr(last_msg: *const LlmpMsg) -> *mut LlmpMsg {
/// May be used to restore the map by id. /// May be used to restore the map by id.
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
pub struct LlmpDescription { pub struct LlmpDescription {
/// Info about the ShredMap in use /// Info about the [`ShMem`] in use
shmem: ShMemDescription, shmem: ShMemDescription,
/// The last message sent or received, depnding on page type /// The last message sent or received, depnding on page type
last_message_offset: Option<u64>, last_message_offset: Option<u64>,