Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-user/mmap.c: check range of mremap result in target address space
If mremap succeeds, an additional check is performed to ensure that the new address range fits into the target address space. This check was previously perfomed in host address space, with the upper bound fixed to abi_ulong. This patch replaces the static check with a call to `guest_range_valid`, performing the range check against the actual size of the target address space. It also moves the corresponding block to prevent it from being called incorrectly when the mapping itself fails. Signed-off-by: Tobias Koch <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
- Loading branch information