small fixes

This commit is contained in:
hexcoder-
2020-12-08 22:12:05 +01:00
parent 5bb51688e4
commit 2b543a64af

View File

@ -343,7 +343,7 @@ static void __afl_map_shm(void) {
send_forkserver_error(FS_ERROR_MAP_ADDR); send_forkserver_error(FS_ERROR_MAP_ADDR);
else else
send_forkserver_error(FS_ERROR_MMAP); send_forkserver_error(FS_ERROR_MMAP);
perror("shmat for map"); perror("mmap for map");
exit(2); exit(2);
@ -355,8 +355,6 @@ static void __afl_map_shm(void) {
__afl_area_ptr = shmat(shm_id, (void *)__afl_map_addr, 0); __afl_area_ptr = shmat(shm_id, (void *)__afl_map_addr, 0);
#endif
/* Whooooops. */ /* Whooooops. */
if (!__afl_area_ptr || __afl_area_ptr == (void *)-1) { if (!__afl_area_ptr || __afl_area_ptr == (void *)-1) {
@ -371,6 +369,8 @@ static void __afl_map_shm(void) {
} }
#endif
/* Write something into the bitmap so that even with low AFL_INST_RATIO, /* Write something into the bitmap so that even with low AFL_INST_RATIO,
our parent doesn't give up on us. */ our parent doesn't give up on us. */
@ -423,7 +423,7 @@ static void __afl_map_shm(void) {
shm_fd = shm_open(shm_file_path, O_RDWR, 0600); shm_fd = shm_open(shm_file_path, O_RDWR, 0600);
if (shm_fd == -1) { if (shm_fd == -1) {
fprintf(stderr, "shm_open() failed\n"); perror("shm_open() failed\n");
send_forkserver_error(FS_ERROR_SHM_OPEN); send_forkserver_error(FS_ERROR_SHM_OPEN);
exit(1); exit(1);