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/java2html-0.9.2/mymain.c
Examining data/java2html-0.9.2/colors.c
Examining data/java2html-0.9.2/colors.h
Examining data/java2html-0.9.2/mymain.h

FINAL RESULTS:

data/java2html-0.9.2/mymain.c:108:12:  [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).
	  strcat (strcpy (outfilename, argv[i]), ".html");
data/java2html-0.9.2/mymain.c:319:28:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	  if (!(actout = (FILE *) popen(gzipcmd, "w")))
data/java2html-0.9.2/mymain.c:210:22:  [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 (-1 != (ch = getopt(argc, argv, "t:w:h:b:nicusV")))
data/java2html-0.9.2/mymain.c:264:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  return (getenv("PATH_TRANSLATED")
data/java2html-0.9.2/mymain.c:265:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    && getenv("GATEWAY_INTERFACE") 
data/java2html-0.9.2/mymain.c:277:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  pt = getenv("PATH_TRANSLATED");
data/java2html-0.9.2/mymain.c:306:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	  if ((pt = getenv("REMOTE_ADDR")) 
data/java2html-0.9.2/mymain.c:309:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	  if (!(pt = getenv("HTTP_ACCEPT_ENCODING")))
data/java2html-0.9.2/mymain.c:98:12:  [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).
	  actin = fopen (argv[i], "r");
data/java2html-0.9.2/mymain.c:108:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	  strcat (strcpy (outfilename, argv[i]), ".html");
data/java2html-0.9.2/mymain.c:109:13:  [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).
	  actout = fopen (outfilename, "w");
data/java2html-0.9.2/mymain.c:135:12:  [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).
  infile = fopen (filename, "r");
data/java2html-0.9.2/mymain.c:274: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        gzipcmd[10];
data/java2html-0.9.2/mymain.c:280:11:  [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).
  actin = fopen (pt, "r");
data/java2html-0.9.2/mymain.c:294:5:  [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 rfc1123date[32];
data/java2html-0.9.2/mymain.c:318:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(gzipcmd, "gzip -%d", COMPRESSION);
data/java2html-0.9.2/mymain.c:348:4:  [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 iso8601date[32];
data/java2html-0.9.2/mymain.c:107:40:  [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).
	  outfilename = malloc (sizeof (char)*strlen (argv[i]) + 6);
data/java2html-0.9.2/mymain.c:138:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc (infile);
data/java2html-0.9.2/mymain.c:142:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = fgetc (infile);

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 822 in approximately 0.05 seconds (15947 lines/second)
Physical Source Lines of Code (SLOC) = 565
Hits@level = [0]  57 [1]   3 [2]   9 [3]   6 [4]   2 [5]   0
Hits@level+ = [0+]  77 [1+]  20 [2+]  17 [3+]   8 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 136.283 [1+] 35.3982 [2+] 30.0885 [3+] 14.1593 [4+] 3.53982 [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.