about summary refs log tree commit diff
path: root/src/afl-fuzz-extras.c
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-08-14 00:46:15 +0200
committerDominik Maier <domenukk@gmail.com>2020-08-14 00:46:15 +0200
commit83df65a66b8df37d0759bf9b31a61f50234d6c40 (patch)
treebaf604a830afd72b8fcae28d94fbca57a657add2 /src/afl-fuzz-extras.c
parentc3a6e7e87053f904214484f4887afc576e016d18 (diff)
downloadafl++-83df65a66b8df37d0759bf9b31a61f50234d6c40.tar.gz
cleaned up maybe_add_auto calls
Diffstat (limited to 'src/afl-fuzz-extras.c')
-rw-r--r--src/afl-fuzz-extras.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/afl-fuzz-extras.c b/src/afl-fuzz-extras.c
index 097871c8..2f3a2d53 100644
--- a/src/afl-fuzz-extras.c
+++ b/src/afl-fuzz-extras.c
@@ -354,13 +354,9 @@ static inline u8 memcmp_nocase(u8 *m1, u8 *m2, u32 len) {
 }
 
 /* Maybe add automatic extra. */
-/* Ugly hack: afl state is transfered as u8* because we import data via
-   afl-forkserver.c - which is shared with other afl tools that do not
-   have the afl state struct */
 
-void maybe_add_auto(void *afl_tmp, u8 *mem, u32 len) {
+void maybe_add_auto(afl_state_t *afl, u8 *mem, u32 len) {
 
-  afl_state_t *afl = (afl_state_t *)afl_tmp;
   u32          i;
 
   /* Allow users to specify that they don't want auto dictionaries. */
@@ -544,7 +540,7 @@ void load_auto(afl_state_t *afl) {
 
     if (len >= MIN_AUTO_EXTRA && len <= MAX_AUTO_EXTRA) {
 
-      maybe_add_auto((u8 *)afl, tmp, len);
+      maybe_add_auto(afl, tmp, len);
 
     }