mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
In Request::execute_async the WriteZeroes arm multiplied wz_sector by SECTOR_SIZE before the checked_add of sector and num_sectors. A wz_sector near u64::MAX overflows the multiplication. Reorder the arm to run the checked_add and disk_nsectors check first, matching the Discard arm above. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>