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/spell-1.0/str.c
Examining data/spell-1.0/getopt.c
Examining data/spell-1.0/getopt1.c
Examining data/spell-1.0/getopt.h
Examining data/spell-1.0/str.h
Examining data/spell-1.0/spell.c

FINAL RESULTS:

data/spell-1.0/spell.c:643:9:  [4] (shell) execl:
  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 (execl (ispell_prog, "ispell", "-a", "-p", dictionary, NULL)
data/spell-1.0/spell.c:648:9:  [4] (shell) execl:
  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 (execl (ispell_prog, "ispell", "-a", "-d", "british", NULL)
data/spell-1.0/spell.c:652:7:  [4] (shell) execl:
  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 (execl (ispell_prog, "ispell", "-a", NULL) < 0)
data/spell-1.0/spell.c:687: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, message, args);
data/spell-1.0/str.c:296: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, message, args);
data/spell-1.0/getopt.c:190:7:  [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.
char *getenv ();
data/spell-1.0/getopt.c:350:16:  [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.
      else if (getenv ("POSIXLY_CORRECT") != NULL)
data/spell-1.0/getopt.c:649:1:  [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.
getopt (argc, argv, optstring)
data/spell-1.0/getopt.c:679:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/spell-1.0/getopt.h:103:14:  [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.
  extern int getopt (int argc, char *const *argv, const char *shortopts);
data/spell-1.0/getopt.h:105:14:  [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.
  extern int getopt ();
data/spell-1.0/getopt.h:107:14:  [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.
  extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/spell-1.0/getopt.h:119:14:  [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.
  extern int getopt ();
data/spell-1.0/getopt.h:120:14:  [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.
  extern int getopt_long ();
data/spell-1.0/getopt1.c:47:7:  [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.
char *getenv ();
data/spell-1.0/getopt1.c:55:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/spell-1.0/getopt1.c:111:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/spell-1.0/spell.c:174:13:  [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.
      opt = getopt_long (argc, argv, "IVbdhilnosvx", long_options,
data/spell-1.0/spell.c:306:19:  [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.
  path = xstrdup (getenv ("PATH"));
data/spell-1.0/getopt.c:184:31:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define	my_bcopy(src, dst, n)	memcpy ((dst), (src), (n))
data/spell-1.0/spell.c:603: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).
	  stream = fopen (file, "r");
data/spell-1.0/spell.c:736: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 (new, (void *) str, len);
data/spell-1.0/str.c:239: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 c[2];			/* Array for the `sprintf' output.  */
data/spell-1.0/str.c:251:7:  [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 (c, "%d", rem);
data/spell-1.0/getopt.c:458:26:  [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 (s - nextchar == strlen (p->name))
data/spell-1.0/getopt.c:482:16:  [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).
	  nextchar += strlen (nextchar);
data/spell-1.0/getopt.c:512: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).
		  nextchar += strlen (nextchar);
data/spell-1.0/getopt.c:525: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).
		  nextchar += strlen (nextchar);
data/spell-1.0/getopt.c:529:16:  [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).
	  nextchar += strlen (nextchar);
data/spell-1.0/spell.c:307: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).
  path_len = strlen (path);
data/spell-1.0/spell.c:462:45:  [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 (!memcmp (str->str, "Can't open ", strlen ("Can't open ")))
data/spell-1.0/spell.c:464:20:  [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).
	       str->str + strlen ("Can't open "));
data/spell-1.0/spell.c:733:16:  [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).
  size_t len = strlen (str) + 1;
data/spell-1.0/str.c:139:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      register char c = getc (stream);
data/spell-1.0/str.c:350:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      n_chars = read (desc, ptr, len);
data/spell-1.0/str.c:354:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  n_chars = read (desc, ptr, len);

ANALYSIS SUMMARY:

Hits = 36
Lines analyzed = 2186 in approximately 0.08 seconds (27624 lines/second)
Physical Source Lines of Code (SLOC) = 1318
Hits@level = [0]  43 [1]  12 [2]   5 [3]  14 [4]   5 [5]   0
Hits@level+ = [0+]  79 [1+]  36 [2+]  24 [3+]  19 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 59.9393 [1+] 27.3141 [2+] 18.2094 [3+] 14.4158 [4+] 3.79363 [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.