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/miceamaze-4.2.1/src/MenuSelectMaze.cpp
Examining data/miceamaze-4.2.1/src/MenuPlayers.h
Examining data/miceamaze-4.2.1/src/Wall.h
Examining data/miceamaze-4.2.1/src/House.h
Examining data/miceamaze-4.2.1/src/Snake.h
Examining data/miceamaze-4.2.1/src/Cursor.h
Examining data/miceamaze-4.2.1/src/Mouse.h
Examining data/miceamaze-4.2.1/src/AIVertexHeap.cpp
Examining data/miceamaze-4.2.1/src/House.cpp
Examining data/miceamaze-4.2.1/src/RenderFlatText.h
Examining data/miceamaze-4.2.1/src/Program.h
Examining data/miceamaze-4.2.1/src/Button.cpp
Examining data/miceamaze-4.2.1/src/FPS.h
Examining data/miceamaze-4.2.1/src/AI.cpp
Examining data/miceamaze-4.2.1/src/MenuOptions.h
Examining data/miceamaze-4.2.1/src/Functions.cpp
Examining data/miceamaze-4.2.1/src/Maze.h
Examining data/miceamaze-4.2.1/src/Spawner.cpp
Examining data/miceamaze-4.2.1/src/MenuPlayers.cpp
Examining data/miceamaze-4.2.1/src/AIVertex.h
Examining data/miceamaze-4.2.1/src/Color.h
Examining data/miceamaze-4.2.1/src/MenuMain.h
Examining data/miceamaze-4.2.1/src/Mouse.cpp
Examining data/miceamaze-4.2.1/src/MenuOptions.cpp
Examining data/miceamaze-4.2.1/src/Program.cpp
Examining data/miceamaze-4.2.1/src/Maze.cpp
Examining data/miceamaze-4.2.1/src/Functions.h
Examining data/miceamaze-4.2.1/src/Animal.cpp
Examining data/miceamaze-4.2.1/src/MenuAbout.cpp
Examining data/miceamaze-4.2.1/src/Arrow.h
Examining data/miceamaze-4.2.1/src/Config.h
Examining data/miceamaze-4.2.1/src/IntXY.h
Examining data/miceamaze-4.2.1/src/MenuMain.cpp
Examining data/miceamaze-4.2.1/src/Animal.h
Examining data/miceamaze-4.2.1/src/AnimalWithDistance.h
Examining data/miceamaze-4.2.1/src/Sound.h
Examining data/miceamaze-4.2.1/src/Arrow.cpp
Examining data/miceamaze-4.2.1/src/HowToPlay.h
Examining data/miceamaze-4.2.1/src/Images.h
Examining data/miceamaze-4.2.1/src/Version.h
Examining data/miceamaze-4.2.1/src/MenuSelectMaze.h
Examining data/miceamaze-4.2.1/src/Cursor.cpp
Examining data/miceamaze-4.2.1/src/Config.cpp
Examining data/miceamaze-4.2.1/src/AIVertexHeap.h
Examining data/miceamaze-4.2.1/src/Sound.cpp
Examining data/miceamaze-4.2.1/src/Images.cpp
Examining data/miceamaze-4.2.1/src/Button.h
Examining data/miceamaze-4.2.1/src/Game.cpp
Examining data/miceamaze-4.2.1/src/HowToPlay.cpp
Examining data/miceamaze-4.2.1/src/FPS.cpp
Examining data/miceamaze-4.2.1/src/Spawner.h
Examining data/miceamaze-4.2.1/src/RenderFlatText.cpp
Examining data/miceamaze-4.2.1/src/MenuAbout.h
Examining data/miceamaze-4.2.1/src/FloatXY.h
Examining data/miceamaze-4.2.1/src/Game.h
Examining data/miceamaze-4.2.1/src/main.cpp
Examining data/miceamaze-4.2.1/src/AI.h
Examining data/miceamaze-4.2.1/src/Snake.cpp

FINAL RESULTS:

data/miceamaze-4.2.1/src/Config.cpp:50:24:  [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.
	const char *homeEnv = getenv("HOME");
data/miceamaze-4.2.1/src/Program.cpp:360: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(SDL_GetTicks());
data/miceamaze-4.2.1/src/Config.cpp:40: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 appDataPath[MAX_PATH];
data/miceamaze-4.2.1/src/Config.cpp:71:5:  [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).
		f.open(configFilePath().c_str(), ios::in | ios::binary);
data/miceamaze-4.2.1/src/Config.cpp:91:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
							fpsBehaviour = atoi(value.c_str());
data/miceamaze-4.2.1/src/Config.cpp:93:45:  [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).
							Program::getInstance()->fullscreen = atoi(value.c_str());
data/miceamaze-4.2.1/src/Config.cpp:95:18:  [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).
							showFPS = atoi(value.c_str()) != 0;
data/miceamaze-4.2.1/src/Config.cpp:97: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).
							music = atoi(value.c_str()) != 0;
data/miceamaze-4.2.1/src/Config.cpp:99: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).
							sound = atoi(value.c_str()) != 0;
data/miceamaze-4.2.1/src/Config.cpp:148:4:  [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).
	f.open(configFilePath().c_str(), ios::trunc | ios::out | ios::binary);
data/miceamaze-4.2.1/src/Functions.h:185: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 s[20];
data/miceamaze-4.2.1/src/Game.cpp:288: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 remainingTimeString[10];
data/miceamaze-4.2.1/src/Maze.cpp:58:4:  [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).
	f.open(path.c_str(), ios::in | ios::binary);
data/miceamaze-4.2.1/src/Maze.cpp:176:4:  [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).
	f.open(path.c_str(), ios::trunc | ios::out | ios::binary);
data/miceamaze-4.2.1/src/Program.cpp:241:9:  [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).
	file = fopen((dataPath + "/MiceAmaze.txt").c_str(), "r");
data/miceamaze-4.2.1/src/Program.cpp:252:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		file = fopen((dataPath + "/MiceAmaze.txt").c_str(), "r");
data/miceamaze-4.2.1/src/Config.cpp:80:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				f.read(&c, 1);
data/miceamaze-4.2.1/src/Maze.cpp:69:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		f.read(&c, 1);

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 7523 in approximately 0.18 seconds (41391 lines/second)
Physical Source Lines of Code (SLOC) = 4804
Hits@level = [0]   3 [1]   2 [2]  14 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  21 [1+]  18 [2+]  16 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.37136 [1+] 3.74688 [2+] 3.33056 [3+] 0.41632 [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.