about summary refs log tree commit diff
path: root/src/afl-showmap.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-07-19 10:31:56 +0200
committerGitHub <noreply@github.com>2021-07-19 10:31:56 +0200
commit939729e504ea269dd6d7252c363b160e01d1be1a (patch)
tree808710139e53d9958cdb660d61680d48e64e8c3a /src/afl-showmap.c
parent458eb0813a6f7d63eed97f18696bca8274533123 (diff)
parent18fd97fc5ffc5ad94e735cfbfa0d500463dcb585 (diff)
downloadafl++-939729e504ea269dd6d7252c363b160e01d1be1a.tar.gz
Merge pull request #1023 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r--src/afl-showmap.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 936d3bc4..5c899e69 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -401,14 +401,23 @@ static u32 read_file(u8 *in_file) {
 
   if (fstat(fd, &st) || !st.st_size) {
 
-    WARNF("Zero-sized input file '%s'.", in_file);
+    if (!be_quiet && !quiet_mode) {
+
+      WARNF("Zero-sized input file '%s'.", in_file);
+
+    }
 
   }
 
   if (st.st_size > MAX_FILE) {
 
-    WARNF("Input file '%s' is too large, only reading %u bytes.", in_file,
-          MAX_FILE);
+    if (!be_quiet && !quiet_mode) {
+
+      WARNF("Input file '%s' is too large, only reading %u bytes.", in_file,
+            MAX_FILE);
+
+    }
+
     in_len = MAX_FILE;
 
   } else {
@@ -748,7 +757,7 @@ u32 execute_testcases(u8 *dir) {
 
     }
 
-    if (st.st_size > MAX_FILE && !be_quiet) {
+    if (st.st_size > MAX_FILE && !be_quiet && !quiet_mode) {
 
       WARNF("Test case '%s' is too big (%s, limit is %s), partial reading", fn2,
             stringify_mem_size(val_buf[0], sizeof(val_buf[0]), st.st_size),
@@ -853,7 +862,8 @@ static void usage(u8 *argv0) {
       "AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n"
       "AFL_PRINT_FILENAMES: If set, the filename currently processed will be "
       "printed to stdout\n"
-      "AFL_QUIET: do not print extra informational output\n",
+      "AFL_QUIET: do not print extra informational output\n"
+      "AFL_NO_FORKSRV: run target via execve instead of using the forkserver\n",
       argv0, MEM_LIMIT, doc_path);
 
   exit(1);
@@ -1097,6 +1107,11 @@ int main(int argc, char **argv_orig, char **envp) {
 
   check_environment_vars(envp);
 
+  if (getenv("AFL_NO_FORKSRV")) {             /* if set, use the fauxserver */
+    fsrv->use_fauxsrv = true;
+
+  }
+
   if (getenv("AFL_DEBUG")) {
 
     DEBUGF("");