Files
cloud-hypervisor/virtio-devices
Dylan Reid e2b9fa261b virtio-devices: get_host_address_range check fixes
`get_host_address_range` used `check_range(addr, size)` as a guard then
unwrapped `get_slice(addr, size)`. This allowed a span across two
regions to hit the unwrap (get_slice limits to one range).

If `size` were zero, then the checks were all skipped. Causing a panic
later on for an invalid address.

Make get_slice the sole authority and reject size==0 explicitly.
Callers already handle None.

Signed-off-by: Dylan Reid <dgreid@fb.com>
2026-05-04 09:08:43 +00:00
..