liyansong2018 2022-04-13 21:53:58 +08:00
parent 9620514b68
commit 88f4eba072

4
uc.c
View File

@ -975,6 +975,10 @@ static uc_err mem_map_check(uc_engine *uc, uint64_t address, size_t size,
}
// address cannot wrapp around
if (address + size < address || address + size < size) {
return UC_ERR_ARG;
}
if (address + size - 1 < address) {
return UC_ERR_ARG;
}