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/typespeed-0.6.5/src/convert.c
Examining data/typespeed-0.6.5/src/gettext.h
Examining data/typespeed-0.6.5/src/pathnames.h
Examining data/typespeed-0.6.5/src/file.c
Examining data/typespeed-0.6.5/src/menu.c
Examining data/typespeed-0.6.5/src/misc.c
Examining data/typespeed-0.6.5/src/network.c
Examining data/typespeed-0.6.5/src/typespeed.c
Examining data/typespeed-0.6.5/src/typespeed.h
Examining data/typespeed-0.6.5/testsuite/misc-ctest.c
Examining data/typespeed-0.6.5/testsuite/t_level.c
Examining data/typespeed-0.6.5/testsuite/t_typorankkaus.c
Examining data/typespeed-0.6.5/testsuite/t_unescstr.c
Examining data/typespeed-0.6.5/testsuite/t_loadwords.c

FINAL RESULTS:

data/typespeed-0.6.5/src/misc.c:318:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/typespeed-0.6.5/src/misc.c:341:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/typespeed-0.6.5/src/misc.c:370:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	i = vsnprintf(s, n, fmt, ap);
data/typespeed-0.6.5/src/network.c:187:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		n = vsnprintf(output, sizeof(output), fmt, ap);
data/typespeed-0.6.5/src/network.c:195:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stdout, fmt, ap);
data/typespeed-0.6.5/src/file.c:1145:17:  [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 ((envhome = getenv("HOME")) == NULL)
data/typespeed-0.6.5/src/misc.c:228:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return (int)(random() % range);
data/typespeed-0.6.5/src/typespeed.c:407: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 ((i = getopt_long(argc, argv, "to:h", options, NULL)) != -1) {
data/typespeed-0.6.5/src/typespeed.c:779:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(now.sinit);
data/typespeed-0.6.5/src/typespeed.c:781:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(now.sinit);
data/typespeed-0.6.5/src/convert.c:64:2:  [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 faim[21];
data/typespeed-0.6.5/src/convert.c:126:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((highf = fopen(hf, "r")) == NULL) {
data/typespeed-0.6.5/src/convert.c:148:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((highf = fopen(nhf, "a")) == NULL) {
data/typespeed-0.6.5/src/convert.c:274:2:  [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 path[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:89:2:  [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 name[41];
data/typespeed-0.6.5/src/file.c:90:2:  [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 mod[FILENAME_MAX * 2 + 1];
data/typespeed-0.6.5/src/file.c:91:2:  [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 wordlist[FILENAME_MAX * 2 + 1];
data/typespeed-0.6.5/src/file.c:142: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.
extern char	*rankki[11];
data/typespeed-0.6.5/src/file.c:143: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.
extern char	*typorank[12];
data/typespeed-0.6.5/src/file.c:149:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char ruledir[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:150:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char worddir[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:165:2:  [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 name[21];
data/typespeed-0.6.5/src/file.c:224:2:  [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 fullpath[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:513:2:  [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], info[61], wordpath[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:576:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((fileinfo = fopen(wordpath, "r")) == NULL)
data/typespeed-0.6.5/src/file.c:708:2:  [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], line[2 * FILENAME_MAX + 100];
data/typespeed-0.6.5/src/file.c:927:2:  [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[60], wordpath[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:972:13:  [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).
		if ((fd = open(wordpath, O_RDONLY, 0)) == -1)
data/typespeed-0.6.5/src/file.c:1131:2:  [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 userhigh[MAXPATHLEN], userconf[MAXPATHLEN];
data/typespeed-0.6.5/src/file.c:1167:13:  [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).
	if ((hfd = open(userhigh, O_RDWR, 0)) == -1)
data/typespeed-0.6.5/src/file.c:1184:2:  [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], line[sizeof("worddir = ") + MAXPATHLEN + 2];
data/typespeed-0.6.5/src/file.c:1211:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((file = fopen(filename, "r")) == NULL)
data/typespeed-0.6.5/src/file.c:1385:2:  [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 fullpath[MAXPATHLEN];
data/typespeed-0.6.5/src/menu.c:78: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.
extern char	*rankki[11];
data/typespeed-0.6.5/src/menu.c:262:2:  [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 entr[11];
data/typespeed-0.6.5/src/menu.c:263:2:  [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 clr[80];
data/typespeed-0.6.5/src/menu.c:330:2:  [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 port[6], serv[MAXHOSTNAMELEN];
data/typespeed-0.6.5/src/network.c:183:2:  [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 output[80];
data/typespeed-0.6.5/src/network.c:286:4:  [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(&addr.sin_addr, he->h_addr, he->h_length);
data/typespeed-0.6.5/src/network.c:385:2:  [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/typespeed-0.6.5/src/network.c:449:2:  [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/typespeed-0.6.5/src/network.c:535:2:  [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/typespeed-0.6.5/src/network.c:571:2:  [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[sizeof(" SCORE ") + 80];
data/typespeed-0.6.5/src/network.c:617:2:  [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[sizeof(" SCORE ") + 80];
data/typespeed-0.6.5/src/typespeed.c:139:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *rankki[11] =
data/typespeed-0.6.5/src/typespeed.c:143:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *typorank[12] =
data/typespeed-0.6.5/src/typespeed.c:158:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		 wordstring[22][20];
data/typespeed-0.6.5/src/typespeed.c:317:2:  [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 serv[MAXHOSTNAMELEN];
data/typespeed-0.6.5/src/typespeed.c:326:13:  [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).
	if ((hfd = open(HIGHFILE, O_RDWR, 0)) == -1)
data/typespeed-0.6.5/src/typespeed.c:416:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((netlogfile = fopen(optarg, "w")) == NULL)
data/typespeed-0.6.5/src/typespeed.c:773:2:  [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 input[20];
data/typespeed-0.6.5/src/typespeed.c:915: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((void *)&best, (void *)&now, sizeof(best));
data/typespeed-0.6.5/src/typespeed.h:44:2:  [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 descr[61];
data/typespeed-0.6.5/src/typespeed.h:45:2:  [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 name[MAXPATHLEN];
data/typespeed-0.6.5/src/typespeed.h:58:2:  [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 name[21];
data/typespeed-0.6.5/src/typespeed.h:67:2:  [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 name[21];
data/typespeed-0.6.5/src/typespeed.h:68:2:  [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 order[3];
data/typespeed-0.6.5/src/typespeed.h:86:2:  [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 name[31];
data/typespeed-0.6.5/src/typespeed.h:87:2:  [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 fname[FILENAME_MAX + 1];
data/typespeed-0.6.5/testsuite/t_loadwords.c:54: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.
extern char	worddir[MAXPATHLEN];
data/typespeed-0.6.5/testsuite/t_loadwords.c:60:2:  [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 conv[2], input[1024], wordpath[MAXPATHLEN];
data/typespeed-0.6.5/testsuite/t_loadwords.c:80:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((file = fopen(wordpath, "r")) == NULL)
data/typespeed-0.6.5/testsuite/t_loadwords.c:85:15:  [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).
		exp_count = atoi(input);
data/typespeed-0.6.5/testsuite/t_loadwords.c:92:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		exp_retval = atoi(conv);
data/typespeed-0.6.5/src/convert.c:210: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).
			fname = p + strlen("high.");
data/typespeed-0.6.5/src/convert.c:211:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strlen(fname)) {
data/typespeed-0.6.5/src/convert.c:245: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).
	if ((new = calloc(2, strlen(string) + 1)) == NULL) {
data/typespeed-0.6.5/src/convert.c:287: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).
		if (!strncmp(dp->d_name, "high.", strlen("high."))) {
data/typespeed-0.6.5/src/file.c:171: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).
		liima_mvgetnstr(3, 3 + strlen(_("Enter your name:")), name,
data/typespeed-0.6.5/src/file.c:381: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).
	if ((new = calloc(2, strlen(string) + 1)) == NULL)
data/typespeed-0.6.5/src/file.c:571: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).
			if (strncmp(dp->d_name, prefix, strlen(prefix)))
data/typespeed-0.6.5/src/file.c:952:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (i + strlen(buf) + 2 >= j) {
data/typespeed-0.6.5/src/file.c:983:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, words.bulk, sb.st_size) != sb.st_size) {
data/typespeed-0.6.5/src/file.c:1012: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).
		if (curpos[0] == '\0' || strlen(curpos) > 19) {
data/typespeed-0.6.5/src/file.c:1203:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
			strncat(line, "\n", 1);
data/typespeed-0.6.5/src/file.c:1419: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).
	new = xmalloc(strlen(string) + 1);
data/typespeed-0.6.5/src/menu.c:270: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).
	liima_mvgetnstr(17, 31 + strlen(string), entr, sizeof(entr) - 1);
data/typespeed-0.6.5/src/menu.c:359:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(_("Enter Host:")), serv,
data/typespeed-0.6.5/src/menu.c:366: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).
			liima_mvgetnstr(11, 31 + strlen(_("Enter Port:")), port,
data/typespeed-0.6.5/src/menu.c:377:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(_("Enter Name:")), opt.name,
data/typespeed-0.6.5/src/menu.c:501: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).
		mvprintw( 5, 31 + strlen(_("Current Rule Set:")), "%s",
data/typespeed-0.6.5/src/menu.c:503: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).
		mvprintw( 8, 31 + strlen(_("2. Misses Limit:")), "%d",
data/typespeed-0.6.5/src/menu.c:505: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).
		mvprintw( 9, 31 + strlen(_("3. Word Length:")), "%2d",
data/typespeed-0.6.5/src/menu.c:507: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).
		mvprintw( 9, 36 + strlen(_("3. Word Length:")), "%2d",
data/typespeed-0.6.5/src/menu.c:509: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).
		mvprintw(10, 31 + strlen(_("4. Words On Screen:")), "%2d",
data/typespeed-0.6.5/src/menu.c:511: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).
		mvprintw(10, 36 + strlen(_("4. Words On Screen:")), "%2d",
data/typespeed-0.6.5/src/menu.c:514: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).
			mvaddstr(11, 31 + strlen(_("   High Score Enabled:")),
data/typespeed-0.6.5/src/menu.c:517: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).
			mvaddstr(11, 31 + strlen(_("   High Score Enabled:")),
data/typespeed-0.6.5/src/menu.c:519: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).
		mvprintw(12, 31 + strlen(_("6. Speed Step:")), "%3d",
data/typespeed-0.6.5/src/menu.c:521: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).
		mvprintw(13, 31 + strlen(_("7. Speed Range:")), "%2d",
data/typespeed-0.6.5/src/menu.c:524: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).
			mvprintw(13, 36 + strlen(_("7. Speed Range:")), "%2d",
data/typespeed-0.6.5/src/menu.c:527: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).
			mvaddstr(13, 37 + strlen(_("7. Speed Range:")),
data/typespeed-0.6.5/src/menu.c:530: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).
			mvaddstr(14, 31 + strlen(_("8. Smoothness:")),
data/typespeed-0.6.5/src/menu.c:533: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).
			mvaddstr(14, 31 + strlen(_("8. Smoothness:")), _("no"));
data/typespeed-0.6.5/src/misc.c:392:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void)strncpy(dst, src, n);
data/typespeed-0.6.5/src/network.c:479:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(buf) == sizeof(buf) - 1) {
data/typespeed-0.6.5/src/network.c:487: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).
		len = strlen(buf);
data/typespeed-0.6.5/src/network.c:540:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, wordstring, sizeof(buf) - 2);
data/typespeed-0.6.5/src/network.c:541:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
	strncat(buf, "\n", sizeof(buf) - 1 - strlen(buf));
data/typespeed-0.6.5/src/network.c:541: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).
	strncat(buf, "\n", sizeof(buf) - 1 - strlen(buf));
data/typespeed-0.6.5/src/network.c:544: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).
	for (p = buf, len = strlen(buf) + 1; len;) {
data/typespeed-0.6.5/src/network.c:596:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(buf, name, 20);
data/typespeed-0.6.5/src/typespeed.c:199:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(newword) > (size_t)rules.maxlen)
data/typespeed-0.6.5/src/typespeed.c:260: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).
			length += strlen(wordstring[i]) + 1;
data/typespeed-0.6.5/src/typespeed.c:383:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(opt.name, "default", sizeof(opt.name));
data/typespeed-0.6.5/src/typespeed.c:571: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).
		length = (int)strlen(wordstring[i]);
data/typespeed-0.6.5/src/typespeed.c:685: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).
			clearword(i, wordpos[i], strlen(wordstring[i]));
data/typespeed-0.6.5/src/typespeed.c:710: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).
		if ((size_t)*inputpos < strlen(input)) {
data/typespeed-0.6.5/src/typespeed.c:717:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (*inputpos < 19 && (size_t)*inputpos < strlen(input))
data/typespeed-0.6.5/src/typespeed.c:722: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).
		*inputpos = strlen(input);
data/typespeed-0.6.5/src/typespeed.c:740:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (*inputpos == strlen(input))
data/typespeed-0.6.5/src/typespeed.c:749: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).
			clearword(i, wordpos[i], strlen(wordstring[i]));
data/typespeed-0.6.5/src/typespeed.c:929:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	clearword(12, 30, strlen(_("GAME OVER!")));
data/typespeed-0.6.5/testsuite/t_loadwords.c:72:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(dp->d_name) < 3)

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 5198 in approximately 0.15 seconds (34763 lines/second)
Physical Source Lines of Code (SLOC) = 3776
Hits@level = [0]  45 [1]  50 [2]  54 [3]   5 [4]   5 [5]   0
Hits@level+ = [0+] 159 [1+] 114 [2+]  64 [3+]  10 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 42.1081 [1+] 30.1907 [2+] 16.9492 [3+] 2.64831 [4+] 1.32415 [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.