fix libafl_maps_next for i386
This commit is contained in:
parent
3edab00190
commit
d840462c2e
@ -13192,8 +13192,8 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
|
|||||||
//// --- Begin LibAFL code ---
|
//// --- Begin LibAFL code ---
|
||||||
|
|
||||||
struct libafl_mapinfo {
|
struct libafl_mapinfo {
|
||||||
uint64_t start, end;
|
target_ulong start, end;
|
||||||
uint64_t offset;
|
target_ulong offset;
|
||||||
const char* path;
|
const char* path;
|
||||||
int flags, is_priv;
|
int flags, is_priv;
|
||||||
};
|
};
|
||||||
@ -13224,9 +13224,9 @@ GSList * libafl_maps_next(GSList *map_info, struct libafl_mapinfo* ret) {
|
|||||||
if (flags & PAGE_WRITE_ORG) libafl_flags |= PROT_WRITE;
|
if (flags & PAGE_WRITE_ORG) libafl_flags |= PROT_WRITE;
|
||||||
if (flags & PAGE_EXEC) libafl_flags |= PROT_EXEC;
|
if (flags & PAGE_EXEC) libafl_flags |= PROT_EXEC;
|
||||||
|
|
||||||
ret->start = (uint64_t)min;
|
ret->start = (target_ulong)h2g_nocheck(min);
|
||||||
ret->end = (uint64_t)max;
|
ret->end = (target_ulong)h2g_nocheck(max);
|
||||||
ret->offset = (uint64_t)e->offset;
|
ret->offset = (target_ulong)e->offset;
|
||||||
ret->path = e->path;
|
ret->path = e->path;
|
||||||
ret->flags = libafl_flags;
|
ret->flags = libafl_flags;
|
||||||
ret->is_priv = e->is_priv;
|
ret->is_priv = e->is_priv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user