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/ifile-1.3.9/lex-simple.c
Examining data/ifile-1.3.9/lex-indirect.c
Examining data/ifile-1.3.9/stoplist.c
Examining data/ifile-1.3.9/stopwords.c
Examining data/ifile-1.3.9/argp/argp-fmtstream.c
Examining data/ifile-1.3.9/argp/getopt.c
Examining data/ifile-1.3.9/argp/pin.c
Examining data/ifile-1.3.9/argp/getopt.h
Examining data/ifile-1.3.9/argp/argp-test.c
Examining data/ifile-1.3.9/argp/argp-fmtstream.h
Examining data/ifile-1.3.9/argp/argp1.h
Examining data/ifile-1.3.9/argp/argp-pv.c
Examining data/ifile-1.3.9/argp/argp-fs-xinl.c
Examining data/ifile-1.3.9/argp/argp-xinl.c
Examining data/ifile-1.3.9/argp/argp-ex3.c
Examining data/ifile-1.3.9/argp/getopt1.c
Examining data/ifile-1.3.9/argp/tester.c
Examining data/ifile-1.3.9/argp/argp-parse.c
Examining data/ifile-1.3.9/argp/argp.h
Examining data/ifile-1.3.9/argp/argp.c
Examining data/ifile-1.3.9/argp/argp-ba.c
Examining data/ifile-1.3.9/argp/argp-ex2.c
Examining data/ifile-1.3.9/argp/argp-ex4.c
Examining data/ifile-1.3.9/argp/argp-namefrob.h
Examining data/ifile-1.3.9/argp/strndup.c
Examining data/ifile-1.3.9/argp/argp-ex1.c
Examining data/ifile-1.3.9/argp/argp-help.c
Examining data/ifile-1.3.9/argp/argp-pvh.c
Examining data/ifile-1.3.9/opts.c
Examining data/ifile-1.3.9/util.c
Examining data/ifile-1.3.9/database.c
Examining data/ifile-1.3.9/scan.c
Examining data/ifile-1.3.9/stem.c
Examining data/ifile-1.3.9/include/extendable_array.h
Examining data/ifile-1.3.9/include/hash_table.h
Examining data/ifile-1.3.9/include/ifile.h
Examining data/ifile-1.3.9/hash_table.c
Examining data/ifile-1.3.9/lex-email.c
Examining data/ifile-1.3.9/istext.c
Examining data/ifile-1.3.9/int4str.c
Examining data/ifile-1.3.9/ifile.c
Examining data/ifile-1.3.9/lex-define.c
Examining data/ifile-1.3.9/error.c
Examining data/ifile-1.3.9/primes.c

FINAL RESULTS:

data/ifile-1.3.9/error.c:80:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      chmod(info_file, 0600);
data/ifile-1.3.9/argp/argp-ex4.c:140:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (j == 0 ? "%s" : ", %s", arguments.strings[j]);
data/ifile-1.3.9/argp/argp-fmtstream.c:386:13:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
      out = vsprintf (fs->p, fmt, args);
