summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2015-01-23 13:29:48 +0100
committerJán Tomko <jtomko@redhat.com>2015-01-26 16:13:02 +0100
commit495accb047fe85dd17f181c2a19b34fd84ed89f5 (patch)
treee7569f6a2549b2847bd4658992c8c33cfb432466
parent2d8b59c06007a50c93451a8bc7bfaee3926dc5a2 (diff)
downloadlibvirt-495accb047fe85dd17f181c2a19b34fd84ed89f5.tar.gz
Use correct location for qcow1 encryption header
After the 8-byte size header, there are two one-byte headers and two bytes of padding before the crypt_header field. Our QCOW1_HDR_CRYPT constant did not skip the padding. http://git.qemu.org/?p=qemu.git;a=blob;f=block/qcow.c;h=ece22697#l41 https://bugzilla.redhat.com/show_bug.cgi?id=1185165
-rw-r--r--src/util/virstoragefile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 7a4f9a0b39..8568ebb1e7 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -161,7 +161,7 @@ qedGetBackingStore(char **, int *, const char *, size_t);
#define QCOWX_HDR_BACKING_FILE_SIZE (QCOWX_HDR_BACKING_FILE_OFFSET+8)
#define QCOWX_HDR_IMAGE_SIZE (QCOWX_HDR_BACKING_FILE_SIZE+4+4)
-#define QCOW1_HDR_CRYPT (QCOWX_HDR_IMAGE_SIZE+8+1+1)
+#define QCOW1_HDR_CRYPT (QCOWX_HDR_IMAGE_SIZE+8+1+1+2)
#define QCOW2_HDR_CRYPT (QCOWX_HDR_IMAGE_SIZE+8)
#define QCOW1_HDR_TOTAL_SIZE (QCOW1_HDR_CRYPT+4+8)