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/gnubik-2.4.3/src/txfm.h
Examining data/gnubik-2.4.3/src/menus.c
Examining data/gnubik-2.4.3/src/colour-dialog.h
Examining data/gnubik-2.4.3/src/game.c
Examining data/gnubik-2.4.3/src/textures.h
Examining data/gnubik-2.4.3/src/select.c
Examining data/gnubik-2.4.3/src/quarternion.c
Examining data/gnubik-2.4.3/src/control.h
Examining data/gnubik-2.4.3/src/cubeview.c
Examining data/gnubik-2.4.3/src/colour-dialog.c
Examining data/gnubik-2.4.3/src/drwBlock.h
Examining data/gnubik-2.4.3/src/textures.c
Examining data/gnubik-2.4.3/src/dialogs.h
Examining data/gnubik-2.4.3/src/txfm.c
Examining data/gnubik-2.4.3/src/glarea.h
Examining data/gnubik-2.4.3/src/move.h
Examining data/gnubik-2.4.3/src/guile-hooks.c
Examining data/gnubik-2.4.3/src/cube.h
Examining data/gnubik-2.4.3/src/cube.c
Examining data/gnubik-2.4.3/src/main.c
Examining data/gnubik-2.4.3/src/cubeview.h
Examining data/gnubik-2.4.3/src/control.c
Examining data/gnubik-2.4.3/src/move.c
Examining data/gnubik-2.4.3/src/menus.h
Examining data/gnubik-2.4.3/src/drwBlock.c
Examining data/gnubik-2.4.3/src/swatch.h
Examining data/gnubik-2.4.3/src/select.h
Examining data/gnubik-2.4.3/src/cube_i.h
Examining data/gnubik-2.4.3/src/cursors.h
Examining data/gnubik-2.4.3/src/guile-hooks.h
Examining data/gnubik-2.4.3/src/glarea-common.c
Examining data/gnubik-2.4.3/src/game.h
Examining data/gnubik-2.4.3/src/version.c
Examining data/gnubik-2.4.3/src/version.h
Examining data/gnubik-2.4.3/src/quarternion.h
Examining data/gnubik-2.4.3/src/swatch.c
Examining data/gnubik-2.4.3/src/cursors.c
Examining data/gnubik-2.4.3/src/dialogs.c

FINAL RESULTS:

data/gnubik-2.4.3/src/colour-dialog.c:194:12:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It can have any content
  and length, and the same variable can be set more than once (CWE-807,
  CWE-20). Check environment variables carefully before using them.
				       g_get_home_dir ());
data/gnubik-2.4.3/src/main.c:168:35:  [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.
#define GETOPT(A,  B,  C,  D,  E) getopt_long (A,  B,  C,  D,  E)
data/gnubik-2.4.3/src/main.c:170:35:  [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.
#define GETOPT(A,  B,  C,  D,  E) getopt (A,  B,  C)
data/gnubik-2.4.3/src/cube.c:482: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 (transform, cube->blocks[block_id].transformation, sizeof (Matrix));
data/gnubik-2.4.3/src/cube.c:622: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 (v,
data/gnubik-2.4.3/src/cursors.c:346:23:  [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 const unsigned char *cursors_data[n_CURSORS] = {
data/gnubik-2.4.3/src/cursors.c:367:23:  [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 const unsigned char *cursors_masks[n_CURSORS] = {
data/gnubik-2.4.3/src/drwBlock.c:374: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 str[4];
data/gnubik-2.4.3/src/guile-hooks.c:189:10:  [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 buffer[1024];
data/gnubik-2.4.3/src/main.c:202:33:  [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).
	  opts->initial_cube_size[0] = atoi (strtok (optarg, ","));
data/gnubik-2.4.3/src/main.c:209:41:  [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).
	      opts->initial_cube_size[i] = x ? atoi (x) : -1;
data/gnubik-2.4.3/src/drwBlock.c:42: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).
  for (i = 0; i < strlen (string); ++i)
data/gnubik-2.4.3/src/guile-hooks.c:199: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 (strcmp (".scm", entry->d_name + strlen (entry->d_name) - 4) == 0)
data/gnubik-2.4.3/src/menus.c:402: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).
					 strlen (menu_tree), NULL))

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 7989 in approximately 0.19 seconds (42740 lines/second)
Physical Source Lines of Code (SLOC) = 5034
Hits@level = [0]  20 [1]   3 [2]   8 [3]   3 [4]   0 [5]   0
Hits@level+ = [0+]  34 [1+]  14 [2+]  11 [3+]   3 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 6.75407 [1+] 2.78109 [2+] 2.18514 [3+] 0.595948 [4+]   0 [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.