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/easychem-0.6/auxi.c
Examining data/easychem-0.6/drawing.c
Examining data/easychem-0.6/library.c
Examining data/easychem-0.6/auxi.h
Examining data/easychem-0.6/bonds.h
Examining data/easychem-0.6/detect.h
Examining data/easychem-0.6/dialogs.h
Examining data/easychem-0.6/drawing.h
Examining data/easychem-0.6/export.h
Examining data/easychem-0.6/library.h
Examining data/easychem-0.6/common.h
Examining data/easychem-0.6/bonds.c
Examining data/easychem-0.6/detect.c
Examining data/easychem-0.6/export.c
Examining data/easychem-0.6/dialogs.c
Examining data/easychem-0.6/easychem.c

FINAL RESULTS:

data/easychem-0.6/bonds.c:1527:7:  [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 (file, "%s %" LLFORMAT " %" LLFORMAT " %" LLFORMAT " %" LLFORMAT
data/easychem-0.6/bonds.c:1649:7:  [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. If the scanf format is influenceable by an
  attacker, it's exploitable.
      fscanf (file, "%" LLFORMAT " %" LLFORMAT " %" LLFORMAT " %" LLFORMAT
data/easychem-0.6/detect.c:60:2:  [4] (shell) execv:
  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.
	execv(prop.path_gs, argv);
data/easychem-0.6/detect.c:64:7:  [4] (shell) execv:
  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.
      execv (GS_PATH "/gs", argv);
data/easychem-0.6/detect.c:68:7:  [4] (shell) execvp:
  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.
      execvp ("gs", argv);
data/easychem-0.6/detect.c:71:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/gs", argv);
data/easychem-0.6/detect.c:74:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/gs", argv);
data/easychem-0.6/detect.c:77:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/gs", argv);
data/easychem-0.6/detect.c:139:2:  [4] (shell) execv:
  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.
	execv(prop.path_pstoedit, argv);
data/easychem-0.6/detect.c:142:7:  [4] (shell) execv:
  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.
      execv (PSTOEDIT_PATH "/gs", argv);
data/easychem-0.6/detect.c:145:7:  [4] (shell) execvp:
  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.
      execvp ("pstoedit", argv);
data/easychem-0.6/detect.c:147:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/pstoedit", argv);
data/easychem-0.6/detect.c:149:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/pstoedit", argv);
data/easychem-0.6/detect.c:151:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/pstoedit", argv);
data/easychem-0.6/export.c:1353:2:  [4] (shell) execv:
  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.
	execv (prop.path_gs, argv);
data/easychem-0.6/export.c:1355:7:  [4] (shell) execv:
  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.
      execv (GS_PATH "/gs", argv);
data/easychem-0.6/export.c:1357:7:  [4] (shell) execvp:
  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.
      execvp ("gs", argv);
data/easychem-0.6/export.c:1358:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/gs", argv);
data/easychem-0.6/export.c:1359:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/gs", argv);
data/easychem-0.6/export.c:1360:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/gs", argv);
data/easychem-0.6/export.c:2057:2:  [4] (shell) execv:
  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.
	execv (prop.path_gs, argv);
data/easychem-0.6/export.c:2059:7:  [4] (shell) execv:
  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.
      execv (GS_PATH "/gs", argv);
data/easychem-0.6/export.c:2061:7:  [4] (shell) execvp:
  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.
      execvp ("gs", argv);
data/easychem-0.6/export.c:2062:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/gs", argv);
data/easychem-0.6/export.c:2063:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/gs", argv);
data/easychem-0.6/export.c:2064:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/gs", argv);
data/easychem-0.6/export.c:2111:2:  [4] (shell) execv:
  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.
	execv (prop.path_gs, argv);
data/easychem-0.6/export.c:2113:7:  [4] (shell) execv:
  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.
      execv (GS_PATH "/gs", argv);
data/easychem-0.6/export.c:2115:7:  [4] (shell) execvp:
  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.
      execvp ("gs", argv);
data/easychem-0.6/export.c:2116:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/gs", argv);
data/easychem-0.6/export.c:2117:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/gs", argv);
data/easychem-0.6/export.c:2118:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/gs", argv);
data/easychem-0.6/export.c:2177:2:  [4] (shell) execv:
  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.
	execv (prop.path_pstoedit, argv);
data/easychem-0.6/export.c:2179:7:  [4] (shell) execv:
  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.
      execv (PSTOEDIT_PATH "/pstoedit", argv);
data/easychem-0.6/export.c:2181:7:  [4] (shell) execvp:
  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.
      execvp ("pstoedit", argv);
data/easychem-0.6/export.c:2182:7:  [4] (shell) execv:
  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.
      execv ("/usr/bin/pstoedit", argv);
data/easychem-0.6/export.c:2183:7:  [4] (shell) execv:
  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.
      execv ("/usr/local/bin/pstoedit", argv);
data/easychem-0.6/export.c:2184:7:  [4] (shell) execv:
  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.
      execv ("/sw/bin/pstoedit", argv);
data/easychem-0.6/auxi.c:172:20:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  f = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, ".easychemrc", NULL);
data/easychem-0.6/auxi.c:180:20:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  f = g_strconcat (g_get_tmp_dir (), G_DIR_SEPARATOR_S,
data/easychem-0.6/detect.c:41:23:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  temp = g_strconcat (g_get_tmp_dir (), "/gs_detect.XXXXXX", NULL);
data/easychem-0.6/easychem.c:2945: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.
  if (getenv ("DISPLAY") == NULL)
data/easychem-0.6/export.c:2031:26:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  epsfile = g_strconcat (g_get_tmp_dir (), "/easychem_eps.XXXXXX", NULL);
data/easychem-0.6/export.c:2040:26:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  epsfile = g_strconcat (g_get_tmp_dir (), "/easychem_eps.XXXXXX", NULL);
data/easychem-0.6/export.c:2092:26:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  epsfile = g_strconcat (g_get_tmp_dir (), "/easychem_eps.XXXXXX", NULL);
data/easychem-0.6/export.c:2103:27:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  epsfile2 = g_strconcat (g_get_tmp_dir (), "/easychem_eps2.XXXXXX", NULL);
data/easychem-0.6/export.c:2159:26:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  epsfile = g_strconcat (g_get_tmp_dir (), "/easychem_eps.XXXXXX", NULL);
data/easychem-0.6/auxi.c:173: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).
  file = fopen (f, write == FALSE ? "r" : "w");
data/easychem-0.6/auxi.c:182: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).
  file = fopen (f, write == FALSE ? "r" : "w");
data/easychem-0.6/auxi.c:222: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[LEN], *c;
data/easychem-0.6/bonds.c:1500:8:  [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 object_name[BOND_DELIMITER][5] = { "smpl", "dble", "trpl",
data/easychem-0.6/bonds.c:1590: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[LONG], name[5];
data/easychem-0.6/bonds.c:1611:6:  [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).
	i = atoi (name + 3);
data/easychem-0.6/bonds.c:2195: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).
  file = fopen (filename, "r");
data/easychem-0.6/bonds.c:2662:9:  [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.
  const char cmd[CMD_N][CMD_MAX_LEN] = { "emph{", "textbf{" };
data/easychem-0.6/bonds.c:2663:9:  [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.
  const char cmd_pango[CMD_N][CMD_MAX_LEN] = { "i", "b" };
data/easychem-0.6/bonds.c:2673:9:  [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.
  const char ent[ENT_N][ENT_MAX_LEN] = { "alpha", "beta", "gamma", "delta",
data/easychem-0.6/bonds.c:2681:9:  [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.
  const char ent_pango[ENT_N][ENT_MAX_LEN] = { "α", "β", "γ", "δ", "ε",
data/easychem-0.6/detect.c:37: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 *argv[6] = { "gs", "-q", "-sDEVICE=nullpage", "-dBATCH", "", NULL };
data/easychem-0.6/detect.c:42:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  fd = mkstemp (temp);
data/easychem-0.6/detect.c:125: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 *argv[2] = { "pstoedit", NULL };
data/easychem-0.6/detect.c:134:12:  [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).
      fd = open ("/dev/null", O_APPEND);
data/easychem-0.6/easychem.c:191: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).
  file = fopen (".save.ech", "w");
data/easychem-0.6/easychem.c:194:14:  [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).
      file = fopen ("/tmp/save.ech", "w");
data/easychem-0.6/easychem.c:497: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).
  file = fopen (name, "w");
data/easychem-0.6/easychem.c:557:14:  [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).
      file = fopen (filename, "w");
data/easychem-0.6/easychem.c:623:9:  [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.
  const char suffix[EXPORT_DELIMITER][5] = { ".eps", ".eps", ".eps", ".pdf",
data/easychem-0.6/easychem.c:2079:14:  [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).
      file = fopen (filename, "w");
data/easychem-0.6/easychem.c:2216: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).
  file = fopen (name, "r");
data/easychem-0.6/easychem.c:2257:1:  [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).
open (void)
data/easychem-0.6/easychem.c:2286:7:  [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).
      open ();
data/easychem-0.6/easychem.c:2291:7:  [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).
      open ();
data/easychem-0.6/easychem.c:2309:7:  [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).
      open ();
data/easychem-0.6/easychem.c:2574: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).
  file = fopen (name, "r");
data/easychem-0.6/easychem.c:3162:14:  [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).
      file = fopen (argv[1], "r");
data/easychem-0.6/export.c:49: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.
const char greek[N_GREEK][7] = { "alpha", "beta", "gamma", "delta",
data/easychem-0.6/export.c:70: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.
const char natural[N_NATURAL][4] = { "oe", "OE", "ae", "AE", "euro", "TM",
data/easychem-0.6/export.c:73: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.
const char natural_symbol[N_NATURAL][5] = { "\\200", "\\201", "æ",
data/easychem-0.6/export.c:237: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.
const char accent_latex_letter[N_ACCENT] = {
data/easychem-0.6/export.c:727:9:  [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.
  const char command[N][MAX_LENGTH] = { "emph{", "textbf{" };
data/easychem-0.6/export.c:728:9:  [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.
  const char command_eps[N][MAX_LENGTH] = { "it", "bold" };
data/easychem-0.6/export.c:1324: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 *argv[7] = { "gs", "-dNOPAUSE", "-q", "-sDEVICE=bbox", "", "-dBATCH",
data/easychem-0.6/export.c:1347:17:  [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).
      devnull = open ("/dev/null", O_WRONLY);
data/easychem-0.6/export.c:1401: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).
  file = fopen (filename, "w");
data/easychem-0.6/export.c:1989: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).
  file = fopen (filename, "w");
data/easychem-0.6/export.c:2026: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 *argv[9] = { "gs", "-dNOPAUSE", "-q", "-sDEVICE=pdfwrite", "-dBATCH",
data/easychem-0.6/export.c:2032:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  fd = mkstemp (epsfile);
data/easychem-0.6/export.c:2041:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  fd = mkstemp (epsfile);
data/easychem-0.6/export.c:2082: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[BUFLEN];
data/easychem-0.6/export.c:2087: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 *argv[11] = { "gs", "-dNOPAUSE", "-q", "-sDEVICE=epswrite", "-dBATCH",
data/easychem-0.6/export.c:2093:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  fd = mkstemp (epsfile);
data/easychem-0.6/export.c:2126: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).
  in = fopen (epsfile2, "r");
data/easychem-0.6/export.c:2127:9:  [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).
  out = fopen (filename, "w");
data/easychem-0.6/export.c:2156: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 *argv[6] = { "pstoedit", "-f", "xfig", "", "", NULL };
data/easychem-0.6/export.c:2160:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  fd = mkstemp (epsfile);
data/easychem-0.6/bonds.c:1606:10:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  while (fscanf (file, "%4s", name) == 1)
data/easychem-0.6/bonds.c:1684: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).
	  for (i = strlen (buf) - 11; i < (signed) strlen (buf); i++)
data/easychem-0.6/bonds.c:1684: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).
	  for (i = strlen (buf) - 11; i < (signed) strlen (buf); i++)
data/easychem-0.6/bonds.c:2613: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).
  bond->pango = richtext_to_pango (bond->text, 0, strlen (bond->text));
data/easychem-0.6/bonds.c:2620:54:  [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).
      bond->pango_left = richtext_to_pango (left, 0, strlen (left));
data/easychem-0.6/bonds.c:2621:56:  [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).
      bond->pango_right = richtext_to_pango (right, 0, strlen (right));
data/easychem-0.6/bonds.c:2930: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).
  const unsigned int max = strlen (bond->text);
data/easychem-0.6/bonds.c:3119:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	      (void) strncpy (str3, bond->text + j, i - j + 1);
data/easychem-0.6/dialogs.c:966: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).
    prop.path_gs = (strlen (s) == 0 ? NULL : g_strdup (s));
data/easychem-0.6/dialogs.c:968: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).
    prop.path_pstoedit = (strlen (s) == 0 ? NULL : g_strdup (s));
data/easychem-0.6/easychem.c:632: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 (base2);
data/easychem-0.6/easychem.c:1384: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).
	      if ((new_bond->text == NULL) || (strlen (new_bond->text) == 0))
data/easychem-0.6/export.c:441: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).
  for (pos = 0; pos < strlen (str); pos++)
data/easychem-0.6/export.c:1094:37:  [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 = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1101:37:  [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 = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1111:37:  [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 = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1124:37:  [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 = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1228: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).
	  str = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1237: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).
	  str = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1243: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).
	  str = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1252: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).
	  str = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1258: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).
	  str = richtext_to_eps (str2, 0, strlen (str2));
data/easychem-0.6/export.c:1927: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).
	  for (i = 0; i < (signed) strlen (current->text); i++)
data/easychem-0.6/export.c:1938: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).
	  for (i = 0; i < (signed) strlen (current->text); i++)
data/easychem-0.6/export.c:1949: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).
	  for (i = 0; i < (signed) strlen (current->text); i++)

ANALYSIS SUMMARY:

Hits = 120
Lines analyzed = 11003 in approximately 0.32 seconds (33994 lines/second)
Physical Source Lines of Code (SLOC) = 9020
Hits@level = [0] 175 [1]  25 [2]  48 [3]   9 [4]  38 [5]   0
Hits@level+ = [0+] 295 [1+] 120 [2+]  95 [3+]  47 [4+]  38 [5+]   0
Hits/KSLOC@level+ = [0+] 32.7051 [1+] 13.3038 [2+] 10.5322 [3+] 5.21064 [4+] 4.21286 [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.