diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-26 19:47:16 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-03-27 11:06:06 +0100 |
commit | 604f122819bbcba6a041b4b471805a3b586916cc (patch) | |
tree | 55e001008f7cda33a0a8ae1b286a2f535c89dab1 /examples | |
parent | d6a7630fe2938621db05e616fe6b1b21dfaf21b3 (diff) | |
download | afl++-604f122819bbcba6a041b4b471805a3b586916cc.tar.gz |
docu
Diffstat (limited to 'examples')
-rw-r--r-- | examples/custom_mutators/example.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/custom_mutators/example.c b/examples/custom_mutators/example.c index 04b72c77..220d0ca1 100644 --- a/examples/custom_mutators/example.c +++ b/examples/custom_mutators/example.c @@ -126,17 +126,14 @@ size_t afl_custom_fuzz(my_mutator_t *data, uint8_t **buf, size_t buf_size, * @param[in] data pointer returned in afl_custom_init for this fuzz case * @param[in] buf Buffer containing the test case to be executed * @param[in] buf_size Size of the test case - * @param[in] out_buf Pointer to the buffer containing the test case after - * processing. External library should allocate memory for out_buf. AFL++ - * will release the memory after saving the test case. - * out_buf will always be at least as large as buf. - * @param[in] out_buf_size The maximum size we may use. - * In case we need to have this bigger, simply return that. + * @param[out] out_buf Pointer to the buffer containing the test case after + * processing. External library should allocate memory for out_buf. + * The buf pointer may be reused (up to the given buf_size); * @return Size of the output buffer after processing or the needed amount. - * return 0 to indicate the original buf should be used. + * A return smaller 1 indicates an error. */ size_t afl_custom_pre_save(my_mutator_t *data, uint8_t *buf, size_t buf_size, - uint8_t *out_buf, size_t out_buf_size) { + uint8_t **out_buf) { if (data->pre_save_size < buf_size + 5) { |