From: Ján Tomko Date: Thu, 14 Mar 2013 12:24:03 +0000 (+0100) Subject: Fix size probing for VDI images X-Git-Tag: v1.0.4-rc1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e46477c23bfed730689fb902ff33c8ca7413ef0;p=thirdparty%2Flibvirt.git Fix size probing for VDI images Commit 027bf2ea used the wrong offset: the text field at the start of the header has 64 bytes, not 68. [1] Bug: https://bugzilla.redhat.com/show_bug.cgi?id=921452 [1] https://forums.virtualbox.org/viewtopic.php?p=29267#p29267 --- diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index cbcab5cffa..aabb5c8e2a 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -199,7 +199,7 @@ static struct FileTypeInfo const fileTypeInfo[] = { [VIR_STORAGE_FILE_VDI] = { 64, "\x7f\x10\xda\xbe", ".vdi", LV_LITTLE_ENDIAN, 68, 0x00010001, - 68 + 5 * 4 + 256 + 7 * 4, 8, 1, -1, NULL}, + 64 + 5 * 4 + 256 + 7 * 4, 8, 1, -1, NULL}, /* Not direct file formats, but used for various drivers */ [VIR_STORAGE_FILE_FAT] = { 0, NULL, NULL, LV_LITTLE_ENDIAN,