data/ifile-1.3.9/argp/argp-fmtstream.c:389:20:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	char *s = (char*) vsprintf (fs->p, fmt, args);
data/ifile-1.3.9/argp/argp-fmtstream.h:64:33:  [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.
#define __argp_fmtstream_printf fprintf
data/ifile-1.3.9/argp/argp-fmtstream.h:65:31:  [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.
#define argp_fmtstream_printf fprintf
data/ifile-1.3.9/argp/argp-fmtstream.h:130:34:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((__format__ (printf, 2, 3)));
data/ifile-1.3.9/argp/argp-fmtstream.h:137:34:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((__format__ (printf, 2, 3)));
data/ifile-1.3.9/argp/argp-help.c:1658:4:  [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 (stream, fmt, ap);
data/ifile-1.3.9/argp/argp-help.c:1699:8:  [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 (stream, fmt, ap);
data/ifile-1.3.9/argp/argp-namefrob.h:86:21:  [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.
#define __vsnprintf vsnprintf
data/ifile-1.3.9/error.c:58: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(executable_name, buf);
data/ifile-1.3.9/error.c:123:13:  [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.
      ret = vfprintf (stderr, format, ap);
data/ifile-1.3.9/error.c:132:25:  [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.
      if (INFO != NULL) vfprintf (INFO, format, ap);
data/ifile-1.3.9/error.c:152:13:  [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.
  if (INFO) vfprintf (INFO, format, ap);
data/ifile-1.3.9/error.c:157: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, format, ap);
data/ifile-1.3.9/ifile.c:117:7:  [4] (shell) system:
  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.
      system(ifile_sprintf("rm %s", data_file));
data/ifile-1.3.9/ifile.c:284:2:  [4] (shell) system:
  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.
	system(ifile_sprintf("chmod 0600 %s\n", data_file));
data/ifile-1.3.9/int4str.c:313: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 (fp, HEADER_STRING);
data/ifile-1.3.9/lex-email.c:171:4:  [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 (&lex->document[begin_unfinished], header);
data/ifile-1.3.9/lex-email.c:181: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 (&lex->document[begin_unfinished], body);
data/ifile-1.3.9/lex-email.c:243: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 (buf, tokens[0]);
data/ifile-1.3.9/lex-email.c:247: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 (buf, tokens[i]);
data/ifile-1.3.9/stem.c:218: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 (word, rule->new_end);
data/ifile-1.3.9/stoplist.c:62:10:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  while (fscanf (fp, "%s", word) == 1)
data/ifile-1.3.9/util.c:56:10:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  assert(vsprintf(buf, format, ap) < MAX_STR_LEN - 1);
data/ifile-1.3.9/util.c:61: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(rtn, buf);
data/ifile-1.3.9/util.c:90:5:  [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(new_string, va_arg(ap, char *));
data/ifile-1.3.9/util.c:157: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(tmp, buf);
data/ifile-1.3.9/util.c:341: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(s, s1);
data/ifile-1.3.9/argp/argp-help.c:145:21:  [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.
  const char *var = getenv ("ARGP_HELP_FMT");
data/ifile-1.3.9/argp/argp-parse.c:759:8:  [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 (parser->state.argc, parser->state.argv,
data/ifile-1.3.9/argp/argp-test.c:205:27:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  params.foonly_default = random ();
data/ifile-1.3.9/argp/getopt.c:214: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/ifile-1.3.9/argp/getopt.c:368:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/ifile-1.3.9/argp/getopt.c:397:25:  [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.
      nonoption_flags = getenv (var);
data/ifile-1.3.9/argp/getopt.c:920: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/ifile-1.3.9/argp/getopt.c:950: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/ifile-1.3.9/argp/getopt.h:106:12:  [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/ifile-1.3.9/argp/getopt.h:108:12:  [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/ifile-1.3.9/argp/getopt.h:110:12:  [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/ifile-1.3.9/argp/getopt.h:122:12:  [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/ifile-1.3.9/argp/getopt.h:123:12:  [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/ifile-1.3.9/argp/getopt1.c:69: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/ifile-1.3.9/argp/getopt1.c:125: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/ifile-1.3.9/error.c:73:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(NULL));
data/ifile-1.3.9/error.c:76:46:  [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.
  info_file = ifile_sprintf("%s/.ifile.log", getenv("HOME"));
data/ifile-1.3.9/ifile.c:102: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_dir = getenv("HOME");
data/ifile-1.3.9/argp/argp-ex3.c:75: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 *args[2];		/* ARG1 & ARG2 */
data/ifile-1.3.9/argp/argp-ex4.c:81:39:  [2] (integer) atoi:
  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).
      arguments->repeat_count = arg ? atoi (arg) : 10;
data/ifile-1.3.9/argp/argp-fmtstream.c:39:6:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
void bcopy();
data/ifile-1.3.9/argp/argp-fmtstream.c:40:29:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memmove(dest,src,n) bcopy(src,dest,n)
data/ifile-1.3.9/argp/argp-fmtstream.h:214:7:  [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 (__fs->p, __str, __len);
data/ifile-1.3.9/argp/argp-help.c:187:9:  [2] (integer) atoi:
  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).
		val = atoi (arg);
data/ifile-1.3.9/argp/argp-help.c:812:2:  [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 (entries, hol->entries,
data/ifile-1.3.9/argp/argp-help.c:814:2:  [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 (entries + hol->num_entries, more->entries,
data/ifile-1.3.9/argp/argp-help.c:817:2:  [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 (short_options, hol->short_options, hol_so_len);
data/ifile-1.3.9/argp/argp-parse.c:139:20:  [2] (integer) atoi:
  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).
      _argp_hang = atoi (arg ? arg : "3600");
data/ifile-1.3.9/argp/argp-test.c:127: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[10];
data/ifile-1.3.9/argp/argp-test.c:129:5:  [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 (buf, "%c", key);
data/ifile-1.3.9/argp/argp-test.c:131:5:  [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 (buf, "%d", key);
data/ifile-1.3.9/argp/argp-test.c:157:19:  [2] (integer) atoi:
  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).
	params->foonly = atoi (arg);
data/ifile-1.3.9/argp/argp1.h:12:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(s, d, n) memcpy ((d), (s), (n))
data/ifile-1.3.9/argp/argp1.h:12:24:  [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 bcopy(s, d, n) memcpy ((d), (s), (n))
data/ifile-1.3.9/argp/getopt.c:395: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 var[100];
data/ifile-1.3.9/argp/getopt.c:396: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 (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
data/ifile-1.3.9/argp/strndup.c:29: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.
  return memcpy (new, s, len);
data/ifile-1.3.9/database.c:161:13:  [2] (integer) atoi:
  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).
      num = atoi(token);
data/ifile-1.3.9/database.c:176:13:  [2] (integer) atoi:
  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).
      num = atoi(token);
data/ifile-1.3.9/database.c:253:19:  [2] (integer) atoi:
  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).
    wentry->age = atoi(token);
data/ifile-1.3.9/database.c:261:16:  [2] (integer) atoi:
  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).
      folder = atoi(token);
data/ifile-1.3.9/database.c:265:11:  [2] (integer) atoi:
  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).
	  freq = atoi(token);
data/ifile-1.3.9/database.c:293: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).
  DATA = open(data_file, O_RDONLY, 0);
data/ifile-1.3.9/database.c:453: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 host[128];
data/ifile-1.3.9/database.c:463:5:  [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(host, "unknown");
data/ifile-1.3.9/database.c:472:10:  [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).
  DATA = fopen (temp_data_file, "w");
data/ifile-1.3.9/error.c:42: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[MAX_STR_LEN];
data/ifile-1.3.9/error.c:78: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).
  if ((INFO = fopen(info_file, "w")))
data/ifile-1.3.9/ifile.c:155: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).
	MSG = fopen(file_name, "r");
data/ifile-1.3.9/include/ifile.h:64:26:  [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).
#define ifile_fopen(x,y) fopen(x,y)
data/ifile-1.3.9/int4str.c:268: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 word[IFILE_MAX_WORD_LENGTH];
data/ifile-1.3.9/int4str.c:330: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[IFILE_MAX_WORD_LENGTH];
data/ifile-1.3.9/int4str.c:369: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 (filename, "r");
data/ifile-1.3.9/istext.c:42: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[NUM_TEST_CHARS];
data/ifile-1.3.9/lex-define.c:32: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 *ifile_email_headers_to_keep[4] = { "subject", "from", "to", NULL };
data/ifile-1.3.9/opts.c:131:28:  [2] (integer) atoi:
  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).
      args->thresh = arg ? atoi(arg) : 0;
data/ifile-1.3.9/opts.c:193:31:  [2] (integer) atoi:
  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).
      args->verbosity = arg ? atoi(arg) : ifile_quiet;
data/ifile-1.3.9/opts.c:236:21:  [2] (integer) atoi:
  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).
	args->max_length = atoi(arg);
data/ifile-1.3.9/stoplist.c:53: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 word[IFILE_MAX_WORD_LENGTH];
data/ifile-1.3.9/stoplist.c:56: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).
  if ((fp = fopen (filename, "r")) == NULL)
data/ifile-1.3.9/util.c:51: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[MAX_STR_LEN] = ""; /* holds string to be returned by function */
data/ifile-1.3.9/util.c:106: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[MAX_STR_LEN];
data/ifile-1.3.9/util.c:220: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 token[MAX_STR_LEN];
data/ifile-1.3.9/argp/argp-fmtstream.c:390: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).
	out = strlen (s);
data/ifile-1.3.9/argp/argp-fmtstream.h:225:18:  [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);
data/ifile-1.3.9/argp/argp-help.c:194: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 (un->name) == var_len
data/ifile-1.3.9/argp/argp-help.c:808: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).
	unsigned hol_so_len = strlen (hol->short_options);
data/ifile-1.3.9/argp/argp-help.c:810:25:  [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).
	  malloc (hol_so_len + strlen (more->short_options) + 1);
data/ifile-1.3.9/argp/argp-help.c:1216: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).
	  space (stream, 6 + strlen (arg));
data/ifile-1.3.9/argp/argp-help.c:1259:41:  [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 *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
data/ifile-1.3.9/argp/argp-help.c:1356:13:  [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).
	nl = doc + strlen (doc);
data/ifile-1.3.9/argp/getopt.c:238: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).
extern int strlen (const char *);
data/ifile-1.3.9/argp/getopt.c:401: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).
	nonoption_flags_len = strlen (nonoption_flags);
data/ifile-1.3.9/argp/getopt.c:609: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).
		== (unsigned int) strlen (p->name))
data/ifile-1.3.9/argp/getopt.c:633: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/ifile-1.3.9/argp/getopt.c:663: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/ifile-1.3.9/argp/getopt.c:679: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/ifile-1.3.9/argp/getopt.c:684: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/ifile-1.3.9/argp/getopt.c:795:51:  [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 ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/ifile-1.3.9/argp/getopt.c:818:18:  [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/ifile-1.3.9/argp/getopt.c:838: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).
		    nextchar += strlen (nextchar);
data/ifile-1.3.9/argp/getopt.c:852: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).
		    nextchar += strlen (nextchar);
data/ifile-1.3.9/argp/getopt.c:856:18:  [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/ifile-1.3.9/database.c:323:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((rc = read(DATA, buf + nread, bufsize - nread)) == -1)
data/ifile-1.3.9/error.c:57: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).
  executable_name = malloc(strlen(buf)+1);
data/ifile-1.3.9/int4str.c:337:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (*magic != fgetc (fp))
data/ifile-1.3.9/int4str.c:353:13:  [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).
      len = strlen (buf);
data/ifile-1.3.9/lex-email.c:135:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ret, &lex->document[start_header], ret_size);
data/ifile-1.3.9/lex-email.c:172: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).
	  begin_unfinished += strlen (header);
data/ifile-1.3.9/lex-email.c:179:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (body, &lex->document[lex->document_position], body_size);
data/ifile-1.3.9/lex-email.c:239: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).
    len += strlen (tokens[i]) + 1;
data/ifile-1.3.9/lex-email.c:246:7:  [1] (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 character.
      strcat (buf, ";");
data/ifile-1.3.9/lex-email.c:259: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).
  return strlen (buf);
data/ifile-1.3.9/lex-simple.c:70:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       (((byte = fgetc (fp)) != EOF)
data/ifile-1.3.9/lex-simple.c:116: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).
			     ? strlen (self->document_end_pattern)
data/ifile-1.3.9/lex-simple.c:198: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).
  int wordlen = strlen (buf);
data/ifile-1.3.9/lex-simple.c:264: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).
  return strlen (buf);
data/ifile-1.3.9/scan.c:42:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (fgetc (fp) != EOF)
data/ifile-1.3.9/scan.c:57:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  byte = fgetc (fp);
data/ifile-1.3.9/scan.c:69:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      byte = fgetc (fp);
data/ifile-1.3.9/scan.c:103:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      byte = fgetc (fp);
data/ifile-1.3.9/scan.c:137:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      byte = fgetc (fp);
data/ifile-1.3.9/scan.c:181:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      byte = fgetc (fp);
data/ifile-1.3.9/scan.c:205:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      byte = fgetc (fp);
data/ifile-1.3.9/scan.c:226: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).
  count =- strlen (stopstr);
data/ifile-1.3.9/stem.c:147: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).
  if ((length = strlen(word)) <= 2)
data/ifile-1.3.9/util.c:59: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).
  rtn = malloc(strlen(buf)+1);
data/ifile-1.3.9/util.c:81: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).
    string_size += strlen(va_arg(ap, char *));
data/ifile-1.3.9/util.c:113: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).
      tmp = malloc(strlen("0") + 1);
data/ifile-1.3.9/util.c:115:7:  [1] (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 character.
      strcpy(tmp, "0"); 
data/ifile-1.3.9/util.c:155: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).
  tmp = malloc(strlen(buf) + 1);
data/ifile-1.3.9/util.c:338:29:  [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 *s = (char *) malloc(strlen(s1)+1);

ANALYSIS SUMMARY:

Hits = 142
Lines analyzed = 11638 in approximately 0.35 seconds (33405 lines/second)
Physical Source Lines of Code (SLOC) = 7406
Hits@level = [0]  69 [1]  49 [2]  45 [3]  18 [4]  29 [5]   1
Hits@level+ = [0+] 211 [1+] 142 [2+]  93 [3+]  48 [4+]  30 [5+]   1
Hits/KSLOC@level+ = [0+] 28.4904 [1+] 19.1736 [2+] 12.5574 [3+] 6.48123 [4+] 4.05077 [5+] 0.135026
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.