mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 20:08:07 +00:00
minor fixes
This commit is contained in:
@ -842,7 +842,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* randamsa_init installs some signal hadlers, call it before
|
/* radamsa_init installs some signal handlers, call it before
|
||||||
setup_signal_handlers so that AFL++ can then replace those signal
|
setup_signal_handlers so that AFL++ can then replace those signal
|
||||||
handlers */
|
handlers */
|
||||||
radamsa_init_ptr();
|
radamsa_init_ptr();
|
||||||
@ -1390,7 +1390,7 @@ stop_fuzzing:
|
|||||||
if (afl->shm_fuzz) {
|
if (afl->shm_fuzz) {
|
||||||
|
|
||||||
afl_shm_deinit(afl->shm_fuzz);
|
afl_shm_deinit(afl->shm_fuzz);
|
||||||
free(afl->shm_fuzz);
|
ck_free(afl->shm_fuzz);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
// Map memory.
|
// Map memory.
|
||||||
mem_map_checked(uc, BASE_ADDRESS, len, UC_PROT_ALL);
|
mem_map_checked(uc, BASE_ADDRESS, len, UC_PROT_ALL);
|
||||||
printf("Len: %lx", len);
|
printf("Len: %lx\n", len);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
// write machine code to be emulated to memory
|
// write machine code to be emulated to memory
|
||||||
|
@ -44,7 +44,7 @@ harness: harness.o
|
|||||||
${MYCC} -L${LIBDIR} harness.o ../../unicornafl/libunicornafl.a $(LDFLAGS) -o $@
|
${MYCC} -L${LIBDIR} harness.o ../../unicornafl/libunicornafl.a $(LDFLAGS) -o $@
|
||||||
|
|
||||||
debug: harness-debug.o
|
debug: harness-debug.o
|
||||||
${MYCC} -L${LIBDIR} harness.o ../../unicornafl/libunicornafl.a $(LDFLAGS) -o harness-debug
|
${MYCC} -L${LIBDIR} harness-debug.o ../../unicornafl/libunicornafl.a $(LDFLAGS) -o harness-debug
|
||||||
|
|
||||||
fuzz: harness
|
fuzz: harness
|
||||||
../../../afl-fuzz -m none -i sample_inputs -o out -- ./harness @@
|
../../../afl-fuzz -m none -i sample_inputs -o out -- ./harness @@
|
||||||
|
@ -68,7 +68,7 @@ static void hook_code(uc_engine *uc, uint64_t address, uint32_t size, void *user
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
The sample uses strlen, since we don't have a loader or libc, we'll fake it.
|
The sample uses strlen, since we don't have a loader or libc, we'll fake it.
|
||||||
We know the strlen will return the lenght of argv[1] that we just planted.
|
We know the strlen will return the length of argv[1] that we just planted.
|
||||||
It will be a lot faster than an actual strlen for this specific purpose.
|
It will be a lot faster than an actual strlen for this specific purpose.
|
||||||
*/
|
*/
|
||||||
static void hook_strlen(uc_engine *uc, uint64_t address, uint32_t size, void *user_data) {
|
static void hook_strlen(uc_engine *uc, uint64_t address, uint32_t size, void *user_data) {
|
||||||
@ -194,7 +194,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
// Map memory.
|
// Map memory.
|
||||||
mem_map_checked(uc, BASE_ADDRESS, len, UC_PROT_ALL);
|
mem_map_checked(uc, BASE_ADDRESS, len, UC_PROT_ALL);
|
||||||
printf("Len: %lx", len);
|
printf("Len: %lx\n", len);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
// write machine code to be emulated to memory
|
// write machine code to be emulated to memory
|
||||||
|
Submodule unicorn_mode/unicornafl updated: 37067ac128...707060cbc3
Reference in New Issue
Block a user