mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-19 13:03:44 +00:00
add cmplog compatability check
This commit is contained in:
@ -342,6 +342,11 @@ static void report_error_and_exit(int error) {
|
||||
"the fuzzing target reports that the mmap() call to the shared "
|
||||
"memory failed.");
|
||||
break;
|
||||
case FS_ERROR_OLD_CMPLOG:
|
||||
FATAL(
|
||||
"the -c cmplog target was instrumented with an too old afl++ "
|
||||
"version, you need to recompile it.");
|
||||
break;
|
||||
default:
|
||||
FATAL("unknown error code %d from fuzzing target!", error);
|
||||
|
||||
@ -651,6 +656,12 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
if ((status & FS_OPT_OLD_AFLPP_WORKAROUND) == FS_OPT_OLD_AFLPP_WORKAROUND)
|
||||
status = (status & 0xf0ffffff);
|
||||
|
||||
if ((status & FS_OPT_NEWCMPLOG) == 0 && fsrv->cmplog_binary) {
|
||||
|
||||
report_error_and_exit(FS_ERROR_OLD_CMPLOG);
|
||||
|
||||
}
|
||||
|
||||
if ((status & FS_OPT_SNAPSHOT) == FS_OPT_SNAPSHOT) {
|
||||
|
||||
fsrv->snapshot = 1;
|
||||
|
Reference in New Issue
Block a user