Merge branch 'master' into memleak2

This commit is contained in:
Nguyen Anh Quynh
2016-02-15 15:52:10 +08:00
26 changed files with 1117 additions and 91 deletions

9
uc.c
View File

@@ -618,10 +618,6 @@ static uc_err mem_map(uc_engine *uc, uint64_t address, size_t size, uint32_t per
{
MemoryRegion **regions;
// this area overlaps existing mapped regions?
if (memory_overlap(uc, address, size))
return UC_ERR_MAP;
if (block == NULL)
return UC_ERR_NOMEM;
@@ -662,6 +658,11 @@ static uc_err mem_map_check(uc_engine *uc, uint64_t address, size_t size, uint32
if ((perms & ~UC_PROT_ALL) != 0)
return UC_ERR_ARG;
// this area overlaps existing mapped regions?
if (memory_overlap(uc, address, size)) {
return UC_ERR_MAP;
}
return UC_ERR_OK;
}