block/backup: fix backup_cow_with_offload for last cluster
commit1048ddf0a32dcdaa952e581bd503d49adad527cc
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 20 Sep 2019 14:20:43 +0000 (20 17:20 +0300)
committerMax Reitz <mreitz@redhat.com>
Thu, 10 Oct 2019 08:56:17 +0000 (10 10:56 +0200)
treeb50f7f1a7e2e6628dfe4f7c3a6021393287946eb
parent981fb5810aa3f68797ee6e261db338bd78857614
block/backup: fix backup_cow_with_offload for last cluster

We shouldn't try to copy bytes beyond EOF. Fix it.

Fixes: 9ded4a0114968e
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20190920142056.12778-3-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/backup.c