mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
init/deinit need to be optional for post lib
This commit is contained in:
@ -311,22 +311,17 @@ void setup_post(afl_state_t *afl) {
|
|||||||
mutator->afl_custom_init = dlsym(dh, "afl_postprocess_init");
|
mutator->afl_custom_init = dlsym(dh, "afl_postprocess_init");
|
||||||
if (!mutator->afl_custom_init) {
|
if (!mutator->afl_custom_init) {
|
||||||
|
|
||||||
FATAL("Symbol 'afl_postprocess_init' not found.");
|
WARNF("optional symbol 'afl_postprocess_init' not found.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mutator->afl_custom_deinit = dlsym(dh, "afl_postprocess_deinit");
|
mutator->afl_custom_deinit = dlsym(dh, "afl_postprocess_deinit");
|
||||||
if (!mutator->afl_custom_post_process) {
|
if (!mutator->afl_custom_post_process) {
|
||||||
|
|
||||||
FATAL("Symbol 'afl_postprocess_deinit' not found.");
|
WARNF("optional symbol 'afl_postprocess_deinit' not found.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do a quick test. It's better to segfault now than later =) */
|
|
||||||
|
|
||||||
mutator->data = mutator->afl_custom_init(afl, rand_below(afl, 0xFFFFFFFF));
|
|
||||||
if (!mutator->data) { FATAL("Could not initialize post handler."); }
|
|
||||||
|
|
||||||
afl->post_library_mutator = mutator;
|
afl->post_library_mutator = mutator;
|
||||||
|
|
||||||
OKF("Postprocessor installed successfully.");
|
OKF("Postprocessor installed successfully.");
|
||||||
|
Reference in New Issue
Block a user