mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 16:21:32 +00:00
enabled fortify source
This commit is contained in:
parent
abef859925
commit
582f5103d9
2
Makefile
2
Makefile
@ -65,7 +65,7 @@ ifneq "$(shell uname -m)" "x86_64"
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT)
|
CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT)
|
||||||
override CFLAGS += -Wall -g -Wno-pointer-sign -I include/ \
|
override CFLAGS += -Wall -g -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -I include/ \
|
||||||
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
||||||
-DDOC_PATH=\"$(DOC_PATH)\" -Wno-unused-function -fcommon
|
-DDOC_PATH=\"$(DOC_PATH)\" -Wno-unused-function -fcommon
|
||||||
|
|
||||||
|
@ -44,9 +44,8 @@ typedef enum prealloc_status {
|
|||||||
|
|
||||||
/* Adds the entry used for prealloc bookkeeping to this struct */
|
/* Adds the entry used for prealloc bookkeeping to this struct */
|
||||||
|
|
||||||
#define PREALLOCABLE \
|
/* prealloc status of this instance */
|
||||||
; \
|
#define PREALLOCABLE pre_status_t pre_status
|
||||||
pre_status_t pre_status; /* prealloc status of this instance */
|
|
||||||
|
|
||||||
/* allocate an element of type *el_ptr, to this variable.
|
/* allocate an element of type *el_ptr, to this variable.
|
||||||
Uses (and reuses) the given prealloc_buf before hitting libc's malloc.
|
Uses (and reuses) the given prealloc_buf before hitting libc's malloc.
|
||||||
|
@ -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; }
|
if (!len_read) { return 0; }
|
||||||
read_total += len_read;
|
read_total += len_read;
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "afl-prealloc.h"
|
#include "afl-prealloc.h"
|
||||||
|
|
||||||
#define LIST_PREALLOC_SIZE \
|
/* How many elements to allocate before malloc is needed */
|
||||||
(64) /* How many elements to allocate before malloc is needed */
|
#define LIST_PREALLOC_SIZE (64)
|
||||||
|
|
||||||
typedef struct list_element {
|
typedef struct list_element {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user