mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
fix libfuzzer custom mutator and add introspection function
This commit is contained in:
@ -6,6 +6,10 @@
|
||||
//#include "debug.h"
|
||||
#include "afl-fuzz.h"
|
||||
|
||||
#ifdef INTROSPECTION
|
||||
const char *introspection_ptr;
|
||||
#endif
|
||||
|
||||
afl_state_t *afl_struct;
|
||||
|
||||
extern "C" size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize);
|
||||
@ -133,6 +137,14 @@ extern "C" size_t afl_custom_fuzz(my_mutator_t *data, uint8_t *buf,
|
||||
|
||||
}
|
||||
|
||||
#ifdef INTROSPECTION
|
||||
extern "C" const char* afl_custom_introspection(my_mutator_t *data) {
|
||||
|
||||
return introspection_ptr;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Deinitialize everything
|
||||
*
|
||||
|
Reference in New Issue
Block a user