about summary refs log tree commit diff
path: root/frida_mode/test/persistent_ret/testinstr.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-07-19 10:54:12 +0200
committerGitHub <noreply@github.com>2021-07-19 10:54:12 +0200
commit815161827689c339d335233b7b232ac9b120b79b (patch)
tree4e686574ccf1f47cea79fc24514c8455e3a1fbc1 /frida_mode/test/persistent_ret/testinstr.c
parent9321a24e682b5c8bf6278961bd014cb883b87295 (diff)
parentcc57cc5f463e9b79980c2087d19b4a1e1360ec52 (diff)
downloadafl++-815161827689c339d335233b7b232ac9b120b79b.tar.gz
Merge branch 'release' into stable
Diffstat (limited to 'frida_mode/test/persistent_ret/testinstr.c')
-rw-r--r--frida_mode/test/persistent_ret/testinstr.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/frida_mode/test/persistent_ret/testinstr.c b/frida_mode/test/persistent_ret/testinstr.c
index 42e3519a..6cb88a50 100644
--- a/frida_mode/test/persistent_ret/testinstr.c
+++ b/frida_mode/test/persistent_ret/testinstr.c
@@ -17,14 +17,13 @@
 #include <unistd.h>
 
 #ifdef __APPLE__
-  #define MAIN_SECTION
+  #define TESTINSTR_SECTION
 #else
-  #define MAIN_SECTION __attribute__((section(".main")))
+  #define TESTINSTR_SECTION __attribute__((section(".testinstr")))
 #endif
 
-void LLVMFuzzerTestOneInput(char *buf, int len) {
+void testinstr(char *buf, int len) {
 
-  printf (">>> LLVMFuzzerTestOneInput >>>\n");
   if (len < 1) return;
   buf[len] = 0;
 
@@ -44,7 +43,7 @@ void slow() {
 
 }
 
-MAIN_SECTION int main(int argc, char **argv) {
+TESTINSTR_SECTION int main(int argc, char **argv) {
 
   char * file;
   int    fd = -1;
@@ -102,7 +101,7 @@ MAIN_SECTION int main(int argc, char **argv) {
 
     dprintf(STDERR_FILENO, "Running:    %s: (%zd bytes)\n", file, n_read);
 
-    LLVMFuzzerTestOneInput(buf, len);
+    testinstr(buf, len);
     dprintf(STDERR_FILENO, "Done:    %s: (%zd bytes)\n", file, n_read);
 
     slow();