aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-04-05 14:52:53 +0200
committervanhauser-thc <vh@thc.org>2024-04-05 14:53:02 +0200
commitf7ea0f569fa57e22548c1dc8eaba2903213e496e (patch)
tree1b01d1dcb73e3a86bd4dec0cfaa0a90db932bf32
parent2bf92848ff7f48155b8fa031543ab3410dc556d6 (diff)
downloadAFLplusplus-f7ea0f569fa57e22548c1dc8eaba2903213e496e.tar.gz
fix aflpp custom mutator + standalone tool
-rw-r--r--custom_mutators/aflpp/aflpp.c1
-rw-r--r--custom_mutators/aflpp/standalone/aflpp-standalone.c7
-rw-r--r--docs/Changelog.md1
-rw-r--r--include/afl-mutations.h5
-rw-r--r--src/afl-fuzz-state.c4
5 files changed, 8 insertions, 10 deletions
diff --git a/custom_mutators/aflpp/aflpp.c b/custom_mutators/aflpp/aflpp.c
index e15d0391..0b236f76 100644
--- a/custom_mutators/aflpp/aflpp.c
+++ b/custom_mutators/aflpp/aflpp.c
@@ -1,3 +1,4 @@
+#include "afl-fuzz.h"
#include "afl-mutations.h"
typedef struct my_mutator {
diff --git a/custom_mutators/aflpp/standalone/aflpp-standalone.c b/custom_mutators/aflpp/standalone/aflpp-standalone.c
index 361feaba..3a2cbc2f 100644
--- a/custom_mutators/aflpp/standalone/aflpp-standalone.c
+++ b/custom_mutators/aflpp/standalone/aflpp-standalone.c
@@ -1,9 +1,6 @@
+#include "afl-fuzz.h"
#include "afl-mutations.h"
-s8 interesting_8[] = {INTERESTING_8};
-s16 interesting_16[] = {INTERESTING_8, INTERESTING_16};
-s32 interesting_32[] = {INTERESTING_8, INTERESTING_16, INTERESTING_32};
-
typedef struct my_mutator {
afl_state_t *afl;
@@ -155,7 +152,7 @@ int main(int argc, char *argv[]) {
return -1;
}
- if (verbose) fprintf(stderr, "Mutation output length: %zu\n", outlen);
+ if (verbose) fprintf(stderr, "Mutation output length: %u\n", outlen);
if (fwrite(outbuf, 1, outlen, out) != outlen) {
fprintf(stderr, "Warning: incomplete write.\n");
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 94ea5fca..70f4e375 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -33,6 +33,7 @@
- afl-whatsup:
- now also displays current average speed
- small bugfixes
+ - Fixes for aflpp custom mutator and standalone tool
- Minor edits to afl-persistent-config
- Prevent temporary files being left behind on aborted afl-whatsup
- More CPU benchmarks added to benchmark/
diff --git a/include/afl-mutations.h b/include/afl-mutations.h
index 75e66484..79cf7c6a 100644
--- a/include/afl-mutations.h
+++ b/include/afl-mutations.h
@@ -30,10 +30,13 @@
#include <stdbool.h>
#include <inttypes.h>
-#include "afl-fuzz.h"
#define MUT_STRATEGY_ARRAY_SIZE 256
+s8 interesting_8[] = {INTERESTING_8};
+s16 interesting_16[] = {INTERESTING_8, INTERESTING_16};
+s32 interesting_32[] = {INTERESTING_8, INTERESTING_16, INTERESTING_32};
+
enum {
/* 00 */ MUT_FLIPBIT,
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index ae327117..c61f00bd 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -28,10 +28,6 @@
#include "afl-fuzz.h"
#include "envs.h"
-s8 interesting_8[] = {INTERESTING_8};
-s16 interesting_16[] = {INTERESTING_8, INTERESTING_16};
-s32 interesting_32[] = {INTERESTING_8, INTERESTING_16, INTERESTING_32};
-
char *power_names[POWER_SCHEDULES_NUM] = {"explore", "mmopt", "exploit",
"fast", "coe", "lin",
"quad", "rare", "seek"};