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/ccze-0.2.1/src/ccze-plugin.c
Examining data/ccze-0.2.1/src/mod_apm.c
Examining data/ccze-0.2.1/src/mod_distcc.c
Examining data/ccze-0.2.1/src/mod_exim.c
Examining data/ccze-0.2.1/src/mod_fetchmail.c
Examining data/ccze-0.2.1/src/mod_ftpstats.c
Examining data/ccze-0.2.1/src/mod_httpd.c
Examining data/ccze-0.2.1/src/mod_icecast.c
Examining data/ccze-0.2.1/src/mod_oops.c
Examining data/ccze-0.2.1/src/mod_php.c
Examining data/ccze-0.2.1/src/mod_postfix.c
Examining data/ccze-0.2.1/src/mod_procmail.c
Examining data/ccze-0.2.1/src/mod_proftpd.c
Examining data/ccze-0.2.1/src/mod_squid.c
Examining data/ccze-0.2.1/src/mod_sulog.c
Examining data/ccze-0.2.1/src/mod_super.c
Examining data/ccze-0.2.1/src/mod_ulogd.c
Examining data/ccze-0.2.1/src/mod_vsftpd.c
Examining data/ccze-0.2.1/src/mod_xferlog.c
Examining data/ccze-0.2.1/src/ccze-dump.c
Examining data/ccze-0.2.1/src/ccze-cssdump.c
Examining data/ccze-0.2.1/src/ccze-compat.h
Examining data/ccze-0.2.1/src/ccze-private.h
Examining data/ccze-0.2.1/src/ccze-wordcolor.c
Examining data/ccze-0.2.1/src/ccze.c
Examining data/ccze-0.2.1/src/mod_syslog.c
Examining data/ccze-0.2.1/src/mod_dpkg.c
Examining data/ccze-0.2.1/src/ccze-color.c
Examining data/ccze-0.2.1/src/ccze.h
Examining data/ccze-0.2.1/src/ccze-compat.c

FINAL RESULTS:

