block: vhdx - fix reading beyond pointer during image creation
commite91a8b2fef92e7d31290e785a35f85a503fa1356
authorJeff Cody <jcody@redhat.com>
Tue, 16 Sep 2014 19:12:06 +0000 (16 15:12 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 Sep 2014 10:39:46 +0000 (22 11:39 +0100)
tree8e37ecb3074b11a55ca915b0d36424297acdc785
parent550830f9351291c585c963204ad9127998b1c1ce
block: vhdx - fix reading beyond pointer during image creation

In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for
the various metadata table entries.  However, we write out 64kB from
that buffer into the new file.  Only write out the correct 40 bytes.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/vhdx.c