mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
Fix zero-length write(2).
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
c581deda32
commit
3e0650a9c9
1 changed files with 3 additions and 0 deletions
3
exec.c
3
exec.c
|
@ -2429,6 +2429,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags)
|
|||
assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
|
||||
#endif
|
||||
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (start + len - 1 < start) {
|
||||
/* We've wrapped around. */
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue