From: Jens Axboe Date: Tue, 24 Sep 2019 08:43:39 +0000 (-0600) Subject: verify: check that the block size is big enough X-Git-Tag: fio-3.17~45 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=3982ec03ab0c125d01b62876f5139b2c07082c7a verify: check that the block size is big enough Fixes: https://github.com/axboe/fio/issues/822 Signed-off-by: Jens Axboe --- diff --git a/verify.c b/verify.c index 48ba051d..37d2be8d 100644 --- a/verify.c +++ b/verify.c @@ -1191,6 +1191,10 @@ static void populate_hdr(struct thread_data *td, struct io_u *io_u, fill_hdr(td, io_u, hdr, header_num, header_len, io_u->rand_seed); + if (header_len <= hdr_size(td, hdr)) { + td_verror(td, EINVAL, "Blocksize too small"); + return; + } data_len = header_len - hdr_size(td, hdr); data = p + hdr_size(td, hdr);