From cb9170c737c2efd8b04a104a2063a5a355ad8e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 14 Mar 2013 13:24:03 +0100 Subject: [PATCH] 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 (cherry picked from commit 6e46477c23bfed730689fb902ff33c8ca7413ef0) --- src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,