aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user/mmap.c')
-rw-r--r--bsd-user/mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 696057551a..565b9f97ed 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -234,7 +234,7 @@ static abi_ulong mmap_find_vma_reserved(abi_ulong start, abi_ulong size,
size = HOST_PAGE_ALIGN(size) + alignment;
end_addr = start + size;
if (end_addr > reserved_va) {
- end_addr = reserved_va;
+ end_addr = reserved_va + 1;
}
addr = end_addr - qemu_host_page_size;
@@ -243,7 +243,7 @@ static abi_ulong mmap_find_vma_reserved(abi_ulong start, abi_ulong size,
if (looped) {
return (abi_ulong)-1;
}
- end_addr = reserved_va;
+ end_addr = reserved_va + 1;
addr = end_addr - qemu_host_page_size;
looped = 1;
continue;