about summary refs log tree commit diff
path: root/gcc_plugin/afl-gcc-fast.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-02-16 18:16:10 +0100
committervan Hauser <vh@thc.org>2020-02-16 18:16:10 +0100
commit204059c61aca2ccdde64fbb59dbf6d86fb243bb3 (patch)
treec7ed9fb911835f570470bc0e0bf0193fe5434f9e /gcc_plugin/afl-gcc-fast.c
parent4cccdb89c0112931e451bc0719880813d15d14dc (diff)
downloadafl++-204059c61aca2ccdde64fbb59dbf6d86fb243bb3.tar.gz
check for mistyped env vars
Diffstat (limited to 'gcc_plugin/afl-gcc-fast.c')
-rw-r--r--gcc_plugin/afl-gcc-fast.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc_plugin/afl-gcc-fast.c b/gcc_plugin/afl-gcc-fast.c
index bf89b867..2aee8f4a 100644
--- a/gcc_plugin/afl-gcc-fast.c
+++ b/gcc_plugin/afl-gcc-fast.c
@@ -26,10 +26,11 @@
 
 #define AFL_MAIN
 
-#include "../config.h"
-#include "../types.h"
-#include "../include/debug.h"
-#include "../include/alloc-inl.h"
+#include "config.h"
+#include "types.h"
+#include "debug.h"
+#include "common.h"
+#include "alloc-inl.h"
 
 #include <stdio.h>
 #include <unistd.h>
@@ -39,6 +40,7 @@
 static u8*  obj_path;                  /* Path to runtime libraries         */
 static u8** cc_params;                 /* Parameters passed to the real CC  */
 static u32  cc_par_cnt = 1;            /* Param count, including argv0      */
+u8          use_stdin = 0;                                         /* dummy */
 
 /* Try to find the runtime libraries. If that fails, abort. */
 
@@ -294,7 +296,7 @@ static void edit_params(u32 argc, char** argv) {
 
 /* Main entry point */
 
-int main(int argc, char** argv) {
+int main(int argc, char** argv, char** envp) {
 
   if (argc < 2 || strcmp(argv[1], "-h") == 0) {
 
@@ -344,6 +346,8 @@ int main(int argc, char** argv) {
 
   }
 
+  check_environment_vars(envp);
+
   find_obj(argv[0]);
 
   edit_params(argc, argv);