Message ID | 1473099234-10882-32-git-send-email-kwolf@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/qcow2.c b/block/qcow2.c index adf4514..c079aa8 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2565,7 +2565,7 @@ qcow2_co_pwritev_compressed(BlockDriverState *bs, uint64_t offset, /* Zero-pad last write if image size is not cluster aligned */ memset(buf + bytes, 0, s->cluster_size - bytes); } - qemu_iovec_to_buf(qiov, 0, buf, s->cluster_size); + qemu_iovec_to_buf(qiov, 0, buf, bytes); out_buf = g_malloc(s->cluster_size);