diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-05-11 15:58:24 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-05-18 19:05:24 +0200 |
commit | e83dd6808c6e0975970f37b49b27cc37bb54eea8 (patch) | |
tree | 55c0f585763840d84a641483f5abb62fbf1abf0d /tests/test-x86-cpuid.c | |
parent | d89ac3cf305b28c024a76805a84d75c0ee1e786f (diff) |
mirror: Make sure that source and target size match
If the target is shorter than the source, mirror would copy data until
it reaches the end of the target and then fail with an I/O error when
trying to write past the end.
If the target is longer than the source, the mirror job would complete
successfully, but the target wouldn't actually be an accurate copy of
the source image (it would contain some additional garbage at the end).
Fix this by checking that both images have the same size when the job
starts.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200511135825.219437-4-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/test-x86-cpuid.c')
0 files changed, 0 insertions, 0 deletions