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/doschk-1.1/doschk.c

FINAL RESULTS:

data/doschk-1.1/doschk.c:171:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy (ent->full_name, last_slash + 1);
data/doschk-1.1/doschk.c:293:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (buf, "%s/%s", ent->path, ent->full_name);
data/doschk-1.1/doschk.c:291: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 buf[1024];  /* fixed sizes for buffers are bad! */
data/doschk-1.1/doschk.c:455:15:  [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).
      input = fopen (argv[1], "r");
data/doschk-1.1/doschk.c:464:7:  [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 line[500];
data/doschk-1.1/doschk.c:148:23:  [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).
  char *null = path + strlen (path);
data/doschk-1.1/doschk.c:174:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (ent->path, first, last_slash - first);
data/doschk-1.1/doschk.c:337:23:  [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 elist_len = strlen (elist[i]->dos_name);
data/doschk-1.1/doschk.c:366:24:  [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 elist1_len = strlen (elist[i + 1]->dos_name);
data/doschk-1.1/doschk.c:427:12:  [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 (elist[i]->full_name) > 14) && !elist[i]->tagged)
data/doschk-1.1/doschk.c:469:19:  [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).
      lp = line + strlen (line);

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 479 in approximately 0.03 seconds (14251 lines/second)
Physical Source Lines of Code (SLOC) = 375
Hits@level = [0]  16 [1]   6 [2]   3 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  27 [1+]  11 [2+]   5 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+]  72 [1+] 29.3333 [2+] 13.3333 [3+] 5.33333 [4+] 5.33333 [5+]   0
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.