microsoft/openvmm
Publicmirrored from https://github.com/microsoft/openvmmAvailable
Commit
vmbus_ring: Fix two small math oversights (#1842)
`MultiPagedRangeBuf::subrange` previously was not respecting cur_offset
in the case where try_subrange returned None. Replaced that chunk with
cleaner math.
`parse` was previously not validating that the given byte_offset was
within range. Later code would use this value unmasked, resulting in bad
behavior. Fix this by ensuring that the value fits within the mask.
Added unit tests for both these cases.
Both bugs found by GPT-5.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>Changed files
1 files listed