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/gtypist-2.9.5/src/cursmenu.h
Examining data/gtypist-2.9.5/src/error.c
Examining data/gtypist-2.9.5/src/getopt.h
Examining data/gtypist-2.9.5/src/gtypist.h
Examining data/gtypist-2.9.5/src/gettext.h
Examining data/gtypist-2.9.5/src/utf8.h
Examining data/gtypist-2.9.5/src/getopt1.c
Examining data/gtypist-2.9.5/src/script.h
Examining data/gtypist-2.9.5/src/cursmenu.c
Examining data/gtypist-2.9.5/src/script.c
Examining data/gtypist-2.9.5/src/getopt.c
Examining data/gtypist-2.9.5/src/gtypist.c
Examining data/gtypist-2.9.5/src/error.h
Examining data/gtypist-2.9.5/src/utf8.c

FINAL RESULTS:

data/gtypist-2.9.5/src/gtypist.c:464:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf( message, SPEED_RAW_CPM, cpm );
data/gtypist-2.9.5/src/gtypist.c:466:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf( message, SPEED_RAW_WPM, cpm / (double)5.0 );
data/gtypist-2.9.5/src/gtypist.c:470:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf( message, SPEED_ADJ_CPM, adjusted_cpm );
data/gtypist-2.9.5/src/gtypist.c:472:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf( message, SPEED_ADJ_WPM, adjusted_cpm / (double)5.0 );
data/gtypist-2.9.5/src/gtypist.c:475:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf( message, SPEED_PCT_ERROR,
data/gtypist-2.9.5/src/gtypist.c:482:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf( message, SPEED_BEST_CPM, best_cpm );
data/gtypist-2.9.5/src/gtypist.c:484:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf( message, SPEED_BEST_WPM, best_cpm / (double)5.0 );
data/gtypist-2.9.5/src/gtypist.c:506:8:  [4] (buffer) sscanf:
  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 ( sscanf( SCR_DATA( line ), "%d:%s", &fkey, label ) != 2 )
data/gtypist-2.9.5/src/gtypist.c:844:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
              sprintf( message, ERROR_TOO_HIGH_MSG, global_error_max );
data/gtypist-2.9.5/src/gtypist.c:856:19:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                  sprintf(message,SKIPBACK_VIA_F_MSG,
data/gtypist-2.9.5/src/gtypist.c:1120:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
              sprintf( message, ERROR_TOO_HIGH_MSG, global_error_max );
data/gtypist-2.9.5/src/gtypist.c:1132:19:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                  sprintf(message,SKIPBACK_VIA_F_MSG,
data/gtypist-2.9.5/src/gtypist.c:1417: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( copy_of_line, line );
data/gtypist-2.9.5/src/gtypist.c:1509: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( copy_of_line, line );
data/gtypist-2.9.5/src/gtypist.c:1545:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf( message, _("label '%s' not found"), SCR_DATA(line) );
data/gtypist-2.9.5/src/gtypist.c:1664: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 ( help_string, help );
data/gtypist-2.9.5/src/gtypist.c:1883:11:  [4] (buffer) sscanf:
  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 (sscanf (optarg, "%s", str_option) != 1)
data/gtypist-2.9.5/src/gtypist.c:1914: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( cl_start_label, optarg );
data/gtypist-2.9.5/src/gtypist.c:2132:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy( script_file, argv[optind] );
data/gtypist-2.9.5/src/gtypist.c:2141:8:  [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( filepath, p );
data/gtypist-2.9.5/src/gtypist.c:2143:8:  [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( filepath, script_file );
data/gtypist-2.9.5/src/gtypist.c:2153:11:  [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( filepath, DATADIR );
data/gtypist-2.9.5/src/gtypist.c:2155:11:  [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( filepath, script_file );
data/gtypist-2.9.5/src/gtypist.c:2162:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf( script_file, "%s/%s", DATADIR, DEFAULT_SCRIPT );
data/gtypist-2.9.5/src/gtypist.c:2280:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf( filename, "%s/%s", getenv( global_home_env ), BESTLOG_FILENAME );
data/gtypist-2.9.5/src/gtypist.c:2313:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf( search, " %s:%s ", fixed_script_filename, excersise_label );
data/gtypist-2.9.5/src/gtypist.c:2355:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf( filename, "%s/%s", getenv( global_home_env ), BESTLOG_FILENAME );
data/gtypist-2.9.5/src/script.c:169: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( new_label->label, SCR_DATA( line ));
data/gtypist-2.9.5/src/script.c:261: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( data, SCR_DATA( line ) );
data/gtypist-2.9.5/src/script.c:262: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( data, STRING_NL );
data/gtypist-2.9.5/src/script.c:307:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf( err, _("label '%s' not found"), label );
data/gtypist-2.9.5/src/utf8.c:92:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buffer, "iconv() failed on '%s': %s\n"
data/gtypist-2.9.5/src/getopt.c:211:9:  [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.
#ifndef getenv
data/gtypist-2.9.5/src/getopt.c:212: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.
extern char *getenv ();
data/gtypist-2.9.5/src/getopt.c:404: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/gtypist-2.9.5/src/getopt.c:967: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/gtypist-2.9.5/src/getopt.c:997: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/gtypist-2.9.5/src/getopt.h:104: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/gtypist-2.9.5/src/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 ();
data/gtypist-2.9.5/src/getopt.h:108: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/gtypist-2.9.5/src/getopt.h:120: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/gtypist-2.9.5/src/getopt.h:121: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/gtypist-2.9.5/src/getopt1.c:67: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/gtypist-2.9.5/src/getopt1.c:123: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/gtypist-2.9.5/src/gtypist.c:1815:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ( (c=getopt_long( argc, argv, "be:ntf:c:sql:wkihvS",
data/gtypist-2.9.5/src/gtypist.c:2136:22:  [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( !script && getenv( "GTYPIST_PATH" ) )
data/gtypist-2.9.5/src/gtypist.c:2138:28:  [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.
          for( p = strtok( getenv( "GTYPIST_PATH" ), ":" );
data/gtypist-2.9.5/src/gtypist.c:2183:8:  [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( global_home_env ) || !strlen( getenv( global_home_env ) ) )
data/gtypist-2.9.5/src/gtypist.c:2183: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.
  if( !getenv( global_home_env ) || !strlen( getenv( global_home_env ) ) )
data/gtypist-2.9.5/src/gtypist.c:2273:38:  [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.
  filename = (char *)malloc( strlen( getenv( global_home_env ) ) +
data/gtypist-2.9.5/src/gtypist.c:2280:31:  [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.
  sprintf( filename, "%s/%s", getenv( global_home_env ), BESTLOG_FILENAME );
data/gtypist-2.9.5/src/gtypist.c:2348:38:  [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.
  filename = (char *)malloc( strlen( getenv( global_home_env ) ) +
data/gtypist-2.9.5/src/gtypist.c:2355:31:  [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.
  sprintf( filename, "%s/%s", getenv( global_home_env ), BESTLOG_FILENAME );
data/gtypist-2.9.5/src/gettext.h:217: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/gtypist-2.9.5/src/gettext.h:219: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[1024];
data/gtypist-2.9.5/src/gettext.h:227: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/gtypist-2.9.5/src/gettext.h:229: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/gtypist-2.9.5/src/gettext.h:263: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/gtypist-2.9.5/src/gettext.h:265: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[1024];
data/gtypist-2.9.5/src/gettext.h:273: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/gtypist-2.9.5/src/gettext.h:275: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/gtypist-2.9.5/src/gtypist.c:185: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	*fkey_bindings[ NFKEYS ] =
data/gtypist-2.9.5/src/gtypist.c:190: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	pfkeys[ NFKEYS ] =
data/gtypist-2.9.5/src/gtypist.c:419: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		message[MAX_WIN_LINE];		/* buffer */
data/gtypist-2.9.5/src/gtypist.c:602: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[BUFSIZ];
data/gtypist-2.9.5/src/gtypist.c:609: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, "%.1f", err_max);
data/gtypist-2.9.5/src/gtypist.c:611: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, "%.1f", err);
data/gtypist-2.9.5/src/gtypist.c:629: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	message[MAX_WIN_LINE];	 /* message buffer */
data/gtypist-2.9.5/src/gtypist.c:913: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	message[MAX_WIN_LINE];	 /* message buffer */
data/gtypist-2.9.5/src/gtypist.c:1410: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 copy_of_line[MAX_SCR_LINE];
data/gtypist-2.9.5/src/gtypist.c:1502: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 copy_of_line[MAX_SCR_LINE];
data/gtypist-2.9.5/src/gtypist.c:1506: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	message[MAX_SCR_LINE];
data/gtypist-2.9.5/src/gtypist.c:1560:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char	line[MAX_SCR_LINE];		/* line buffer */
data/gtypist-2.9.5/src/gtypist.c:1645: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 help_string[MAX_SCR_LINE];
data/gtypist-2.9.5/src/gtypist.c:1978:12:  [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).
  script = fopen( filename, "rb" );
data/gtypist-2.9.5/src/gtypist.c:1980:12:  [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).
  script = fopen( filename, "r" );
data/gtypist-2.9.5/src/gtypist.c:1997: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	*p, filepath[FILENAME_MAX];	/* file paths */
data/gtypist-2.9.5/src/gtypist.c:1998: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	script_file[FILENAME_MAX];	/* more file paths */
data/gtypist-2.9.5/src/gtypist.c:2265:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[FILENAME_MAX];		/* single line from bestlog */
data/gtypist-2.9.5/src/gtypist.c:2283:12:  [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).
  blfile = fopen( filename, "r" );
data/gtypist-2.9.5/src/gtypist.c:2358:12:  [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).
  blfile = fopen( filename, "a" );
data/gtypist-2.9.5/src/script.c:94:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[MAX_SCR_LINE];
data/gtypist-2.9.5/src/script.c:111:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_SCR_LINE];
data/gtypist-2.9.5/src/script.c:284: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	err[MAX_SCR_LINE];		/* error message string */
data/gtypist-2.9.5/src/utf8.c:48:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  int numChars = MultiByteToWideChar(CP_UTF8, 0, text, -1, NULL, NULL);
data/gtypist-2.9.5/src/utf8.c:50:20:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  int convresult = MultiByteToWideChar(CP_UTF8, 0, text,
data/gtypist-2.9.5/src/utf8.c:91: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.
        char buffer[2048];
data/gtypist-2.9.5/src/utf8.c:157:3:  [2] (buffer) wchar_t:
  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.
  wchar_t wc[2];
data/gtypist-2.9.5/src/utf8.c:189:16:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        return MultiByteToWideChar(CP_UTF8, 0, UTF8Text, -1, NULL, NULL) - 1;
data/gtypist-2.9.5/src/getopt.c:234: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 (!defined __STDC__ || !__STDC__) && !defined strlen
data/gtypist-2.9.5/src/getopt.c:237: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/gtypist-2.9.5/src/getopt.c:435:44:  [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 len = nonoption_flags_max_len = strlen (orig_str);
data/gtypist-2.9.5/src/getopt.c:656: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/gtypist-2.9.5/src/getopt.c:680: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/gtypist-2.9.5/src/getopt.c:710: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/gtypist-2.9.5/src/getopt.c:726: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/gtypist-2.9.5/src/getopt.c:731: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/gtypist-2.9.5/src/getopt.c:842: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/gtypist-2.9.5/src/getopt.c:865: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/gtypist-2.9.5/src/getopt.c:885: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/gtypist-2.9.5/src/getopt.c:899: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/gtypist-2.9.5/src/getopt.c:903: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/gtypist-2.9.5/src/gettext.h:213: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/gtypist-2.9.5/src/gettext.h:214:22:  [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 msgid_len = strlen (msgid) + 1;
data/gtypist-2.9.5/src/gettext.h:259: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/gtypist-2.9.5/src/gettext.h:260:22:  [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 msgid_len = strlen (msgid) + 1;
data/gtypist-2.9.5/src/gtypist.c:239: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).
   text_length = strlen (text);
data/gtypist-2.9.5/src/gtypist.c:265:21:  [1] (buffer) wcslen:
  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 numChars = wcslen(wideText);
data/gtypist-2.9.5/src/gtypist.c:505:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  label = (char*)malloc( strlen(SCR_DATA( line )) + 1 );
data/gtypist-2.9.5/src/gtypist.c:645:18:  [1] (buffer) wcslen:
  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 numChars = wcslen(wideData);
data/gtypist-2.9.5/src/gtypist.c:927:18:  [1] (buffer) wcslen:
  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 numChars = wcslen(wideData);
data/gtypist-2.9.5/src/gtypist.c:1205:30:  [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).
      line_iterator = line + strlen(line) - 1;
data/gtypist-2.9.5/src/gtypist.c:1294:30:  [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).
  move( MESSAGE_LINE, COLS - strlen( MODE_QUERY ) - 2 );
data/gtypist-2.9.5/src/gtypist.c:1335:30:  [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).
  move( MESSAGE_LINE, COLS - strlen( MODE_QUERY ) - 2 );
data/gtypist-2.9.5/src/gtypist.c:1420: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).
  data = SCR_DATA( line ) + strlen( SCR_DATA( line ) ) - 1;
data/gtypist-2.9.5/src/gtypist.c:1439: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).
    data = data + strlen( data ) - 1;
data/gtypist-2.9.5/src/gtypist.c:1512:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  line_iterator = line + strlen( line ) - 1;
data/gtypist-2.9.5/src/gtypist.c:1655: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).
  col += col_op + strlen (op);
data/gtypist-2.9.5/src/gtypist.c:1659:34:  [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).
  col += MAX(0, col_lop - col) + strlen (lop);
data/gtypist-2.9.5/src/gtypist.c:1668: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 (col + strlen (token) >= last_col) {
data/gtypist-2.9.5/src/gtypist.c:1673: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).
	col = col_help + strlen(token) + 1;
data/gtypist-2.9.5/src/gtypist.c:1677:9:  [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).
	col += strlen(token) + 1;
data/gtypist-2.9.5/src/gtypist.c:1882:35:  [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_option = (char*)malloc( strlen(optarg) + 1 );
data/gtypist-2.9.5/src/gtypist.c:1908: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).
	  cl_start_label = (char*)malloc( strlen( optarg ) + 1 );
data/gtypist-2.9.5/src/gtypist.c:2098:7:  [1] (buffer) wcslen:
  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 (wcslen(YN) != 3 || YN[1] != '/' || !iswideupper(YN[0]) || !iswideupper(YN[2]))
data/gtypist-2.9.5/src/gtypist.c:2108:7:  [1] (buffer) wcslen:
  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 (wcslen(RNE) != 5 ||
data/gtypist-2.9.5/src/gtypist.c:2120: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).
  argv0 = argv[0] + strlen( argv[0] );
data/gtypist-2.9.5/src/gtypist.c:2142:8:  [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( filepath, "/" );
data/gtypist-2.9.5/src/gtypist.c:2154:11:  [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( filepath, "/" );
data/gtypist-2.9.5/src/gtypist.c:2183:38:  [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( !getenv( global_home_env ) || !strlen( getenv( global_home_env ) ) )
data/gtypist-2.9.5/src/gtypist.c:2273:30:  [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).
  filename = (char *)malloc( strlen( getenv( global_home_env ) ) +
data/gtypist-2.9.5/src/gtypist.c:2274:30:  [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( BESTLOG_FILENAME ) + 2 );
data/gtypist-2.9.5/src/gtypist.c:2306: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).
  search_len = strlen( script_filename ) + strlen( excersise_label ) + 3;
data/gtypist-2.9.5/src/gtypist.c:2306:44:  [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).
  search_len = strlen( script_filename ) + strlen( excersise_label ) + 3;
data/gtypist-2.9.5/src/gtypist.c:2348:30:  [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).
  filename = (char *)malloc( strlen( getenv( global_home_env ) ) +
data/gtypist-2.9.5/src/gtypist.c:2349:30:  [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( BESTLOG_FILENAME ) + 2 );
data/gtypist-2.9.5/src/script.c:145: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).
	  line_iterator = line + strlen(line) - 1;
data/gtypist-2.9.5/src/script.c:164: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).
	    malloc( strlen( SCR_DATA( line )) + 1 );
data/gtypist-2.9.5/src/script.c:222: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).
      while( *line && isspace( line[strlen( line )-1] ) )
data/gtypist-2.9.5/src/script.c:223:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        line [strlen (line) - 1] = ASCII_NULL;
data/gtypist-2.9.5/src/script.c:252:44:  [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).
      data = (char*)realloc( data, (data ? strlen( data ) : 0) +
data/gtypist-2.9.5/src/script.c:253: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(SCR_DATA( line )) +
data/gtypist-2.9.5/src/script.c:254: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(STRING_NL) + 1 );
data/gtypist-2.9.5/src/script.c:260:2:  [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( data, "" );
data/gtypist-2.9.5/src/script.c:263: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).
      total_chars = strlen( data );
data/gtypist-2.9.5/src/utf8.c:75: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).
    size_t inleft = strlen(UTF8Input);
data/gtypist-2.9.5/src/utf8.c:100: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).
    int numberChars = strlen(UTF8Input) - outleft;
data/gtypist-2.9.5/src/utf8.c:114: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).
        int numChars = strlen(textWithCurrentEncoding);
data/gtypist-2.9.5/src/utf8.c:199: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).
        int len = strlen(textWithCurrentEncoding);

ANALYSIS SUMMARY:

Hits = 149
Lines analyzed = 5461 in approximately 0.19 seconds (28900 lines/second)
Physical Source Lines of Code (SLOC) = 3642
Hits@level = [0]  80 [1]  60 [2]  36 [3]  21 [4]  32 [5]   0
Hits@level+ = [0+] 229 [1+] 149 [2+]  89 [3+]  53 [4+]  32 [5+]   0
Hits/KSLOC@level+ = [0+] 62.8775 [1+] 40.9116 [2+] 24.4371 [3+] 14.5524 [4+] 8.78638 [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.