Init buflen for our dummy buffer
authorJosef Bacik <jbacik@fusionio.com>
Tue, 9 Jul 2013 00:35:01 +0000 (20:35 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Jul 2013 00:45:19 +0000 (18:45 -0600)
If we fail to verify our buffer we will allocate a dummy buf to fill in so we
have something to compare our bad file to.  Unfortunately we don't set the
buflen of the dummy buffer which means we will sometimes write well past the end
of our buffer and this make glibc complain loudly.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
verify.c

index b3cd402..9e88d61 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -273,6 +273,7 @@ static void dump_verify_buffers(struct verify_header *hdr, struct vcont *vc)
        dummy.buf = buf;
        dummy.rand_seed = hdr->rand_seed;
        dummy.buf_filled_len = 0;
+       dummy.buflen = io_u->buflen;
 
        fill_pattern_headers(td, &dummy, hdr->rand_seed, 1);