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/gigalomania-1.0+ds1/CreateScaledGfx/main.cpp
Examining data/gigalomania-1.0+ds1/common.h
Examining data/gigalomania-1.0+ds1/game.cpp
Examining data/gigalomania-1.0+ds1/gamestate.cpp
Examining data/gigalomania-1.0+ds1/gui.cpp
Examining data/gigalomania-1.0+ds1/gui.h
Examining data/gigalomania-1.0+ds1/image.cpp
Examining data/gigalomania-1.0+ds1/image.h
Examining data/gigalomania-1.0+ds1/main.cpp
Examining data/gigalomania-1.0+ds1/panel.cpp
Examining data/gigalomania-1.0+ds1/panel.h
Examining data/gigalomania-1.0+ds1/player.cpp
Examining data/gigalomania-1.0+ds1/resources.cpp
Examining data/gigalomania-1.0+ds1/resources.h
Examining data/gigalomania-1.0+ds1/screen.cpp
Examining data/gigalomania-1.0+ds1/screen.h
Examining data/gigalomania-1.0+ds1/sector.cpp
Examining data/gigalomania-1.0+ds1/sound.cpp
Examining data/gigalomania-1.0+ds1/sound.h
Examining data/gigalomania-1.0+ds1/stdafx.cpp
Examining data/gigalomania-1.0+ds1/stdafx.h
Examining data/gigalomania-1.0+ds1/tutorial.cpp
Examining data/gigalomania-1.0+ds1/tutorial.h
Examining data/gigalomania-1.0+ds1/utils.cpp
Examining data/gigalomania-1.0+ds1/utils.h
Examining data/gigalomania-1.0+ds1/player.h
Examining data/gigalomania-1.0+ds1/gamestate.h
Examining data/gigalomania-1.0+ds1/game.h
Examining data/gigalomania-1.0+ds1/sector.h

FINAL RESULTS:

