diff options
author | vanhauser-thc <vh@thc.org> | 2021-06-01 10:53:02 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-06-01 10:53:02 +0200 |
commit | 5f6ff95e6a203ef6392f7c100a981671edc5fe41 (patch) | |
tree | 95d8398a96a7e02b199e4718f84ce91f3be7ce71 /custom_mutators/examples | |
parent | 17e904eedf025e870c79cd0dcc037282e1cce1d7 (diff) | |
download | afl++-5f6ff95e6a203ef6392f7c100a981671edc5fe41.tar.gz |
fix docs
Diffstat (limited to 'custom_mutators/examples')
-rw-r--r-- | custom_mutators/examples/post_library_gif.so.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/custom_mutators/examples/post_library_gif.so.c b/custom_mutators/examples/post_library_gif.so.c index ac10f409..aec05720 100644 --- a/custom_mutators/examples/post_library_gif.so.c +++ b/custom_mutators/examples/post_library_gif.so.c @@ -45,6 +45,7 @@ 1) If you don't want to modify the test case, simply set `*out_buf = in_buf` and return the original `len`. + NOTE: the following is currently NOT true, we abort in this case! 2) If you want to skip this test case altogether and have AFL generate a new one, return 0 or set `*out_buf = NULL`. Use this sparingly - it's faster than running the target program @@ -53,14 +54,14 @@ 3) If you want to modify the test case, allocate an appropriately-sized buffer, move the data into that buffer, make the necessary changes, and then return the new pointer as out_buf. Return an appropriate len - afterwards. + afterwards. Note that the buffer will *not* be freed for you. To avoid memory leaks, you need to free it or reuse it on subsequent calls (as shown below). *** Feel free to reuse the original 'in_buf' BUFFER and return it. *** - Aight. The example below shows a simple postprocessor that tries to make + Alright. The example below shows a simple postprocessor that tries to make sure that all input files start with "GIF89a". PS. If you don't like C, you can try out the unix-based wrapper from |