about summary refs log tree commit diff
path: root/include/afl-fuzz.h
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-12-03 19:22:44 +0100
committerDominik Maier <domenukk@gmail.com>2020-12-04 14:26:47 +0100
commita19b3022d93195d3703817c728817d7e071e89fe (patch)
tree10219b266eb2d055990a45c7312e9e3ffda754f9 /include/afl-fuzz.h
parentaca5b55b6d1f2d7079830b805e12d8585e98aa2e (diff)
downloadafl++-a19b3022d93195d3703817c728817d7e071e89fe.tar.gz
afl_custom_describe api added
Diffstat (limited to 'include/afl-fuzz.h')
-rw-r--r--include/afl-fuzz.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 62d76323..92465e7e 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -799,6 +799,20 @@ struct custom_mutator {
                             u8 *add_buf, size_t add_buf_size, size_t max_size);
 
   /**
+   * Describe the current testcase, generated by the last mutation.
+   * This will be called, for example, to give the written testcase a name
+   * after a crash ocurred. It can help to reproduce crashing mutations.
+   *
+   * (Optional)
+   *
+   * @param data pointer returned in afl_custom_init for this fuzz case
+   * @param[in] max_size Maximum size of the mutated output. The mutation must
+   * not produce data larger than max_size.
+   * @return A valid ptr to a 0-terminated string, or NULL on error.
+   */
+  const char *(*afl_custom_describe)(void *data, size_t max_size);
+
+  /**
    * A post-processing function to use right before AFL writes the test case to
    * disk in order to execute the target.
    *