diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-31 02:41:11 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-01 13:10:07 +0200 |
commit | 582f5103d92dd8b7da1742c86d22f6b191743b6f (patch) | |
tree | 1d5b87ed6c0b0b4e1287ec14a5fdbdbfe84fbce8 /include | |
parent | abef8599251f4d01349285a6c6ed0f75a54272b8 (diff) | |
download | afl++-582f5103d92dd8b7da1742c86d22f6b191743b6f.tar.gz |
enabled fortify source
Diffstat (limited to 'include')
-rw-r--r-- | include/afl-prealloc.h | 5 | ||||
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/list.h | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/include/afl-prealloc.h b/include/afl-prealloc.h index ab86f0d7..66e6aadf 100644 --- a/include/afl-prealloc.h +++ b/include/afl-prealloc.h @@ -44,9 +44,8 @@ typedef enum prealloc_status { /* Adds the entry used for prealloc bookkeeping to this struct */ -#define PREALLOCABLE \ - ; \ - pre_status_t pre_status; /* prealloc status of this instance */ +/* prealloc status of this instance */ +#define PREALLOCABLE pre_status_t pre_status /* allocate an element of type *el_ptr, to this variable. Uses (and reuses) the given prealloc_buf before hitting libc's malloc. diff --git a/include/common.h b/include/common.h index e8558e24..db102777 100644 --- a/include/common.h +++ b/include/common.h @@ -426,7 +426,7 @@ static inline u32 read_timed(s32 fd, void *buf, size_t len, u32 timeout_ms) { } - len_read = read(fd, buf + len_read, len - len_read); + len_read = read(fd, ((u8 *)buf) + len_read, len - len_read); if (!len_read) { return 0; } read_total += len_read; diff --git a/include/list.h b/include/list.h index 1190931f..25ee8282 100644 --- a/include/list.h +++ b/include/list.h @@ -34,8 +34,8 @@ #include "debug.h" #include "afl-prealloc.h" -#define LIST_PREALLOC_SIZE \ - (64) /* How many elements to allocate before malloc is needed */ +/* How many elements to allocate before malloc is needed */ +#define LIST_PREALLOC_SIZE (64) typedef struct list_element { |