fuzzing: set LC_ALL=C when running GNU printf

This commit is contained in:
Daniel Hofstetter 2024-02-17 16:07:03 +01:00
parent 420dfe8a9b
commit 89bad851e6

View file

@ -10,6 +10,7 @@ use uu_printf::uumain;
use rand::seq::SliceRandom;
use rand::Rng;
use std::env;
use std::ffi::OsString;
mod fuzz_common;
@ -82,6 +83,8 @@ fuzz_target!(|_data: &[u8]| {
args.extend(printf_input.split_whitespace().map(OsString::from));
let rust_result = generate_and_run_uumain(&args, uumain, None);
// TODO remove once uutils printf supports localization
env::set_var("LC_ALL", "C");
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false, None) {
Ok(result) => result,
Err(error_result) => {