aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-04-13 12:07:27 +0200
committervanhauser-thc <vh@thc.org>2023-04-13 12:07:27 +0200
commitf756734ad2782c3ed56feadb4b7b23fc82a7a968 (patch)
tree8c520bc4f2c4aa0514073cb9fae5e4420633782e /include
parent6cc8d607fb24e060591ece4b42d83fc06de68fc6 (diff)
downloadafl++-f756734ad2782c3ed56feadb4b7b23fc82a7a968.tar.gz
fix attempt at post_process implementation
Diffstat (limited to 'include')
-rw-r--r--include/afl-fuzz.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 5fd393dd..8b6502b4 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -885,14 +885,19 @@ struct custom_mutator {
* A post-processing function to use right before AFL writes the test case to
* disk in order to execute the target.
*
- * (Optional) If this functionality is not needed, simply don't define this
+ * NOTE: Do not do any random changes to the data in this function!
+ *
+ * PERFORMANCE: If you can modify the data in-place you will have a better
+ * performance. Modify *data and set `*out_buf = data`.
+ *
+ * (Optional) If this functionality is not needed, simply do not define this
* function.
*
* @param[in] data pointer returned in afl_custom_init by this custom mutator
* @param[in] buf Buffer containing the test case to be executed
* @param[in] buf_size Size of the test case
* @param[out] out_buf Pointer to the buffer storing the test case after
- * processing. External library should allocate memory for out_buf.
+ * processing. The external library should allocate memory for out_buf.
* It can chose to alter buf in-place, if the space is large enough.
* @return Size of the output buffer.
*/