Skip to content

Commit

Permalink
expr fuzz: add missing ops. found thanks to oss fuzz coverage (#5557)
Browse files Browse the repository at this point in the history
* expr fuzz: add missing ops. found thanks to oss fuzz coverage
https://storage.googleapis.com/oss-fuzz-coverage/rust-coreutils/reports/20231118/linux/src/rust-coreutils/src/uu/expr/src/syntax_tree.rs.html

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
  • Loading branch information
sylvestre and cakebaker committed Dec 20, 2023
1 parent 6bcf4e2 commit ce2a5d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fuzz/fuzz_targets/fuzz_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ static CMD_PATH: &str = "expr";

fn generate_expr(max_depth: u32) -> String {
let mut rng = rand::thread_rng();
let ops = ["+", "-", "*", "/", "%", "<", ">", "=", "&", "|"];
let ops = [
"+", "-", "*", "/", "%", "<", ">", "=", "&", "|", "!=", "<=", ">=", ":", "index", "length", "substr",
];

let mut expr = String::new();
let mut depth = 0;
Expand Down

0 comments on commit ce2a5d5

Please sign in to comment.