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/geg-2.0.9/acconfig.h
Examining data/geg-2.0.9/src/about.h
Examining data/geg-2.0.9/src/parser.h
Examining data/geg-2.0.9/src/localfunctions.c
Examining data/geg-2.0.9/src/formulas.c
Examining data/geg-2.0.9/src/misc.h
Examining data/geg-2.0.9/src/colorsel.c
Examining data/geg-2.0.9/src/tokeniser.c
Examining data/geg-2.0.9/src/i18n.h
Examining data/geg-2.0.9/src/parser.c
Examining data/geg-2.0.9/src/main.c
Examining data/geg-2.0.9/src/colors.c
Examining data/geg-2.0.9/src/tokeniser.h
Examining data/geg-2.0.9/src/misc.c
Examining data/geg-2.0.9/src/localfunctions.h
Examining data/geg-2.0.9/src/prefs.h
Examining data/geg-2.0.9/src/help.h
Examining data/geg-2.0.9/src/about.c
Examining data/geg-2.0.9/src/prefs.c
Examining data/geg-2.0.9/src/formulas.h
Examining data/geg-2.0.9/src/log.h
Examining data/geg-2.0.9/src/app.h
Examining data/geg-2.0.9/src/help.c
Examining data/geg-2.0.9/src/colorsel.h
Examining data/geg-2.0.9/src/colors.h
Examining data/geg-2.0.9/src/app.c
Examining data/geg-2.0.9/src/log.c

FINAL RESULTS:

