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/tint-0.06/config.h
Examining data/tint-0.06/engine.c
Examining data/tint-0.06/engine.h
Examining data/tint-0.06/io.c
Examining data/tint-0.06/io.h
Examining data/tint-0.06/tint.c
Examining data/tint-0.06/typedefs.h
Examining data/tint-0.06/utils.c
Examining data/tint-0.06/utils.h

FINAL RESULTS:

data/tint-0.06/tint.c:381: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 (header,SCORE_HEADER);
data/tint-0.06/tint.c:470: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 (header,SCORE_HEADER);
data/tint-0.06/utils.c:42:4:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
   srand (time (NULL));
data/tint-0.06/utils.c:44:4:  [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 (time (NULL));
data/tint-0.06/utils.c:56:12:  [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 (random () % range);
data/tint-0.06/engine.c:161: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 (&test,shape,sizeof (shape_t));
data/tint-0.06/engine.c:165: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 (shape,&test,sizeof (shape_t));
data/tint-0.06/engine.c:235: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 (board,newboard,sizeof (board_t));
data/tint-0.06/engine.c:254: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 (engine->shapes,SHAPES,sizeof (shapes_t));
data/tint-0.06/engine.c:315: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 (engine->shapes,SHAPES,sizeof (shapes_t));
data/tint-0.06/tint.c:187:4:  [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 tmp[MAXDIGITS + 1];
data/tint-0.06/tint.c:320:4:  [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[NAMELEN];
data/tint-0.06/tint.c:369:4:  [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 header[strlen (SCORE_HEADER)+1];
data/tint-0.06/tint.c:373: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 (scores[i].name,"None");
data/tint-0.06/tint.c:380:18:  [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 ((handle = fopen (scorefile,"w")) == NULL) err1 ();
data/tint-0.06/tint.c:422:4:  [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 header[strlen (SCORE_HEADER)+1];
data/tint-0.06/tint.c:424:18:  [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 ((handle = fopen (scorefile,"r")) == NULL)
data/tint-0.06/tint.c:469:18:  [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 ((handle = fopen (scorefile,"w")) == NULL) err2 ();
data/tint-0.06/tint.c:551:4:  [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[NAMELEN];
data/tint-0.06/tint.c:211:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 3);
data/tint-0.06/tint.c:220:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 5);
data/tint-0.06/tint.c:231:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 7);
data/tint-0.06/tint.c:242:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 9);
data/tint-0.06/tint.c:253:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 11);
data/tint-0.06/tint.c:264:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 13);
data/tint-0.06/tint.c:276:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 15);
data/tint-0.06/tint.c:284:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 18);
data/tint-0.06/tint.c:291:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 20);
data/tint-0.06/tint.c:298:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   out_gotoxy (out_width () - strlen (tmp) - 1,YTOP + 21);
data/tint-0.06/tint.c:333: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).
   name[strlen (name) - 1] = '\0';
data/tint-0.06/tint.c:335: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).
   if (!strlen (name) && pw != NULL)
data/tint-0.06/tint.c:337:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (name,pw->pw_name,NAMELEN);
data/tint-0.06/tint.c:369: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).
   char header[strlen (SCORE_HEADER)+1];
data/tint-0.06/tint.c:382: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).
   i = fwrite (header,strlen (SCORE_HEADER),1,handle);
data/tint-0.06/tint.c:386: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).
		j = fwrite (scores[i].name,strlen (scores[i].name) + 1,1,handle);
data/tint-0.06/tint.c:422: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).
   char header[strlen (SCORE_HEADER)+1];
data/tint-0.06/tint.c:429: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).
   i = fread (header,strlen (SCORE_HEADER),1,handle);
data/tint-0.06/tint.c:430:50:  [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 != 1) || (strncmp (SCORE_HEADER,header,strlen (SCORE_HEADER)) != 0))
data/tint-0.06/tint.c:438:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((ch = fgetc (handle)) != '\0')
data/tint-0.06/tint.c:471: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).
   i = fwrite (header,strlen (SCORE_HEADER),1,handle);
data/tint-0.06/tint.c:475: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).
		j = fwrite (scores[i].name,strlen (scores[i].name) + 1,1,handle);
data/tint-0.06/tint.c:537: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).
		    if (i >= argc || strlen(argv[i]) < 1) showhelp();
data/tint-0.06/tint.c:557: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).
		buf[strlen (buf) - 1] = '\0';

ANALYSIS SUMMARY:

Hits = 43
Lines analyzed = 1682 in approximately 0.06 seconds (27505 lines/second)
Physical Source Lines of Code (SLOC) = 1035
Hits@level = [0]  32 [1]  24 [2]  14 [3]   3 [4]   2 [5]   0
Hits@level+ = [0+]  75 [1+]  43 [2+]  19 [3+]   5 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 72.4638 [1+] 41.5459 [2+] 18.3575 [3+] 4.83092 [4+] 1.93237 [5+]   0
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.