libafl_qemu: access() size can be zero. (#3038)
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
This commit is contained in:
parent
6fa564b10b
commit
eaa600e5ac
@ -270,7 +270,7 @@ impl SnapshotModule {
|
||||
|
||||
pub fn access(&mut self, addr: GuestAddr, size: usize) {
|
||||
// ASSUMPTION: the access can only cross 2 pages
|
||||
debug_assert!(size > 0 && size <= SNAPSHOT_PAGE_SIZE);
|
||||
debug_assert!(size <= SNAPSHOT_PAGE_SIZE);
|
||||
let page = addr & SNAPSHOT_PAGE_MASK;
|
||||
self.page_access(page);
|
||||
let second_page = (addr + size as GuestAddr - 1) & SNAPSHOT_PAGE_MASK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user