From: Ján Tomko Date: Wed, 18 May 2022 13:59:36 +0000 (+0200) Subject: storagefile: set size field of ploop to 8 X-Git-Tag: v8.5.0-rc1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a55abe6c5120bd7614a4c9b2027eeab8d6c3bd54;p=thirdparty%2Flibvirt.git storagefile: set size field of ploop to 8 For all file formats, the length of the size field is assumed and hardcoded to be 8 bytes. Fix the length for the ploop format - since we specify the offset, we read 8 bytes of the length, not 0. Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage_file_probe.c index 54e095ffd3..9465af5d96 100644 --- a/src/storage_file/storage_file_probe.c +++ b/src/storage_file/storage_file_probe.c @@ -296,7 +296,7 @@ static struct FileTypeInfo const fileTypeInfo[] = { [VIR_STORAGE_FILE_VHD] = { 0, NULL, LV_LITTLE_ENDIAN, -1, 0, {0}, 0, 0, 0, NULL, NULL, NULL, NULL }, [VIR_STORAGE_FILE_PLOOP] = { 0, "WithouFreSpacExt", LV_LITTLE_ENDIAN, - -2, 0, {0}, PLOOP_IMAGE_SIZE_OFFSET, 0, + -2, 0, {0}, PLOOP_IMAGE_SIZE_OFFSET, 8, PLOOP_SIZE_MULTIPLIER, NULL, NULL, NULL, NULL }, /* All formats with a backing store probe below here */