mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-18 20:48:07 +00:00
fix sed errors in afl_shm_init when using mmap
This commit is contained in:
@ -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");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user