fix sed errors in afl_shm_init when using mmap

This commit is contained in:
Andrea Fioraldi
2020-04-22 13:51:36 +02:00
parent 23ea727915
commit b8a25063f6

View File

@ -129,11 +129,11 @@ u8 *afl_shm_init(sharedmem_t *shm, size_t map_size, unsigned char dumb_mode) {
/* map the shared memory segment to the address space of the process */ /* map the shared memory segment to the address space of the process */
shm->map = mmap(0, map_size, PROT_READ | PROT_WRITE, MAP_SHARED, shm->map = mmap(0, map_size, PROT_READ | PROT_WRITE, MAP_SHARED,
map_size->g_shm_fd, 0); shm->g_shm_fd, 0);
if (map_size->map == MAP_FAILED) { if (shm->map == MAP_FAILED) {
close(map_size->g_shm_fd); close(shm->g_shm_fd);
map_size->g_shm_fd = -1; shm->g_shm_fd = -1;
PFATAL("mmap() failed"); PFATAL("mmap() failed");
} }