OSDN Git Service

parallels: Fix image_end_offset and data_end after out-of-image check
authorAlexander Ivanov <alexander.ivanov@virtuozzo.com>
Mon, 24 Apr 2023 09:31:38 +0000 (11:31 +0200)
committerHanna Czenczek <hreitz@redhat.com>
Mon, 5 Jun 2023 11:13:50 +0000 (13:13 +0200)
commit679749ce41bc61ff92fb857a66497a03c241b8c2
treeced276fe889a23d3340b4fb83a990c85d24d49e3
parentab2d739c417ccc7c7bd6c805899c06992bf3bfb1
parallels: Fix image_end_offset and data_end after out-of-image check

Set data_end to the end of the last cluster inside the image. In such a
way we can be sure that corrupted offsets in the BAT can't affect on the
image size. If there are no allocated clusters set image_end_offset by
data_end.

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Message-Id: <20230424093147.197643-4-alexander.ivanov@virtuozzo.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
block/parallels.c