Skip to content

Commit d56aa95

Browse files
committed
options: Add range validation for log_hist_coarseness
Documentation says valid range is [0...6]. Beyond 10 this can cause crashes. Signed-off-by: William Butler <[email protected]>
1 parent 7272fd8 commit d56aa95

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

options.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,6 +4751,8 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
47514751
.name = "log_hist_coarseness",
47524752
.lname = "Histogram logs coarseness",
47534753
.type = FIO_OPT_INT,
4754+
.maxval = 6,
4755+
.minval = 0,
47544756
.off1 = offsetof(struct thread_options, log_hist_coarseness),
47554757
.help = "Integer in range [0,6]. Higher coarseness outputs"
47564758
" fewer histogram bins per sample. The number of bins for"

0 commit comments

Comments
 (0)