aboutsummaryrefslogtreecommitdiff
path: root/hw/hyperv
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-12-17 17:19:55 +0100
committerKevin Wolf <kwolf@redhat.com>2020-12-18 12:42:34 +0100
commit02df95c4a1746aac168dc70a6d8aec062e3f6250 (patch)
treef6415ca296e20f7dad8a4c680875cfd9daa88ef7 /hw/hyperv
parent1a35110150e38beea15865f886022fe329028e12 (diff)
block/vpc: Make vpc_open() read the full dynamic header
The dynamic header's size is 1024 bytes. vpc_open() reads only the 512 bytes of the dynamic header into buf[]. Works, because it doesn't actually access the second half. However, a colleague told me that GCC 11 warns: ../block/vpc.c:358:51: error: array subscript 'struct VHDDynDiskHeader[0]' is partly outside array bounds of 'uint8_t[512]' [-Werror=array-bounds] Clean up to read the full header. Rename buf[] to dyndisk_header_buf[] while there. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201217162003.1102738-2-armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/hyperv')
0 files changed, 0 insertions, 0 deletions