Fix format specifiers (#1818)

* Update afl-mutations.h

Fix bug: compilation cannot pass when DEBUG macro is enabled

* Update afl-fuzz-one.c

Fix bug: compilation cannot pass when DEBUG macro is enabled
This commit is contained in:
mark0 2023-07-31 05:51:24 +08:00 committed by GitHub
parent f87ba7ed63
commit 168ade3b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2456,7 +2456,7 @@ inline u32 afl_mutate(afl_state_t *afl, u8 *buf, u32 len, u32 steps,
}
char buf[20];
snprintf(buf, sizeof(buf), "%ld", val);
snprintf(buf, sizeof(buf), "%lld", val);
u32 old_len = off2 - off;
u32 new_len = strlen(buf);

View File

@ -2995,7 +2995,7 @@ havoc_stage:
// fprintf(stderr, "val: %u-%u = %ld\n", off, off2, val);
char buf[20];
snprintf(buf, sizeof(buf), "%ld", val);
snprintf(buf, sizeof(buf), "%lld", val);
// fprintf(stderr, "BEFORE: %s\n", out_buf);