aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-03-25 11:31:01 +0100
committervan Hauser <vh@thc.org>2020-03-27 11:06:06 +0100
commit6d3dc83c5dde31ccb74e04815a04b85b05761b30 (patch)
tree78d63856444d89ec91fd5634052867ec38a31f7c /include
parent89512d4e05e18d83b634adc00afdd8ad6fb94df5 (diff)
downloadafl++-6d3dc83c5dde31ccb74e04815a04b85b05761b30.tar.gz
code format
Diffstat (limited to 'include')
-rw-r--r--include/afl-fuzz.h19
-rw-r--r--include/common.h25
2 files changed, 21 insertions, 23 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 7dddefb0..d610ac29 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -290,8 +290,8 @@ typedef struct py_mutator {
PyObject *py_module;
PyObject *py_functions[PY_FUNC_COUNT];
- void *afl_state;
- void *py_data;
+ void * afl_state;
+ void * py_data;
} py_mutator_t;
@@ -592,7 +592,7 @@ struct custom_mutator {
const char *name;
void * dh;
- void *data; /* custom mutator data ptr */
+ void *data; /* custom mutator data ptr */
/* hooks for the custom mutator function */
@@ -620,8 +620,8 @@ struct custom_mutator {
* not produce data larger than max_size.
* @return Size of the mutated output.
*/
- size_t (*afl_custom_fuzz)(void *data, u8 **buf, size_t buf_size,
- u8 *add_buf, size_t add_buf_size, size_t max_size);
+ size_t (*afl_custom_fuzz)(void *data, u8 **buf, size_t buf_size, u8 *add_buf,
+ size_t add_buf_size, size_t max_size);
/**
* A post-processing function to use right before AFL writes the test case to
@@ -711,8 +711,8 @@ struct custom_mutator {
* not produce data larger than max_size.
* @return Size of the mutated output.
*/
- size_t (*afl_custom_havoc_mutation)(void *data, u8 **buf,
- size_t buf_size, size_t max_size);
+ size_t (*afl_custom_havoc_mutation)(void *data, u8 **buf, size_t buf_size,
+ size_t max_size);
/**
* Return the probability (in percentage) that afl_custom_havoc_mutation
@@ -748,9 +748,8 @@ struct custom_mutator {
* @param filename_orig_queue File name of the original queue entry. This
* argument can be NULL while initializing the fuzzer
*/
- void (*afl_custom_queue_new_entry)(void *data,
- const u8 * filename_new_queue,
- const u8 * filename_orig_queue);
+ void (*afl_custom_queue_new_entry)(void *data, const u8 *filename_new_queue,
+ const u8 *filename_orig_queue);
/**
* Deinitialize the custom mutator.
*
diff --git a/include/common.h b/include/common.h
index 97076004..8b21b55f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -78,7 +78,7 @@ static u64 get_cur_time_us(void) {
Will return buf for convenience. */
static u8 *stringify_int(u8 *buf, size_t len, u64 val) {
-
+\
#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
do { \
\
@@ -233,23 +233,22 @@ static u8 *stringify_time_diff(u8 *buf, size_t len, u64 cur_ms, u64 event_ms) {
}
-
/* Unsafe Describe integer. The buf sizes are not checked.
This is unsafe but fast.
Will return buf for convenience. */
static u8 *u_stringify_int(u8 *buf, u64 val) {
-
-#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
- do { \
- \
- if (val < (_divisor) * (_limit_mult)) { \
- \
- sprintf(buf, _fmt, ((_cast)val) / (_divisor)); \
- return buf; \
- \
- } \
- \
+\
+#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
+ do { \
+ \
+ if (val < (_divisor) * (_limit_mult)) { \
+ \
+ sprintf(buf, _fmt, ((_cast)val) / (_divisor)); \
+ return buf; \
+ \
+ } \
+ \
} while (0)
/* 0-9999 */