diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-09-24 02:43:39 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-09-24 02:43:39 -0600 |
commit | 3982ec03ab0c125d01b62876f5139b2c07082c7a (patch) | |
tree | 58ce88ce1d5788cef94f89477b68ca4c9ee36b48 | |
parent | 3f64668f8587e11fe585874c37103ef602a3cd07 (diff) | |
download | fio-3982ec03ab0c125d01b62876f5139b2c07082c7a.tar.gz fio-3982ec03ab0c125d01b62876f5139b2c07082c7a.tar.bz2 |
verify: check that the block size is big enough
Fixes: https://github.com/axboe/fio/issues/822
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | verify.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |