]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix size probing for VDI images
authorJán Tomko <jtomko@redhat.com>
Thu, 14 Mar 2013 12:24:03 +0000 (13:24 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 14 Mar 2013 14:12:06 +0000 (15:12 +0100)
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

src/util/virstoragefile.c

index cbcab5cffaf20b3a420dc20438f21e9fe9be46a1..aabb5c8e2afd5947152efbe3551ab804de2409b2 100644 (file)
@@ -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,