return NULL in memory_mapping() if no memory is mapped. this fixes test_bad_unmap in test_x86.c
This commit is contained in:
3
uc.c
3
uc.c
@ -809,6 +809,9 @@ MemoryRegion *memory_mapping(struct uc_struct* uc, uint64_t address)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
if (uc->mapped_block_count == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
// try with the cache index first
|
// try with the cache index first
|
||||||
i = uc->mapped_block_cache_index;
|
i = uc->mapped_block_cache_index;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user