commit | 078189c148e6e0e42894033cf5e19bd6028ca288 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Wed Nov 07 13:47:22 2012 +0100 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Nov 07 13:47:22 2012 +0100 |
tree | baa06591504b3991a05945093f960c8a4f3dd912 | |
parent | eed3f51876dd2bc50558eec29e0078557f2e3a25 [diff] [blame] |
Add safe checks for valid pareto input value Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/options.c b/options.c index ea1ffb1..c240692 100644 --- a/options.c +++ b/options.c
@@ -748,12 +748,18 @@ return 1; } + free(nr); + if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) td->o.zipf_theta = val; - else + else { + if (val <= 0.00 || val >= 1.00) { + log_err("fio: pareto input out of range (0 < input < 1.0)\n"); + return 1; + } td->o.pareto_h = val; + } - free(nr); return 0; }