Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 6 additions & 64 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ debug = true

[dependencies]
libfuzzer-sys = "0.4.7"
rand = { version = "0.9.0", features = ["small_rng"] }
rand = { version = "0.10.0", features = ["std_rng"] }
uufuzz = { path = "uufuzz" }
uucore = { path = "../src/uucore", features = ["parser"] }
uu_date = { path = "../src/uu/date" }
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_cksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#![no_main]
use libfuzzer_sys::fuzz_target;
use rand::Rng;
use rand::RngExt;
use std::env::temp_dir;
use std::ffi::OsString;
use std::fs::{self, File};
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_cut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_cut::uumain;

use rand::Rng;
use rand::RngExt;
use std::ffi::OsString;

use uufuzz::{
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_dirname.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use libfuzzer_sys::fuzz_target;
use uu_dirname::uumain;

use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::ffi::OsString;

Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/fuzz_echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_echo::uumain;

use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::ffi::OsString;

Expand Down Expand Up @@ -51,7 +51,7 @@ fn generate_echo() -> String {
echo_str
}

fn generate_escape_sequence(rng: &mut impl Rng) -> String {
fn generate_escape_sequence(rng: &mut impl RngExt) -> String {
let escape_sequences = [
"\\\\", "\\a", "\\b", "\\c", "\\e", "\\f", "\\n", "\\r", "\\t", "\\v", "\\0NNN", "\\xHH",
];
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use uu_env::uumain;

use std::ffi::OsString;

use rand::Rng;
use rand::RngExt;
use uufuzz::{
CommandResult, compare_result, generate_and_run_uumain, generate_random_string, run_gnu_cmd,
};
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_expr::uumain;

use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::{env, ffi::OsString};

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_non_utf8_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#![no_main]
use libfuzzer_sys::fuzz_target;
use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::collections::HashSet;
use std::env::temp_dir;
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/fuzz_printf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_printf::uumain;

use rand::Rng;
use rand::RngExt;
use rand::seq::IndexedRandom;
use std::env;
use std::ffi::OsString;
Expand All @@ -18,7 +18,7 @@ use uufuzz::{compare_result, generate_and_run_uumain, generate_random_string, ru

static CMD_PATH: &str = "printf";

fn generate_escape_sequence(rng: &mut impl Rng) -> String {
fn generate_escape_sequence(rng: &mut impl RngExt) -> String {
let escape_sequences = [
"\\\"",
"\\\\",
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_seq::uumain;

use rand::Rng;
use rand::RngExt;
use std::ffi::OsString;

use uufuzz::CommandResult;
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_sort::uumain;

use rand::Rng;
use rand::RngExt;
use std::env;
use std::ffi::OsString;

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_split::uumain;

use rand::Rng;
use rand::RngExt;
use std::ffi::OsString;

use uufuzz::{
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/fuzz_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_test::uumain;

use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::ffi::OsString;

Expand All @@ -35,7 +35,7 @@ struct TestArg {
arg_type: ArgType,
}

fn generate_random_path(rng: &mut dyn rand::RngCore) -> &'static str {
fn generate_random_path(rng: &mut dyn rand::Rng) -> &'static str {
match rng.random_range(0..=3) {
0 => "/dev/null",
1 => "/dev/random",
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use libfuzzer_sys::fuzz_target;
use std::ffi::OsString;
use uu_tr::uumain;

use rand::Rng;
use rand::RngExt;

use uufuzz::{
CommandResult, compare_result, generate_and_run_uumain, generate_random_string, run_gnu_cmd,
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_wc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use libfuzzer_sys::fuzz_target;
use uu_wc::uumain;

use rand::Rng;
use rand::RngExt;
use std::ffi::OsString;

use uufuzz::{
Expand Down
2 changes: 1 addition & 1 deletion fuzz/uufuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license.workspace = true
[dependencies]
console = "0.16.0"
libc = "0.2.153"
rand = { version = "0.9.0", features = ["small_rng"] }
rand = { version = "0.10.0" }
similar = "2.5.0"
uucore = { version = "0.7.0", path = "../../src/uucore", features = ["parser"] }
tempfile = "3.15.0"
2 changes: 1 addition & 1 deletion fuzz/uufuzz/examples/fuzzing_simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

use rand::Rng;
use rand::RngExt;
use std::ffi::OsString;
use uufuzz::{generate_and_run_uumain, generate_random_string, run_gnu_cmd};

Expand Down
2 changes: 1 addition & 1 deletion fuzz/uufuzz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use libc::{STDERR_FILENO, STDOUT_FILENO, close, dup, dup2, pipe};
use pretty_print::{
print_diff, print_end_with_status, print_or_empty, print_section, print_with_style,
};
use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use std::env::temp_dir;
use std::ffi::OsString;
Expand Down
Loading