diff options
| author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-05-27 09:49:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-27 10:49:34 +0200 |
| commit | 14178141dcdc1a81ea4f4461790ec87f60606985 (patch) | |
| tree | 386009dcf972d03b9c7d5457baf8ba2ddfd16f53 /frida_mode/src/main.c | |
| parent | 9e0370aa997ec8d0729ea695e74f9529baedd3a0 (diff) | |
| download | afl++-14178141dcdc1a81ea4f4461790ec87f60606985.tar.gz | |
Frida (#940)
* Added re2 test * Added libpcap test * Fix validation of setting of ADDR_NO_RANDOMIZE * Added support for printing original and instrumented code Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/src/main.c')
| -rw-r--r-- | frida_mode/src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frida_mode/src/main.c b/frida_mode/src/main.c index 21073cbe..e8015905 100644 --- a/frida_mode/src/main.c +++ b/frida_mode/src/main.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <unistd.h> #include <sys/types.h> @@ -58,10 +59,10 @@ static void on_main_os(int argc, char **argv, char **envp) { static void on_main_os(int argc, char **argv, char **envp) { UNUSED_PARAMETER(argc); - /* Personality doesn't affect the current process, it only takes effect on * evec */ int persona = personality(ADDR_NO_RANDOMIZE); + if (persona == -1) { WARNF("Failed to set ADDR_NO_RANDOMIZE: %d", errno); } if ((persona & ADDR_NO_RANDOMIZE) == 0) { execvpe(argv[0], argv, envp); } GumInterceptor *interceptor = gum_interceptor_obtain(); |
