mirror of
https://github.com/Vita3K/unicorn.git
synced 2024-11-23 05:19:40 +00:00
fix error handling of mmap() calls (#1283)
This commit is contained in:
parent
ad80f042c4
commit
a4784cc96c
@ -1154,7 +1154,7 @@ void qemu_ram_remap(struct uc_struct *uc, ram_addr_t addr, ram_addr_t length)
|
||||
area = mmap(vaddr, length, PROT_READ | PROT_WRITE,
|
||||
flags, -1, 0);
|
||||
}
|
||||
if (area != vaddr) {
|
||||
if (area == MAP_FAILED || area != vaddr) {
|
||||
fprintf(stderr, "Could not remap addr: "
|
||||
RAM_ADDR_FMT "@" RAM_ADDR_FMT "\n",
|
||||
length, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user