data/gigalomania-1.0+ds1/game.cpp:12:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define access _access
data/gigalomania-1.0+ds1/game.cpp:3270:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fullname, "%s/%s", maps_dirname.c_str(), filename);
data/gigalomania-1.0+ds1/game.cpp:3278:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fullname, "%s/%s", alt_maps_dirname.c_str(), filename);
data/gigalomania-1.0+ds1/game.cpp:3330:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(maps_dirname_w, "%s\\*", maps_dirname.c_str());
data/gigalomania-1.0+ds1/game.cpp:4421:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) != 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4443:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		else if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5116:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) != 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5128:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	else if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5136:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) != 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5154:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	else if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5166:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) != 0 ) {
data/gigalomania-1.0+ds1/game.cpp:5184:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	else if( access(getApplicationFilename(autosave_filename, autosave_survive_uninstall), 0) == 0 ) {
data/gigalomania-1.0+ds1/gamestate.cpp:706:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buffer, "%s AGE", epoch_names[game_g->getStartEpoch()]);
data/gigalomania-1.0+ds1/gamestate.cpp:1074:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fullname, "%s/%s", maps_dirname.c_str(), game_g->getMap()->getFilename());
data/gigalomania-1.0+ds1/gamestate.cpp:1082:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fullname, "%s/%s", alt_maps_dirname.c_str(), game_g->getMap()->getFilename());
data/gigalomania-1.0+ds1/gui.cpp:327:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buffer, "%d %c %s Age %d  Men %d  Suspended %d", i, diff_ch, PlayerType::getName((PlayerType::PlayerTypeID)player), epoch+1, n_men, suspended[player]);
data/gigalomania-1.0+ds1/gui.cpp:365:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buffer, "%d %c %s Age %d  Men %d  Saved %d", i, diff_ch, PlayerType::getName((PlayerType::PlayerTypeID)player), epoch+1, n_men, suspended[player]);
data/gigalomania-1.0+ds1/gui.cpp:482:4:  [4] (shell) ShellExecute:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			ShellExecute(0, 0, help_url, 0, 0 , SW_SHOW );
data/gigalomania-1.0+ds1/gui.cpp:812:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "deploy a %s", Invention::getInvention(Invention::DEFENCE, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:830:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "add a %s to the army", Invention::getInvention(Invention::WEAPON, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:866:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "design a %s", Invention::getInvention(Invention::DEFENCE, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:872:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "design a %s", Invention::getInvention(Invention::WEAPON, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:959:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "view blueprint for a %s", Invention::getInvention(Invention::DEFENCE, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:963:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "view blueprint for a %s", Invention::getInvention(Invention::WEAPON, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:1015:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "manufacture a %s", Invention::getInvention(Invention::DEFENCE, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/gui.cpp:1021:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "manufacture a %s", Invention::getInvention(Invention::WEAPON, game_g->getStartEpoch() + i)->getName());
data/gigalomania-1.0+ds1/utils.cpp:18:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define access _access
data/gigalomania-1.0+ds1/utils.cpp:138:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if( access(application_path, 0) != 0 ) {
data/gigalomania-1.0+ds1/utils.cpp:163:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access(application_path, 0) != 0 ) {
data/gigalomania-1.0+ds1/utils.cpp:191:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(application_path, "%s%s", homedir, subdir);
data/gigalomania-1.0+ds1/utils.cpp:195:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access(application_path, 0) != 0 ) {
data/gigalomania-1.0+ds1/utils.cpp:222:2:  [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(filename, application_path);
data/gigalomania-1.0+ds1/utils.cpp:239:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s%s", path, name);
data/gigalomania-1.0+ds1/utils.cpp:245:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s/%s", path, name);
data/gigalomania-1.0+ds1/utils.cpp:249:2:  [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(filename, name);
data/gigalomania-1.0+ds1/utils.cpp:327:4:  [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(logfile, text, vlist);
data/gigalomania-1.0+ds1/utils.cpp:336:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vprintf(text, vlist);
data/gigalomania-1.0+ds1/game.cpp:5293: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( seed );
data/gigalomania-1.0+ds1/gamestate.cpp:2054:9:  [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.
				if( random <= prob ) {
data/gigalomania-1.0+ds1/sector.cpp:1782:9:  [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.
				if( random <= prob ) {
data/gigalomania-1.0+ds1/sector.cpp:1855:8:  [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.
			if( random <= prob ) {
data/gigalomania-1.0+ds1/utils.cpp:187:18:  [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.
	char *homedir = getenv("HOME");
data/gigalomania-1.0+ds1/game.cpp:390:7:  [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.
const char *epoch_names[n_epochs_c] = { "FIRST", "SECOND", "THIRD", "FOURTH", "FIFTH", "SIXTH", "SEVENTH", "EIGHTH", "NINTH", "TENTH" };
data/gigalomania-1.0+ds1/game.cpp:854: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).
	FILE *file = fopen(filename, "rb+");
data/gigalomania-1.0+ds1/game.cpp:861: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 buffer[bufsize+1] = "";
data/gigalomania-1.0+ds1/game.cpp:948: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[300] = "";
data/gigalomania-1.0+ds1/game.cpp:949:2:  [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(name, "game_%d.SAV", slot);
data/gigalomania-1.0+ds1/game.cpp:979: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).
	FILE *file = fopen(filename, "wb+");
data/gigalomania-1.0+ds1/game.cpp:989: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 buffer[256] = "";
data/gigalomania-1.0+ds1/game.cpp:1321: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 filename[300] = "";
data/gigalomania-1.0+ds1/game.cpp:1322:2:  [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(filename, "attacker_walking_%d.png", epoch);
data/gigalomania-1.0+ds1/game.cpp:1334:4:  [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(filename, "attacker_walking_%d_%d.png", epoch, dir);
data/gigalomania-1.0+ds1/game.cpp:2461:12:  [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.
		unsigned char filter_max[3] = {255, 192, 84};
data/gigalomania-1.0+ds1/game.cpp:2462:12:  [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.
		unsigned char filter_min[3] = {120, 0, 0};
data/gigalomania-1.0+ds1/game.cpp:2466:12:  [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.
		unsigned char filter_max[3] = {104, 255, 104};
data/gigalomania-1.0+ds1/game.cpp:2467:12:  [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.
		unsigned char filter_min[3] = {0, 72, 0};
data/gigalomania-1.0+ds1/game.cpp:2471:12:  [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.
		unsigned char filter_max[3] = {216, 144, 72};
data/gigalomania-1.0+ds1/game.cpp:2472:12:  [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.
		unsigned char filter_min[3] = {16, 0, 0};
data/gigalomania-1.0+ds1/game.cpp:2476:12:  [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.
		unsigned char filter_max[3] = {255, 255, 255};
data/gigalomania-1.0+ds1/game.cpp:2477:12:  [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.
		unsigned char filter_min[3] = {72, 72, 72};
data/gigalomania-1.0+ds1/game.cpp:2481:12:  [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.
		unsigned char filter_max[3] = {224, 152, 116};
data/gigalomania-1.0+ds1/game.cpp:2482:12:  [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.
		unsigned char filter_min[3] = {16, 0, 0};
data/gigalomania-1.0+ds1/game.cpp:2486:12:  [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.
		unsigned char filter_max[3] = {52, 232, 52};
data/gigalomania-1.0+ds1/game.cpp:2487:12:  [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.
		unsigned char filter_min[3] = {0, 8, 0};
data/gigalomania-1.0+ds1/game.cpp:2491:12:  [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.
		unsigned char filter_max[3] = {188, 188, 188};
data/gigalomania-1.0+ds1/game.cpp:2492:12:  [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.
		unsigned char filter_min[3] = {0, 0, 0};
data/gigalomania-1.0+ds1/game.cpp:2504:11:  [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.
	unsigned char filter_max_ocean[3] = {180, 215, 240};
data/gigalomania-1.0+ds1/game.cpp:2505:11:  [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.
	unsigned char filter_min_ocean[3] = {60, 95, 115};
data/gigalomania-1.0+ds1/game.cpp:3016:16:  [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( !screen->open(screen_width, screen_height, fullscreen) )
data/gigalomania-1.0+ds1/game.cpp:3025:15:  [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( screen->open(4*default_width_c, 4*default_height_c, fullscreen) ) {
data/gigalomania-1.0+ds1/game.cpp:3029:20:  [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).
		else if( screen->open(3*default_width_c, 3*default_height_c, fullscreen) ) {
data/gigalomania-1.0+ds1/game.cpp:3033:20:  [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).
		else if( screen->open(2*default_width_c, 2*default_height_c, fullscreen) ) {
data/gigalomania-1.0+ds1/game.cpp:3037:20:  [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).
		else if( screen->open(default_width_c, default_height_c, fullscreen) ) {
data/gigalomania-1.0+ds1/game.cpp:3053:16:  [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( !screen->open(user_width, user_height, fullscreen) ) {
data/gigalomania-1.0+ds1/game.cpp:3061: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 buffer[256] = "";
data/gigalomania-1.0+ds1/game.cpp:3062:2:  [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(buffer, "Gigalomania, version %d.%d.%d - Loading...", majorVersion, minorVersion, patchVersion);
data/gigalomania-1.0+ds1/game.cpp:3098:12:  [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).
		*epoch = atoi(ptr);
data/gigalomania-1.0+ds1/game.cpp:3106:17:  [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).
		n_opponents = atoi(ptr);
data/gigalomania-1.0+ds1/game.cpp:3173: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).
			int sec_x = atoi(ptr);
data/gigalomania-1.0+ds1/game.cpp:3186: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).
			int sec_y = atoi(ptr);
data/gigalomania-1.0+ds1/game.cpp:3264: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 line[MAX_LINE+1] = "";
data/gigalomania-1.0+ds1/game.cpp:3269: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 fullname[4096] = "";
data/gigalomania-1.0+ds1/game.cpp:3286: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 buffer[MAX_LINE+1] = "";
data/gigalomania-1.0+ds1/game.cpp:3329: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 maps_dirname_w[256];
data/gigalomania-1.0+ds1/game.cpp:3838:50:  [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).
							save_major = static_cast<DifficultyLevel>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/game.cpp:3841:50:  [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).
							save_minor = static_cast<DifficultyLevel>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/game.cpp:3844:60:  [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).
							int savegame_version = static_cast<DifficultyLevel>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/game.cpp:3863: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).
							gameType = static_cast<GameType>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/game.cpp:3869:56:  [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).
							difficulty_level = static_cast<DifficultyLevel>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/game.cpp:3875: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).
							human_player = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3881:22:  [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).
							n_men_store = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3887:29:  [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).
							n_player_suspended = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3893:22:  [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).
							start_epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3901:26:  [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).
							selected_island = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3927:20:  [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).
							island_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3933:19:  [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).
							complete = atoi(attribute->Value())==1;
data/gigalomania-1.0+ds1/game.cpp:3952:24:  [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).
							int real_time = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:3956:24:  [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).
							int game_time = atoi(attribute->Value());
data/gigalomania-1.0+ds1/game.cpp:4233: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_LINE+1] = "";
data/gigalomania-1.0+ds1/game.cpp:4234: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 buffer[MAX_LINE+1] = "";
data/gigalomania-1.0+ds1/game.cpp:5406: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 buffer[256] = "";
data/gigalomania-1.0+ds1/game.cpp:5407:2:  [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(buffer, "Gigalomania, version %d.%d.%d", majorVersion, minorVersion, patchVersion);
data/gigalomania-1.0+ds1/gamestate.cpp:680: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 buffer[256] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:687:4:  [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(buffer, "Gigalomania v%d.%d", majorVersion, minorVersion);
data/gigalomania-1.0+ds1/gamestate.cpp:689:4:  [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(buffer, "Gigalomania v%d.%d.%d", majorVersion, minorVersion, patchVersion);
data/gigalomania-1.0+ds1/gamestate.cpp:726:4:  [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(buffer, "Saved Men %d", n_suspended);
data/gigalomania-1.0+ds1/gamestate.cpp:999:13:  [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).
			*sec_x = atoi(ptr);
data/gigalomania-1.0+ds1/gamestate.cpp:1012:13:  [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).
			*sec_y = atoi(ptr);
data/gigalomania-1.0+ds1/gamestate.cpp:1041:21:  [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).
			int n_elements = atoi(ptr);
data/gigalomania-1.0+ds1/gamestate.cpp:1069: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 line[MAX_LINE+1] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:1073: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 fullname[4096] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:1091: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 buffer[MAX_LINE+1] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:1233:6:  [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[256] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:1234:6:  [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(buffer, "map_%d_%d", x, y);
data/gigalomania-1.0+ds1/gamestate.cpp:3196:13:  [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).
			*map_x = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3199:13:  [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).
			*map_y = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3271: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).
							player_asking_alliance = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3288:20:  [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).
							player_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3291: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).
							epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3294:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3323:19:  [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).
							int page = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3348:20:  [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).
							player_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/gamestate.cpp:3408: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 text[4096] = "";
data/gigalomania-1.0+ds1/gamestate.cpp:3410: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(text, "QUITTER!");
data/gigalomania-1.0+ds1/gamestate.cpp:3412: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(text, "LOSER!");
data/gigalomania-1.0+ds1/gamestate.cpp:3414: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(text, "CONGRATULATIONS!");
data/gigalomania-1.0+ds1/gui.cpp:314: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 buffer[256] = "";
data/gigalomania-1.0+ds1/gui.cpp:348: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 buffer[256] = "";
data/gigalomania-1.0+ds1/gui.cpp:368:4:  [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(buffer, "UNUSED Slot %d", i);
data/gigalomania-1.0+ds1/gui.cpp:609: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 buffer[256] = "";
data/gigalomania-1.0+ds1/gui.cpp:721: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(buffer, "button_elements_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:828: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(buffer, "button_deploy_attackers_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:859: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(buffer, "button_shields_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:864: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(buffer, "button_defences_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:870: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(buffer, "button_weapons_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:886:4:  [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(buffer, "button_nminers2_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:897: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(buffer, "button_nminers2_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:1008: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(buffer, "button_fshields_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:1013: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(buffer, "button_fdefences_%d", i);
data/gigalomania-1.0+ds1/gui.cpp:1019: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(buffer, "button_fweapons_%d", i);
data/gigalomania-1.0+ds1/image.cpp:933:108:  [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.
Gigalomania::Image *Gigalomania::Image::createNoise(int w,int h,float scale_u,float scale_v,const unsigned char filter_max[3],const unsigned char filter_min[3],NOISEMODE_t noisemode,int n_iterations) {
data/gigalomania-1.0+ds1/image.cpp:933:142:  [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.
Gigalomania::Image *Gigalomania::Image::createNoise(int w,int h,float scale_u,float scale_v,const unsigned char filter_max[3],const unsigned char filter_min[3],NOISEMODE_t noisemode,int n_iterations) {
data/gigalomania-1.0+ds1/image.cpp:1036: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 buffer[16] = "";
data/gigalomania-1.0+ds1/image.cpp:1037:2:  [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(buffer,"%d",number);
data/gigalomania-1.0+ds1/image.h:114:85:  [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 Image * createNoise(int w,int h,float scale_u,float scale_v,const unsigned char filter_max[3],const unsigned char filter_min[3],NOISEMODE_t noisemode,int n_iterations);
data/gigalomania-1.0+ds1/image.h:114:119:  [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 Image * createNoise(int w,int h,float scale_u,float scale_v,const unsigned char filter_max[3],const unsigned char filter_min[3],NOISEMODE_t noisemode,int n_iterations);
data/gigalomania-1.0+ds1/panel.cpp:242:11:  [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.
				const char *text[3] = {NULL, NULL};
data/gigalomania-1.0+ds1/panel.cpp:539:20:  [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.
	this->texts = new char *[n_texts];
data/gigalomania-1.0+ds1/panel.h:43:12:  [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.
		unsigned char background[4];
data/gigalomania-1.0+ds1/player.cpp:113: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).
							dead = atoi(attribute->Value())==1;
data/gigalomania-1.0+ds1/player.cpp:116:19:  [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).
							n_births = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:119:19:  [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).
							n_deaths = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:122:32:  [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).
							n_men_for_this_island = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:125:22:  [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).
							n_suspended = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:128:36:  [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).
							alliance_last_asked_human = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:202:22:  [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).
							player_id_i = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:205:22:  [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).
							player_id_j = atoi(attribute->Value());
data/gigalomania-1.0+ds1/player.cpp:208:19:  [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).
							alliance = atoi(attribute->Value())==1;
data/gigalomania-1.0+ds1/player.cpp:211:21:  [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).
							last_asked = atoi(attribute->Value());
data/gigalomania-1.0+ds1/screen.cpp:44:27:  [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).
bool Gigalomania::Screen::open(int screen_width, int screen_height, bool fullscreen) {
data/gigalomania-1.0+ds1/screen.cpp:79:12:  [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.
		unsigned char data[1] = "";
data/gigalomania-1.0+ds1/screen.cpp:80:12:  [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.
		unsigned char mask[1] = "";
data/gigalomania-1.0+ds1/screen.h:27:8:  [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).
		bool open(int screen_width, int screen_height, bool fullscreen);
data/gigalomania-1.0+ds1/sector.cpp:371: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).
							epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:374:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:749:17:  [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).
							health = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:765:20:  [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).
							turret_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:768: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).
							epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:2986:50:  [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).
			invention_type = static_cast<Invention::Type>(atoi(attribute->Value()));
data/gigalomania-1.0+ds1/sector.cpp:2989:22:  [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).
			invention_epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:2992: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).
			design_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3036:22:  [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).
							this->epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3048: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).
							this->player = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3057:28:  [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).
							this->is_shutdown = atoi(attribute->Value()) == 1;
data/gigalomania-1.0+ds1/sector.cpp:3060:22:  [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).
							this->nuked = atoi(attribute->Value()) == 1;
data/gigalomania-1.0+ds1/sector.cpp:3063:31:  [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).
							this->nuke_by_player = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3069:26:  [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).
							this->nuke_time = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3072:39:  [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).
							this->nuke_defence_animation = atoi(attribute->Value()) == 1;
data/gigalomania-1.0+ds1/sector.cpp:3075:34:  [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).
							this->nuke_defence_time = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3078:31:  [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).
							this->nuke_defence_x = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3081:31:  [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).
							this->nuke_defence_y = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3084:27:  [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).
							this->population = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3090:28:  [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).
							this->n_designers = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3096:26:  [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).
							this->n_workers = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3102:26:  [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).
							this->n_famount = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3105:27:  [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).
							this->researched = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3108:36:  [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).
							this->researched_lasttime = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3111:29:  [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).
							this->manufactured = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3114:38:  [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).
							this->manufactured_lasttime = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3117:32:  [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).
							this->growth_lasttime = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3120:31:  [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).
							this->mined_lasttime = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3123:31:  [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).
							this->built_lasttime = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3139:21:  [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).
							element_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3142:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3172:22:  [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).
							building_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3175:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3212:20:  [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).
							player_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3215:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3237:22:  [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).
							building_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3266:20:  [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).
							player_id = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3285: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).
							epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3288:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3311:25:  [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).
							relative_epoch = atoi(attribute->Value());
data/gigalomania-1.0+ds1/sector.cpp:3314:12:  [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).
							n = atoi(attribute->Value());
data/gigalomania-1.0+ds1/tutorial.cpp:493:6:  [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[256] = "";
data/gigalomania-1.0+ds1/tutorial.cpp:494:6:  [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(buffer, "map_%d_%d", x, y);
data/gigalomania-1.0+ds1/utils.cpp:99: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 application_path[MAX_PATH] = "";
data/gigalomania-1.0+ds1/utils.cpp:323:19:  [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 *logfile = fopen(logfilename,"at+");
data/gigalomania-1.0+ds1/game.cpp:873:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int c = fgetc(file);
data/gigalomania-1.0+ds1/game.cpp:3069: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).
	line[ strlen(line) - 1 ] = '\0'; // trim new line
data/gigalomania-1.0+ds1/game.cpp:3070: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).
	line[ strlen(line) - 1 ] = '\0'; // trim carriage return
data/gigalomania-1.0+ds1/game.cpp:3212:13:  [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(&buffer[newline_index-1]);
data/gigalomania-1.0+ds1/game.cpp:3223:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			int n_read = file->read(file, &buffer[buffer_offset], 1, MAX_LINE-buffer_offset);
data/gigalomania-1.0+ds1/game.cpp:3810:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			stream.read(ptr, length);
data/gigalomania-1.0+ds1/game.cpp:4038:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if( file->read(file, buffer, 1, size) > 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4249:43:  [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(line, onemousebutton_key, strlen(onemousebutton_key)) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4253:42:  [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).
				else if( strncmp(line, sound_on_key, strlen(sound_on_key)) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4257:42:  [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).
				else if( strncmp(line, music_on_key, strlen(music_on_key)) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4261:48:  [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).
				else if( strncmp(line, disallow_nukes_key, strlen(disallow_nukes_key)) == 0 ) {
data/gigalomania-1.0+ds1/game.cpp:4285:68:  [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).
			prefs_file->write(prefs_file, onemousebutton_key, sizeof(char), strlen(onemousebutton_key));
data/gigalomania-1.0+ds1/game.cpp:4289:62:  [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).
			prefs_file->write(prefs_file, sound_on_key, sizeof(char), strlen(sound_on_key));
data/gigalomania-1.0+ds1/game.cpp:4293:62:  [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).
			prefs_file->write(prefs_file, music_on_key, sizeof(char), strlen(music_on_key));
data/gigalomania-1.0+ds1/game.cpp:4297:68:  [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).
			prefs_file->write(prefs_file, disallow_nukes_key, sizeof(char), strlen(disallow_nukes_key));
data/gigalomania-1.0+ds1/game.cpp:5225:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if( read_file->read(read_file, buffer, 1, size) == 0 ) {
data/gigalomania-1.0+ds1/gamestate.cpp:969: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).
	line[ strlen(line) - 1 ] = '\0'; // trim new line
data/gigalomania-1.0+ds1/gamestate.cpp:970: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).
	line[ strlen(line) - 1 ] = '\0'; // trim carriage return
data/gigalomania-1.0+ds1/image.cpp:1038: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).
	int len = strlen(buffer);
data/gigalomania-1.0+ds1/image.cpp:1059: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).
	int len = strlen(text);
data/gigalomania-1.0+ds1/panel.cpp:542:13:  [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(texts[i]);
data/gigalomania-1.0+ds1/panel.cpp:546:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(this->texts[i], texts[i], len);
data/gigalomania-1.0+ds1/utils.cpp:157:3:  [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(application_path, "");
data/gigalomania-1.0+ds1/utils.cpp:174:3:  [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(application_path, "");
data/gigalomania-1.0+ds1/utils.cpp:183:3:  [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(path, "");
data/gigalomania-1.0+ds1/utils.cpp:189: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).
	int len = strlen(homedir) + strlen(subdir);
data/gigalomania-1.0+ds1/utils.cpp:189: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).
	int len = strlen(homedir) + strlen(subdir);
data/gigalomania-1.0+ds1/utils.cpp:204:3:  [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(application_path, "");
data/gigalomania-1.0+ds1/utils.cpp:234: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).
	int path_len = strlen(path);
data/gigalomania-1.0+ds1/utils.cpp:237: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 len = path_len + strlen(name);
data/gigalomania-1.0+ds1/utils.cpp:243: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).
		int len = path_len + 1 + strlen(name);
data/gigalomania-1.0+ds1/utils.cpp:248: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).
	char *filename = new char[strlen(name)+1];

ANALYSIS SUMMARY:

Hits = 240
Lines analyzed = 26529 in approximately 0.87 seconds (30551 lines/second)
Physical Source Lines of Code (SLOC) = 22317
Hits@level = [0]  14 [1]  32 [2] 166 [3]   5 [4]  37 [5]   0
Hits@level+ = [0+] 254 [1+] 240 [2+] 208 [3+]  42 [4+]  37 [5+]   0
Hits/KSLOC@level+ = [0+] 11.3815 [1+] 10.7541 [2+] 9.32025 [3+] 1.88197 [4+] 1.65793 [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.