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)
This commit is contained in:
Ján Tomko 2013-03-14 13:24:03 +01:00
parent 2102e03dc7
commit cb9170c737

View 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,