Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/vmtouch-1.3.1/vmtouch.c

FINAL RESULTS:

data/vmtouch-1.3.1/vmtouch.c:193:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, sizeof(buf), fmt, ap);
data/vmtouch-1.3.1/vmtouch.c:206:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, sizeof(buf), fmt, ap);
data/vmtouch-1.3.1/vmtouch.c:267:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(output, sizeof(output), "%" PRId64, inp);
data/vmtouch-1.3.1/vmtouch.c:466:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(out, "] %" PRId64 "/%" PRId64, pages_in_core, pages_in_file);
data/vmtouch-1.3.1/vmtouch.c:923:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((ch = getopt(argc, argv, "tevqlLdfFh0i:I:p:b:m:P:w")) != -1) {
data/vmtouch-1.3.1/vmtouch.c:144:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *ignore_list[MAX_NUMBER_OF_IGNORES];
data/vmtouch-1.3.1/vmtouch.c:145:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *filename_filter_list[MAX_NUMBER_OF_FILENAME_FILTERS];
data/vmtouch-1.3.1/vmtouch.c:190:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4096];
data/vmtouch-1.3.1/vmtouch.c:203:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4096];
data/vmtouch-1.3.1/vmtouch.c:264:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char output[100];
data/vmtouch-1.3.1/vmtouch.c:494:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(path, open_flags, 0);
data/vmtouch-1.3.1/vmtouch.c:499:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(path, open_flags, 0);
data/vmtouch-1.3.1/vmtouch.c:726:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char npath[PATH_MAX];
data/vmtouch-1.3.1/vmtouch.c:847:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(path, "r");
data/vmtouch-1.3.1/vmtouch.c:877:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen(o_pidfile, "w");
data/vmtouch-1.3.1/vmtouch.c:240:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  exit_read = read(exit_pipe[0], &exit_value, 1);
data/vmtouch-1.3.1/vmtouch.c:292:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len=strlen(inp);
data/vmtouch-1.3.1/vmtouch.c:363:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(inp) > MAX_FILENAME_LENGTH) {
data/vmtouch-1.3.1/vmtouch.c:382:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(inp) > MAX_FILENAME_LENGTH) {
data/vmtouch-1.3.1/vmtouch.c:728:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int tp_path_len = strlen(path);
data/vmtouch-1.3.1/vmtouch.c:841:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t read;

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 1039 in approximately 0.04 seconds (23516 lines/second)
Physical Source Lines of Code (SLOC) = 762
Hits@level = [0]  53 [1]   6 [2]  10 [3]   1 [4]   4 [5]   0
Hits@level+ = [0+]  74 [1+]  21 [2+]  15 [3+]   5 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 97.1129 [1+] 27.5591 [2+] 19.685 [3+] 6.56168 [4+] 5.24934 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.