mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
A backing file string placed exactly at cluster_size starts past the first cluster boundary, so QcowHeader::new must reject it. Introduce a read_header_with_patched_backing helper that builds a valid header, patches backing_file_offset and backing_file_size, writes it out and re-parses it. Use it to cover this case. Assisted-by: Claude:Opus-4.7 Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>