about summary refs log tree commit diff
path: root/test/test-compcov.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-04-12 12:13:01 +0200
committervan Hauser <vh@thc.org>2020-04-12 12:13:01 +0200
commit0a525f768b8b50e6f20a59489f19a4efe84ccfff (patch)
treee04aa443ac4fefc6acad438e8d778f57ecdfc109 /test/test-compcov.c
parent4ed43b7632e8e0d80230bd3c27ee7f4d536a543a (diff)
downloadafl++-0a525f768b8b50e6f20a59489f19a4efe84ccfff.tar.gz
local/global var for compare-transform-pass and code-format
Diffstat (limited to 'test/test-compcov.c')
-rw-r--r--test/test-compcov.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/test-compcov.c b/test/test-compcov.c
index fff9c759..f1743265 100644
--- a/test/test-compcov.c
+++ b/test/test-compcov.c
@@ -6,27 +6,33 @@
 char global_cmpval[] = "GLOBALVARIABLE";
 
 int main(int argc, char **argv) {
+
   char *input = argv[1], *buf, buffer[20];
-  char cmpval[] = "LOCALVARIABLE";
-  char shortval[4] = "abc";
+  char  cmpval[] = "LOCALVARIABLE";
+  char  shortval[4] = "abc";
 
   if (argc < 2) {
+
     ssize_t ret = read(0, buffer, sizeof(buffer) - 1);
     buffer[ret] = 0;
     input = buffer;
+
   }
-  
+
   if (strcmp(input, "LIBTOKENCAP") == 0)
     printf("your string was libtokencap\n");
   else if (strcmp(input, "BUGMENOT") == 0)
     printf("your string was bugmenot\n");
   else if (strcmp(input, "BUFFEROVERFLOW") == 0) {
+
     buf = malloc(16);
     strcpy(buf, "TEST");
     strcat(buf, input);
     printf("This will only crash with libdislocator: %s\n", buf);
     return 0;
-  } else if (*(unsigned int*)input == 0xabadcafe)
+
+  } else if (*(unsigned int *)input == 0xabadcafe)
+
     printf("GG you eat cmp tokens for breakfast!\n");
   else if (memcmp(cmpval, input, 8) == 0)
     printf("local var memcmp works!\n");
@@ -40,3 +46,4 @@ int main(int argc, char **argv) {
   return 0;
 
 }
+