Skip to content

Commit

Permalink
Merge pull request #13 from br0kej/dev
Browse files Browse the repository at this point in the history
Newest Updates
  • Loading branch information
br0kej authored May 20, 2024
2 parents 7f7a11f + 5440275 commit 33120a9
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 26 deletions.
34 changes: 17 additions & 17 deletions src/agfj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,25 +178,25 @@ impl AGFJFunc {
if hop_counter >= max_hops {
hop_counter = 0;
break;
} else {
let block_offset = self.addr_idx.as_ref().unwrap()[visited.index()];
let basic_block: Vec<&ACFJBlock> = self
.blocks
.iter()
.filter(|x| x.offset == block_offset)
.collect();

if !basic_block.is_empty() {
if esil {
let bb_esil = basic_block.first().unwrap().get_esil_bb(reg_norm);
single_disasm_walk.push(bb_esil)
} else {
let bb_ins = basic_block.first().unwrap().get_ins(reg_norm);
single_disasm_walk.push(bb_ins)
}
}
let block_offset = self.addr_idx.as_ref().unwrap()[visited.index()];
let basic_block: Vec<&ACFJBlock> = self
.blocks
.iter()
.filter(|x| x.offset == block_offset)
.collect();

if !basic_block.is_empty() {
if esil {
let bb_esil = basic_block.first().unwrap().get_esil_bb(reg_norm);
single_disasm_walk.push(bb_esil)
} else {
let bb_ins = basic_block.first().unwrap().get_ins(reg_norm);
single_disasm_walk.push(bb_ins)
}
hop_counter += 1;
}
hop_counter += 1;

}
if pairs {
let single_disasm_walk: Vec<String> =
Expand Down
4 changes: 2 additions & 2 deletions src/dedup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::hash::{Hash, Hasher};
use std::path::{Path, PathBuf};
use std::string::String;

use std::{fs, vec};
use std::process::exit;
use std::{fs, vec};
use walkdir::{DirEntry, WalkDir};

#[derive(Serialize, Deserialize, Debug)]
Expand Down Expand Up @@ -124,7 +124,7 @@ impl EsilFuncStringCorpus {
}
}

if filepaths.len() == 0 {
if filepaths.is_empty() {
error!("No files found that match the expected format (*-efs.json). Exiting.");
exit(1);
}
Expand Down
Loading

0 comments on commit 33120a9

Please sign in to comment.