mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 11:58:08 +00:00
fix AFL_PERSISTENT_RECORD
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
release of the tool. See README.md for the general instruction manual.
|
||||
|
||||
### Version ++4.21a (dev)
|
||||
* afl-fuzz
|
||||
- fix AFL_PERSISTENT_RECORD
|
||||
* afl-cc:
|
||||
- fixes for LTO and outdated afl-gcc mode
|
||||
|
||||
|
@ -27,6 +27,9 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef AFL_PERSISTENT_RECORD
|
||||
#include "afl-fuzz.h"
|
||||
#endif
|
||||
#include "types.h"
|
||||
#include "debug.h"
|
||||
#include "common.h"
|
||||
@ -2078,10 +2081,13 @@ store_persistent_record: {
|
||||
u32 len = fsrv->persistent_record_len[entry];
|
||||
if (likely(len && data)) {
|
||||
|
||||
snprintf(fn, sizeof(fn), persistent_out_fmt, fsrv->persistent_record_dir,
|
||||
snprintf(
|
||||
fn, sizeof(fn), persistent_out_fmt, fsrv->persistent_record_dir,
|
||||
fsrv->persistent_record_cnt, writecnt++,
|
||||
afl->file_extension ? "." : "",
|
||||
afl->file_extension ? (const char *)afl->file_extension : "");
|
||||
((afl_state_t *)(fsrv->afl_ptr))->file_extension ? "." : "",
|
||||
((afl_state_t *)(fsrv->afl_ptr))->file_extension
|
||||
? (const char *)((afl_state_t *)(fsrv->afl_ptr))->file_extension
|
||||
: "");
|
||||
int fd = open(fn, O_CREAT | O_TRUNC | O_WRONLY, 0644);
|
||||
if (fd >= 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user