data/ccze-0.2.1/src/ccze-compat.c:216:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (stderr, fmt, ap);
data/ccze-0.2.1/src/ccze-compat.c:426:11:  [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.
      n = vsnprintf (*ptr, size, fmt, ap);
data/ccze-0.2.1/src/ccze-dump.c:198:7:  [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 (line, ccze_color_lookup_name (cidx));
data/ccze-0.2.1/src/ccze-dump.c:202:7:  [4] (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).
      strcat (line, ccze_dump_color_get_attrib (color));
data/ccze-0.2.1/src/ccze-dump.c:203:7:  [4] (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).
      strcat (line, ccze_dump_color_to_name (color));
data/ccze-0.2.1/src/ccze-dump.c:208:7:  [4] (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).
      strcat (line, ccze_dump_color_comment (ccze_dump_color_to_idx (cidx)));
data/ccze-0.2.1/src/ccze-dump.c:218:7:  [4] (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).
      strcat (line, ccze_colorname_map[color].name);
data/ccze-0.2.1/src/ccze-dump.c:222:7:  [4] (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).
      strcat (line, ccze_csscolor_normal_map[color]);
data/ccze-0.2.1/src/ccze-dump.c:226:7:  [4] (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).
      strcat (line, ccze_colorname_map[color].name);
data/ccze-0.2.1/src/ccze-dump.c:230:7:  [4] (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).
      strcat (line, ccze_csscolor_bold_map[color]);
data/ccze-0.2.1/src/ccze-dump.c:238:3:  [4] (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).
  strcat (line, ccze_cssbody_color ());
data/ccze-0.2.1/src/ccze-plugin.c:197:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      if (access (path, F_OK))
data/ccze-0.2.1/src/mod_syslog.c:134:21:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
CCZE_DEFINE_PLUGIN (syslog, FULL, "Generic syslog(8) log coloriser.");
data/ccze-0.2.1/src/ccze-compat.c:160:15:  [3] (buffer) getopt_long:
  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 ((c = getopt_long (argc, argv, options, longopts, NULL)) != -1)
data/ccze-0.2.1/src/ccze-compat.c:162: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 ((c = getopt (argc, argv, options)) != -1)
data/ccze-0.2.1/src/ccze-cssdump.c:95: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.
      home = getenv ("HOME");
data/ccze-0.2.1/src/ccze-dump.c:162: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.
      home = getenv ("HOME");
data/ccze-0.2.1/src/ccze-plugin.c:194: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 ((home = getenv ("HOME")) != NULL)
data/ccze-0.2.1/src/ccze-plugin.c:251: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 ((home = getenv ("HOME")) != NULL)
data/ccze-0.2.1/src/ccze.c:583: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.
      home = getenv ("HOME");
data/ccze-0.2.1/src/ccze-color.c:466:8:  [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).
  fp = fopen (fn, "r");
data/ccze-0.2.1/src/ccze-compat.c:79:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (ns, s, size);
data/ccze-0.2.1/src/ccze-compat.c:316:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy ((*namelist)[i], entry, entrysize);
data/ccze-0.2.1/src/ccze-dump.c:87:5:  [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 (str, "bold ");
data/ccze-0.2.1/src/ccze-dump.c:89:5:  [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 (str, "underline ");
data/ccze-0.2.1/src/ccze-dump.c:91:5:  [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 (str, "reverse ");
data/ccze-0.2.1/src/ccze-dump.c:93:5:  [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 (str, "blink ");
data/ccze-0.2.1/src/ccze-dump.c:146: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 line[256];
data/ccze-0.2.1/src/ccze-dump.c:217:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy (line, "css");
data/ccze-0.2.1/src/ccze-dump.c:225:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy (line, "cssbold");
data/ccze-0.2.1/src/ccze-dump.c:234:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy (line, "cssbody");
data/ccze-0.2.1/src/ccze.c:350: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 tmp[128];
data/ccze-0.2.1/src/ccze.c:354:15:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      ltime = atol (date);
data/ccze-0.2.1/src/ccze-color.c:339:39:  [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 *tmp = strndup (&color[1], strlen (color) - 2);
data/ccze-0.2.1/src/ccze-compat.c:235: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).
    endp = *optionp + strlen (*optionp);
data/ccze-0.2.1/src/ccze-compat.c:312:31:  [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).
	    sizeof (entry->d_name) + strlen (entry->d_name) + 1;
data/ccze-0.2.1/src/ccze-compat.c:374:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((c = getc (stream)) != EOF)
data/ccze-0.2.1/src/ccze-dump.c:199:14:  [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).
      llen = strlen (line);
data/ccze-0.2.1/src/ccze-dump.c:204:14:  [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).
      llen = strlen (line);
data/ccze-0.2.1/src/ccze-dump.c:219:14:  [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).
      llen = strlen (line);
data/ccze-0.2.1/src/ccze-dump.c:227:14:  [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).
      llen = strlen (line);
data/ccze-0.2.1/src/ccze-dump.c:235:10:  [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).
  llen = strlen (line);
data/ccze-0.2.1/src/ccze-wordcolor.c:65: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).
  for (i = 0; i < strlen (newstr); i++)
data/ccze-0.2.1/src/ccze-wordcolor.c:83:48:  [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 ((match = pcre_exec (reg_pre, NULL, word, strlen (word), 0, 0,
data/ccze-0.2.1/src/ccze-wordcolor.c:95:49:  [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 ((match = pcre_exec (reg_post, NULL, word, strlen (word), 0, 0,
data/ccze-0.2.1/src/ccze-wordcolor.c:106:10:  [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).
  wlen = strlen (word);
data/ccze-0.2.1/src/ccze-wordcolor.c:154:17:  [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).
      hostlen = strlen (host);
data/ccze-0.2.1/src/ccze-wordcolor.c:155:15:  [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).
      iplen = strlen (word) - hostlen - 1;
data/ccze-0.2.1/src/ccze-wordcolor.c:156:27:  [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).
      ip = strndup (&word[strlen (host) + 1], iplen);
data/ccze-0.2.1/src/ccze.c:159:28:  [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).
      _strbrk_string_len = strlen (str);
data/ccze-0.2.1/src/ccze.c:393:33:  [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).
    dest = (char *)ccze_malloc (strlen (src) * 5 + 1);
data/ccze-0.2.1/src/ccze.c:705:17:  [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).
      subjlen = strlen (subject);
data/ccze-0.2.1/src/ccze.c:712:36:  [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).
	  ccze_plugin_run (plugins, rest, strlen (rest), &rest2,
data/ccze-0.2.1/src/mod_exim.c:44: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).
			   strlen (msgfull), 0, 0, offsets2, 99)) >= 0)
data/ccze-0.2.1/src/mod_exim.c:60:5:  [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).
				strlen (msgfull), 0, 0, offsets2, 99)) >= 0)
data/ccze-0.2.1/src/mod_postfix.c:44: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).
  i = strlen (s);
data/ccze-0.2.1/src/mod_postfix.c:45:8:  [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).
  i -= strlen (field) + 1;
data/ccze-0.2.1/src/mod_postfix.c:46: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).
  value = strndup (&s[strlen (field) + 1], i);
data/ccze-0.2.1/src/mod_squid.c:174:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  char *hdate, *lmdate, *expire, *ctype, *size, *read, *method;
data/ccze-0.2.1/src/mod_squid.c:192:64:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  pcre_get_substring (str, offsets, match, 16, (const char **)&read);
data/ccze-0.2.1/src/mod_squid.c:218:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ccze_addstr (CCZE_COLOR_GETSIZE, read);
data/ccze-0.2.1/src/mod_squid.c:238:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  free (read);

ANALYSIS SUMMARY:

Hits = 62
Lines analyzed = 6092 in approximately 0.26 seconds (23665 lines/second)
Physical Source Lines of Code (SLOC) = 4649
Hits@level = [0]  46 [1]  29 [2]  13 [3]   7 [4]  13 [5]   0
Hits@level+ = [0+] 108 [1+]  62 [2+]  33 [3+]  20 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 23.2308 [1+] 13.3362 [2+] 7.0983 [3+] 4.302 [4+] 2.7963 [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.