data/geg-2.0.9/src/app.c:262:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "%s %s", _("Reading"), data_file);
data/geg-2.0.9/src/app.c:365:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(geg_file, "%s.geg", template);    
data/geg-2.0.9/src/app.c:366:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(eps_file, "%s.eps", template);
data/geg-2.0.9/src/app.c:367:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(pdf_file, "%s.pdf", template);
data/geg-2.0.9/src/app.c:368:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(svg_file, "%s.svg", template);
data/geg-2.0.9/src/app.c:1068:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "%s *.%s ...", _("Save as"), mode);
data/geg-2.0.9/src/app.c:1118:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(template, "%s %s", _("Loading"), file_selected);
data/geg-2.0.9/src/app.c:1149:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(template, "%s %s", file_selected, _("saved"));  
data/geg-2.0.9/src/app.c:1200:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "mv %s \"%s\"", name, file_selected);
data/geg-2.0.9/src/app.c:1201:9:  [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.
    if (system(template));
data/geg-2.0.9/src/app.c:1369:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(template, _("Showing x as %s"),
data/geg-2.0.9/src/app.c:1381:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(template, "%s %s", _("Drawing grid:"), (prefs.do_grid)? _("yes"):_("no"));
data/geg-2.0.9/src/app.c:1400:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(template, "%s   %s%s", head, xyzoom, picoord);
data/geg-2.0.9/src/app.c:1808:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(template, "/usr/bin/%s %s", prog, _("not found"));
data/geg-2.0.9/src/app.c:1812:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(template, "/usr/bin/%s", prog);
data/geg-2.0.9/src/app.c:1814:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(template, "%s %s", prog, _("not found"));
data/geg-2.0.9/src/app.c:1911:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "cd /tmp ; %s %s ; rm -f %s",
data/geg-2.0.9/src/app.c:1913:9:  [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.
    if (system(template));
data/geg-2.0.9/src/app.c:1919:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "cd /tmp ; %s %s %s ; rm -f %s",
data/geg-2.0.9/src/app.c:1921:9:  [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.
    if (system(template));
data/geg-2.0.9/src/app.c:2009:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "%s: %s", "Geg", _("Edit formulas"));  
data/geg-2.0.9/src/app.c:2013:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "%s: %s", "Geg", _("Edit *.geg file"));      
data/geg-2.0.9/src/app.c:2017:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(template, "%s: %s", "Geg", _("Edit *.eps file"));      
data/geg-2.0.9/src/app.c:2085:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(template, "%s\n", formulas[i]);
data/geg-2.0.9/src/app.c:2121:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  if (*template) sprintf(template, "%s %s", prefs.editor, eps_file);
data/geg-2.0.9/src/app.c:2122:21:  [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.
  if (!*template || system(template) == 0x7f00) {
data/geg-2.0.9/src/app.c:2161:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(template, "( cd /tmp ; %s %s ) &",
data/geg-2.0.9/src/app.c:2163:11:  [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.
      if (system(template));
data/geg-2.0.9/src/app.c:2166:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(template, "( cd /tmp ; %s %s ) &",
data/geg-2.0.9/src/app.c:2168:11:  [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.
      if (system(template));
data/geg-2.0.9/src/app.c:2171:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(template, "( cd /tmp ; %s %s ) &",
data/geg-2.0.9/src/app.c:2173:11:  [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.
      if (system(template));
data/geg-2.0.9/src/help.c:42:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(filename, "/usr/share/geg/help/help.%s", g_getenv("LANG"));
data/geg-2.0.9/src/help.c:51:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message, "%s %s", filename, _("not found"));    
data/geg-2.0.9/src/help.c:100:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(line, "%s: %s", "Geg", _("Help"));
data/geg-2.0.9/src/misc.c:25:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(buf, buf2, f);
data/geg-2.0.9/src/prefs.c:233:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%s[%d mod %d]", _("curve"), 
data/geg-2.0.9/src/app.c:223:20:  [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.
  strncpy(rc_file, getenv("HOME"), 248);
data/geg-2.0.9/src/app.c:224:3:  [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(rc_file, "/.gegrc");
data/geg-2.0.9/src/app.c:360: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(template, "/tmp/gegXXXXXX");
data/geg-2.0.9/src/app.c:361:10:  [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).
  if ((i=mkstemp(template))) {
data/geg-2.0.9/src/app.c:945:29:  [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.
    if (prefs.zoom_xy == 1) strcpy(buf, _("Zoom along Ox"));
data/geg-2.0.9/src/app.c:946:29:  [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.
    if (prefs.zoom_xy == 2) strcpy(buf, _("Zoom along Oy"));
data/geg-2.0.9/src/app.c:947:29:  [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.
    if (prefs.zoom_xy == 3) strcpy(buf, _("Zoom along Ox and Oy"));
data/geg-2.0.9/src/app.c:948:29:  [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.
    if (prefs.zoom_xy == 4) strcpy(buf, _("Zoom orthonormal"));
data/geg-2.0.9/src/app.c:1060: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(template, _("Open *.geg file ..."));
data/geg-2.0.9/src/app.c:1449: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(buf, "f(x)");    
data/geg-2.0.9/src/app.c:1456: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, "%g", ranges.amin);
data/geg-2.0.9/src/app.c:1458: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, "%g", ranges.amax);
data/geg-2.0.9/src/app.c:1460: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(buf, "r(t)");    
data/geg-2.0.9/src/app.c:1467: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, "%g", ranges.tmin);
data/geg-2.0.9/src/app.c:1469: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, "%g", ranges.tmax);
data/geg-2.0.9/src/app.c:1471: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(buf, "x= ;y=");    
data/geg-2.0.9/src/app.c:1480: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(buf, "u(n)");    
data/geg-2.0.9/src/app.c:1851: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).
  fd = fopen(eps_file, "w");
data/geg-2.0.9/src/app.c:1957: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).
    fp = fopen(eps_file, "w");
data/geg-2.0.9/src/app.c:1965: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).
    fp = fopen(geg_file, "w");
data/geg-2.0.9/src/app.c:2101: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(geg_file, "r");
data/geg-2.0.9/src/app.c:2124: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).
    fp = fopen(eps_file, "r");
data/geg-2.0.9/src/app.c:2916: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(template, "= %.15g", y1);
data/geg-2.0.9/src/app.c:2958: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(template, "= %.16g", x);
data/geg-2.0.9/src/app.c:2982:13:  [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(template, "%c=%.15g", 'a'+i, y1);
data/geg-2.0.9/src/app.c:2990:9:  [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(template, "%.15g", y1);
data/geg-2.0.9/src/colorsel.c:138: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(&prefs.rgb_value[3*prefs.cur_color], values, 3 * sizeof(gdouble));
data/geg-2.0.9/src/help.c:45: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/geg-2.0.9/src/help.c:47: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(filename, "/usr/share/geg/help/help.en");
data/geg-2.0.9/src/help.c:48: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).
    fp = fopen(filename, "r");
data/geg-2.0.9/src/misc.c:16: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 buf[100];
data/geg-2.0.9/src/misc.c:23: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 buf2[100];
data/geg-2.0.9/src/misc.c:24:3:  [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(buf2, "%%0.%df", MAX(5 - MAX((gint)log10(fabs(f)), 0), 0));
data/geg-2.0.9/src/misc.c:35:3:  [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, "%li", l);
data/geg-2.0.9/src/prefs.c:169: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(&prefs, &default_prefs, sizeof(struct_prefs));
data/geg-2.0.9/src/prefs.c:212: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[32];
data/geg-2.0.9/src/prefs.c:224:15:  [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.
      case 0: strcpy(buf, _("background")); break;
data/geg-2.0.9/src/prefs.c:225:15:  [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.
      case 1: strcpy(buf, _("numbers")); break;
data/geg-2.0.9/src/prefs.c:226:15:  [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.
      case 2: strcpy(buf, _("axes")); break;
data/geg-2.0.9/src/prefs.c:227:15:  [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.
      case 3: strcpy(buf, _("grid")); break;	
data/geg-2.0.9/src/prefs.c:228:15:  [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.
      case 4: strcpy(buf, _("selection")); break;
data/geg-2.0.9/src/prefs.c:229:15:  [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.
      case 5: strcpy(buf, _("gray")); break;
data/geg-2.0.9/src/prefs.c:230:15:  [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.
      case 6: strcpy(buf, _("default")); break;
data/geg-2.0.9/src/prefs.c:247:9:  [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).
    i = atol(gtk_entry_get_text(GTK_ENTRY(maxcolors_en)));
data/geg-2.0.9/src/prefs.c:249:11:  [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).
      j = atol(gtk_entry_get_text(GTK_ENTRY(current_color_en)));
data/geg-2.0.9/src/prefs.c:268:9:  [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).
    i = atol(gtk_entry_get_text(GTK_ENTRY(current_color_en)));
data/geg-2.0.9/src/prefs.c:836:25:  [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).
  prefs.space   = CLAMP(atol(gtk_entry_get_text(GTK_ENTRY(space_en))), 10, 500);
data/geg-2.0.9/src/prefs.c:840:25:  [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).
  prefs.interp  = CLAMP(atol(gtk_entry_get_text(GTK_ENTRY(interp_en))), 0, 12);
data/geg-2.0.9/src/prefs.c:841:25:  [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).
  prefs.maxform = CLAMP(atol(gtk_entry_get_text(GTK_ENTRY(maxform_en))), 1, 500);
data/geg-2.0.9/src/prefs.c:856:29:  [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).
  prefs.ranges.width  = MAX(atol(gtk_entry_get_text(GTK_ENTRY(width_en))),
data/geg-2.0.9/src/prefs.c:858:29:  [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).
  prefs.ranges.height = MAX(atol(gtk_entry_get_text(GTK_ENTRY(height_en))),
data/geg-2.0.9/src/prefs.c:901:26:  [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).
  prefs.text_position  = atoi(gtk_entry_get_text(GTK_ENTRY(formula_en))) & 3;
data/geg-2.0.9/src/prefs.c:921:7:  [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).
  j = atoi(buf);
data/geg-2.0.9/src/prefs.c:984: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[256], *i;
data/geg-2.0.9/src/prefs.c:986: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/geg-2.0.9/src/prefs.c:1081:30:  [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).
        prefs.ranges.width = atol(i);
data/geg-2.0.9/src/prefs.c:1085:31:  [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).
        prefs.ranges.height = atol(i);
data/geg-2.0.9/src/prefs.c:1133:23:  [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).
        prefs.do_Ox = atoi(i);
data/geg-2.0.9/src/prefs.c:1137:23:  [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).
        prefs.do_Oy = atoi(i);
data/geg-2.0.9/src/prefs.c:1141:25:  [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).
        prefs.do_xval = atoi(i);
data/geg-2.0.9/src/prefs.c:1145:25:  [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).
        prefs.do_yval = atoi(i);
data/geg-2.0.9/src/prefs.c:1149:26:  [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).
        prefs.do_color = atoi(i);
data/geg-2.0.9/src/prefs.c:1153:24:  [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).
        prefs.do_box = atoi(i);
data/geg-2.0.9/src/prefs.c:1157: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).
        prefs.text_position = atoi(i);
data/geg-2.0.9/src/prefs.c:1161:25:  [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).
        prefs.zoom_xy = atoi(i);
data/geg-2.0.9/src/prefs.c:1180:23:  [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).
        prefs.space = atol(i);
data/geg-2.0.9/src/prefs.c:1192:24:  [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).
        prefs.interp = atol(i);
data/geg-2.0.9/src/prefs.c:1196:25:  [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).
        prefs.maxform = atol(i);
data/geg-2.0.9/src/prefs.c:1240: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, "w+");
data/geg-2.0.9/src/app.c:223:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(rc_file, getenv("HOME"), 248);
data/geg-2.0.9/src/app.c:2087:7:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
      sprintf(template, "\n");      
data/geg-2.0.9/src/app.c:2088: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).
    gtk_text_buffer_insert(te_buf, &te_iter, template, strlen(template));
data/geg-2.0.9/src/app.c:2104:58:  [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).
      gtk_text_buffer_insert(te_buf, &te_iter, template, strlen(template));
data/geg-2.0.9/src/app.c:2127:60:  [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).
        gtk_text_buffer_insert(te_buf, &te_iter, template, strlen(template));
data/geg-2.0.9/src/app.c:3038: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).
		  formula, strlen(formula));
data/geg-2.0.9/src/app.c:3043: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).
		  formula, strlen(formula));
data/geg-2.0.9/src/app.c:3048: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).
		  formula, strlen(formula));
data/geg-2.0.9/src/app.c:3053: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).
		  formula, strlen(formula));
data/geg-2.0.9/src/app.c:3063: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).
    for (j=0; j<strlen(formula); j++) {
data/geg-2.0.9/src/help.c:140: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).
      gtk_text_buffer_insert(te_buf, &te_iter, line, strlen(line));
data/geg-2.0.9/src/help.c:144:52:  [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).
    gtk_text_buffer_insert(te_buf, &te_iter, line, strlen(line));
data/geg-2.0.9/src/log.c:43:61:  [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).
  gtk_text_buffer_insert(log_te_buf, &log_te_iter, message, strlen(message));
data/geg-2.0.9/src/log.c:55:61:  [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).
  gtk_text_buffer_insert(log_te_buf, &log_te_iter, message, strlen(message));
data/geg-2.0.9/src/tokeniser.c:179: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).
    return(!strncasecmp(a->string, b, strlen(a->string)));
data/geg-2.0.9/src/tokeniser.c:203: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).
      equation += strlen(tokens[i].string);

ANALYSIS SUMMARY:

Hits = 122
Lines analyzed = 7143 in approximately 0.22 seconds (31792 lines/second)
Physical Source Lines of Code (SLOC) = 5715
Hits@level = [0] 126 [1]  16 [2]  68 [3]   1 [4]  37 [5]   0
Hits@level+ = [0+] 248 [1+] 122 [2+] 106 [3+]  38 [4+]  37 [5+]   0
Hits/KSLOC@level+ = [0+] 43.3946 [1+] 21.3473 [2+] 18.5477 [3+] 6.64917 [4+] 6.47419 [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.