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/trackballs-1.3.1/src/animated.cc Examining data/trackballs-1.3.1/src/animated.h Examining data/trackballs-1.3.1/src/animatedCollection.cc Examining data/trackballs-1.3.1/src/animatedCollection.h Examining data/trackballs-1.3.1/src/animator.cc Examining data/trackballs-1.3.1/src/animator.h Examining data/trackballs-1.3.1/src/baby.cc Examining data/trackballs-1.3.1/src/baby.h Examining data/trackballs-1.3.1/src/ball.cc Examining data/trackballs-1.3.1/src/ball.h Examining data/trackballs-1.3.1/src/bird.cc Examining data/trackballs-1.3.1/src/bird.h Examining data/trackballs-1.3.1/src/black.cc Examining data/trackballs-1.3.1/src/black.h Examining data/trackballs-1.3.1/src/cactus.cc Examining data/trackballs-1.3.1/src/cactus.h Examining data/trackballs-1.3.1/src/calibrateJoystickMode.cc Examining data/trackballs-1.3.1/src/calibrateJoystickMode.h Examining data/trackballs-1.3.1/src/colorModifier.cc Examining data/trackballs-1.3.1/src/colorModifier.h Examining data/trackballs-1.3.1/src/cyclicPlatform.cc Examining data/trackballs-1.3.1/src/cyclicPlatform.h Examining data/trackballs-1.3.1/src/debris.cc Examining data/trackballs-1.3.1/src/debris.h Examining data/trackballs-1.3.1/src/diamond.cc Examining data/trackballs-1.3.1/src/diamond.h Examining data/trackballs-1.3.1/src/editMode.cc Examining data/trackballs-1.3.1/src/editMode.h Examining data/trackballs-1.3.1/src/editMode_codes.h Examining data/trackballs-1.3.1/src/editWindows.cc Examining data/trackballs-1.3.1/src/editWindows.h Examining data/trackballs-1.3.1/src/enterHighScoreMode.cc Examining data/trackballs-1.3.1/src/enterHighScoreMode.h Examining data/trackballs-1.3.1/src/flag.cc Examining data/trackballs-1.3.1/src/flag.h Examining data/trackballs-1.3.1/src/font.cc Examining data/trackballs-1.3.1/src/font.h Examining data/trackballs-1.3.1/src/forcefield.cc Examining data/trackballs-1.3.1/src/forcefield.h Examining data/trackballs-1.3.1/src/fountain.cc Examining data/trackballs-1.3.1/src/fountain.h Examining data/trackballs-1.3.1/src/game.cc Examining data/trackballs-1.3.1/src/game.h Examining data/trackballs-1.3.1/src/gameHook.cc Examining data/trackballs-1.3.1/src/gameHook.h Examining data/trackballs-1.3.1/src/gameMode.cc Examining data/trackballs-1.3.1/src/gameMode.h Examining data/trackballs-1.3.1/src/gamer.cc Examining data/trackballs-1.3.1/src/gamer.h Examining data/trackballs-1.3.1/src/general.cc Examining data/trackballs-1.3.1/src/general.h Examining data/trackballs-1.3.1/src/glHelp.cc Examining data/trackballs-1.3.1/src/glHelp.h Examining data/trackballs-1.3.1/src/goal.cc Examining data/trackballs-1.3.1/src/goal.h Examining data/trackballs-1.3.1/src/guile.cc Examining data/trackballs-1.3.1/src/guile.h Examining data/trackballs-1.3.1/src/heightModifier.cc Examining data/trackballs-1.3.1/src/heightModifier.h Examining data/trackballs-1.3.1/src/helpMode.cc Examining data/trackballs-1.3.1/src/helpMode.h Examining data/trackballs-1.3.1/src/highScore.cc Examining data/trackballs-1.3.1/src/highScore.h Examining data/trackballs-1.3.1/src/hofMode.cc Examining data/trackballs-1.3.1/src/hofMode.h Examining data/trackballs-1.3.1/src/mainMode.cc Examining data/trackballs-1.3.1/src/mainMode.h Examining data/trackballs-1.3.1/src/map.cc Examining data/trackballs-1.3.1/src/map.h Examining data/trackballs-1.3.1/src/menuMode.cc Examining data/trackballs-1.3.1/src/menuMode.h Examining data/trackballs-1.3.1/src/menusystem.cc Examining data/trackballs-1.3.1/src/menusystem.h Examining data/trackballs-1.3.1/src/mmad.cc Examining data/trackballs-1.3.1/src/modPill.cc Examining data/trackballs-1.3.1/src/modPill.h Examining data/trackballs-1.3.1/src/myWindow.cc Examining data/trackballs-1.3.1/src/myWindow.h Examining data/trackballs-1.3.1/src/pipe.cc Examining data/trackballs-1.3.1/src/pipe.h Examining data/trackballs-1.3.1/src/pipeConnector.cc Examining data/trackballs-1.3.1/src/pipeConnector.h Examining data/trackballs-1.3.1/src/player.cc Examining data/trackballs-1.3.1/src/player.h Examining data/trackballs-1.3.1/src/scoreSign.cc Examining data/trackballs-1.3.1/src/scoreSign.h Examining data/trackballs-1.3.1/src/settings.cc Examining data/trackballs-1.3.1/src/settings.h Examining data/trackballs-1.3.1/src/settingsMode.cc Examining data/trackballs-1.3.1/src/settingsMode.h Examining data/trackballs-1.3.1/src/setupMode.cc Examining data/trackballs-1.3.1/src/setupMode.h Examining data/trackballs-1.3.1/src/sideSpike.cc Examining data/trackballs-1.3.1/src/sideSpike.h Examining data/trackballs-1.3.1/src/sign.cc Examining data/trackballs-1.3.1/src/sign.h Examining data/trackballs-1.3.1/src/smartTrigger.cc Examining data/trackballs-1.3.1/src/smartTrigger.h Examining data/trackballs-1.3.1/src/sound.cc Examining data/trackballs-1.3.1/src/sound.h Examining data/trackballs-1.3.1/src/sparkle2d.cc Examining data/trackballs-1.3.1/src/sparkle2d.h Examining data/trackballs-1.3.1/src/spike.cc Examining data/trackballs-1.3.1/src/spike.h Examining data/trackballs-1.3.1/src/splash.cc Examining data/trackballs-1.3.1/src/splash.h Examining data/trackballs-1.3.1/src/switch.cc Examining data/trackballs-1.3.1/src/switch.h Examining data/trackballs-1.3.1/src/teleport.cc Examining data/trackballs-1.3.1/src/teleport.h Examining data/trackballs-1.3.1/src/trampoline.cc Examining data/trackballs-1.3.1/src/trampoline.h Examining data/trackballs-1.3.1/src/trigger.cc Examining data/trackballs-1.3.1/src/trigger.h Examining data/trackballs-1.3.1/src/weather.cc Examining data/trackballs-1.3.1/src/weather.h FINAL RESULTS: data/trackballs-1.3.1/src/gamer.cc:71:5: [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(levels[i][0].name, Settings::settings->levelSets[i].startLevelName); data/trackballs-1.3.1/src/gamer.cc:72:5: [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(levels[i][0].fileName, Settings::settings->levelSets[i].startLevel); data/trackballs-1.3.1/src/general.cc:98:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, errmsg, args); data/trackballs-1.3.1/src/general.cc:107:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, errmsg, args); data/trackballs-1.3.1/src/menuMode.cc:122:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "v%s", VERSION); data/trackballs-1.3.1/src/settings.cc:92: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(str, R_OK) != -1) { data/trackballs-1.3.1/src/settings.cc:221: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(setname, R_OK) == -1) { data/trackballs-1.3.1/src/editMode.cc:270:72: [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. snprintf(pathname, sizeof(pathname), "%s/.trackballs/levels/%s.map", getenv("HOME"), name); data/trackballs-1.3.1/src/editMode.cc:273:70: [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. snprintf(mapname, sizeof(mapname), "%s/.trackballs/levels/%s.map", getenv("HOME"), name); data/trackballs-1.3.1/src/editMode.cc:307:52: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs", getenv("HOME")); data/trackballs-1.3.1/src/editMode.cc:309:74: [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. warning("Error, %s/.trackballs is a symbolic link. Cannot save map", getenv("HOME")); data/trackballs-1.3.1/src/editMode.cc:314:59: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/levels", getenv("HOME")); data/trackballs-1.3.1/src/editMode.cc:317:13: [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. getenv("HOME")); data/trackballs-1.3.1/src/editMode.cc:322:74: [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. snprintf(mapname, sizeof(mapname) - 1, "%s/.trackballs/levels/%s.map", getenv("HOME"), data/trackballs-1.3.1/src/editMode.cc:326:13: [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. getenv("HOME"), levelname); data/trackballs-1.3.1/src/editMode.cc:337:64: [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. snprintf(str, sizeof(str), "%s/.trackballs/levels/%s.scm", getenv("HOME"), levelname); data/trackballs-1.3.1/src/editMode.cc:352:57: [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. fprintf(fp, "(set-author \"%s\")\n ;; %s\n", getenv("USER"), data/trackballs-1.3.1/src/editWindows.cc:404:60: [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. snprintf(str, sizeof(str), "%s/.trackballs/levels/%s", getenv("HOME"), data/trackballs-1.3.1/src/editWindows.cc:570:55: [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. snprintf(str, sizeof(str), "%s/.trackballs/levels", getenv("HOME")); data/trackballs-1.3.1/src/game.cc:95:58: [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. snprintf(scmname, 511, "%s/.trackballs/levels/%s.scm", getenv("HOME"), levelname); data/trackballs-1.3.1/src/game.cc:146:74: [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. snprintf(mapname, sizeof(mapname) - 1, "%s/.trackballs/levels/%s.map", getenv("HOME"), name); data/trackballs-1.3.1/src/game.cc:147:74: [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. snprintf(scmname, sizeof(scmname) - 1, "%s/.trackballs/levels/%s.scm", getenv("HOME"), name); data/trackballs-1.3.1/src/gamer.cc:39:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (NULL != getenv("USER")) { data/trackballs-1.3.1/src/gamer.cc:40:30: [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. snprintf(name, 20, "%s", getenv("USER")); data/trackballs-1.3.1/src/gamer.cc:44:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (NULL != getenv("USERNAME")) { snprintf(name, 20, "%s", getenv("USERNAME")); } data/trackballs-1.3.1/src/gamer.cc:44:64: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (NULL != getenv("USERNAME")) { snprintf(name, 20, "%s", getenv("USERNAME")); } data/trackballs-1.3.1/src/gamer.cc:105:52: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs", getenv("HOME")); data/trackballs-1.3.1/src/gamer.cc:107:79: [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. warning("Error, %s/.trackballs is a symbolic link. Cannot save settings", getenv("HOME")); data/trackballs-1.3.1/src/gamer.cc:111:59: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/%s.gmr", getenv("HOME"), name); data/trackballs-1.3.1/src/gamer.cc:114:13: [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. getenv("HOME"), name); data/trackballs-1.3.1/src/gamer.cc:148:59: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/%s.gmr", getenv("HOME"), name); data/trackballs-1.3.1/src/gamer.cc:244:52: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs", getenv("HOME")); data/trackballs-1.3.1/src/highScore.cc:50:16: [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. getenv("HOME")); data/trackballs-1.3.1/src/highScore.cc:52:73: [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. snprintf(highScorePath, sizeof(highScorePath), "%s%s/highScores", getenv("HOME"), data/trackballs-1.3.1/src/mmad.cc:310:19: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. next_option = getopt(argc, argv, short_options); data/trackballs-1.3.1/src/mmad.cc:312:19: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. next_option = getopt_long(argc, argv, short_options, long_options, NULL); data/trackballs-1.3.1/src/mmad.cc:431:76: [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. snprintf(mapname, sizeof(mapname) - 1, "%s/.trackballs/levels/%s.map", getenv("HOME"), data/trackballs-1.3.1/src/mmad.cc:476:3: [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/trackballs-1.3.1/src/mmad.cc:625:16: [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 *evar = getenv("TRACKBALLS"); data/trackballs-1.3.1/src/mmad.cc:674:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (NULL == getenv("GUILE_LOAD_PATH")) { data/trackballs-1.3.1/src/mmad.cc:681:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (NULL == getenv("HOME")) { data/trackballs-1.3.1/src/settings.cc:91:61: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/settings", getenv("HOME")); data/trackballs-1.3.1/src/settings.cc:186:59: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/levels", getenv("HOME")); data/trackballs-1.3.1/src/settings.cc:193:68: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/levels/%s", getenv("HOME"), data/trackballs-1.3.1/src/settings.cc:306:52: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs", getenv("HOME")); data/trackballs-1.3.1/src/settings.cc:313:61: [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. snprintf(str, sizeof(str) - 1, "%s/.trackballs/settings", getenv("HOME")); data/trackballs-1.3.1/src/sound.cc:134:15: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int r = random() % hasMusicPreferences; data/trackballs-1.3.1/src/sound.cc:145:11: [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. i = random() % n_songs; data/trackballs-1.3.1/src/calibrateJoystickMode.cc:96: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 str[512]; data/trackballs-1.3.1/src/calibrateJoystickMode.cc:117: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 *stages[5] = {_("Center joystick"), _("Move joystick left"), _("Move joystick right"), data/trackballs-1.3.1/src/editMode.cc:261: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 mapname[512]; data/trackballs-1.3.1/src/editMode.cc:304: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 mapname[768]; data/trackballs-1.3.1/src/editMode.cc:305: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 str[768]; data/trackballs-1.3.1/src/editMode.cc:345:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(str, "wb"); data/trackballs-1.3.1/src/editMode.h:75: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 levelname[256]; data/trackballs-1.3.1/src/editMode.h:76: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 pathname[256]; data/trackballs-1.3.1/src/editMode_codes.h:133:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char *cMenuNames[N_SUBMENUS]; data/trackballs-1.3.1/src/editMode_codes.h:134:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char *cMenuEntries[N_SUBMENUS][MAX_MENU_ENTRIES]; data/trackballs-1.3.1/src/editMode_codes.h:135:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char *cKeyShortcuts[N_SUBMENUS]; data/trackballs-1.3.1/src/editWindows.cc:51: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 str[256]; data/trackballs-1.3.1/src/editWindows.cc:118: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 str[256]; data/trackballs-1.3.1/src/editWindows.cc:191: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 str[512]; data/trackballs-1.3.1/src/editWindows.cc:396: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 str[512]; data/trackballs-1.3.1/src/editWindows.cc:523: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 str[256]; data/trackballs-1.3.1/src/editWindows.cc:562: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 str[512]; data/trackballs-1.3.1/src/editWindows.h:120: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 names[200][256]; data/trackballs-1.3.1/src/editWindows.h:134: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 name[256]; data/trackballs-1.3.1/src/enterHighScoreMode.cc:70: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 str[256]; data/trackballs-1.3.1/src/enterHighScoreMode.h:40: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 name[20]; data/trackballs-1.3.1/src/game.cc:62: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 scmname[256]; data/trackballs-1.3.1/src/game.cc:91: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 scmname[512]; data/trackballs-1.3.1/src/game.cc:126: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 mapname[256]; data/trackballs-1.3.1/src/game.cc:127: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 scmname[256]; data/trackballs-1.3.1/src/game.h:77: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 levelName[256]; data/trackballs-1.3.1/src/game.h:78: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 nextLevel[256]; data/trackballs-1.3.1/src/game.h:79: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 returnLevel[256]; /* When returning from bonus levels */ data/trackballs-1.3.1/src/gamer.cc:101: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 str[256]; data/trackballs-1.3.1/src/gamer.cc:146: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 str[256]; data/trackballs-1.3.1/src/gamer.cc:211:13: [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 *keys[7] = {"color", "texture", "total-score", "levels-completed", data/trackballs-1.3.1/src/gamer.cc:241: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 str[256]; data/trackballs-1.3.1/src/gamer.h:26: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 name[64]; data/trackballs-1.3.1/src/gamer.h:27: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 fileName[64]; data/trackballs-1.3.1/src/gamer.h:41: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 name[20]; data/trackballs-1.3.1/src/gamer.h:45: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 names[256][20]; // possible names for gamers data/trackballs-1.3.1/src/general.cc:44:14: [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 *fp = fopen(name, "rb"); data/trackballs-1.3.1/src/general.cc:93: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 errmsg[256]; data/trackballs-1.3.1/src/general.cc:102: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 errmsg[256]; data/trackballs-1.3.1/src/glHelp.cc:119: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 *textureNames[GLHELP_MAX_TEXTURES] = {NULL}; data/trackballs-1.3.1/src/glHelp.cc:133: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 string[256]; data/trackballs-1.3.1/src/glHelp.cc:232:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/trackballs-1.3.1/src/glHelp.cc:907: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 name[1024]; data/trackballs-1.3.1/src/glHelp.cc:914:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(name, "r")) == NULL) { data/trackballs-1.3.1/src/glHelp.cc:948:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(linebuffer, &buffer[i * screenWidth * 4], screenWidth * 4); data/trackballs-1.3.1/src/glHelp.cc:949:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&buffer[i * screenWidth * 4], &buffer[(screenHeight - 1 - i) * screenWidth * 4], data/trackballs-1.3.1/src/glHelp.cc:951:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&buffer[(screenHeight - 1 - i) * screenWidth * 4], linebuffer, screenWidth * 4); data/trackballs-1.3.1/src/glHelp.cc:1035: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 str[256]; data/trackballs-1.3.1/src/glHelp.cc:1061: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 str[256]; data/trackballs-1.3.1/src/glHelp.cc:1214:16: [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 *fptr = fopen(filename, "rb"); data/trackballs-1.3.1/src/glHelp.cc:1228: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 path[256]; data/trackballs-1.3.1/src/glHelp.cc:1321: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 slow[256]; data/trackballs-1.3.1/src/glHelp.cc:1322: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 fast[256]; data/trackballs-1.3.1/src/glHelp.cc:1574: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 path[512]; data/trackballs-1.3.1/src/glHelp.h:199:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char *textureNames[256]; // the names of preloaded textures data/trackballs-1.3.1/src/goal.h:36: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 nextLevel[256]; data/trackballs-1.3.1/src/highScore.cc:33:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char highScorePath[256]; data/trackballs-1.3.1/src/highScore.h:32: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 names[256][10][25]; data/trackballs-1.3.1/src/hofMode.cc:81: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 str[256]; data/trackballs-1.3.1/src/mainMode.cc:171:13: [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 *lp[3], *rp[3]; data/trackballs-1.3.1/src/mainMode.cc:195: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. char str[256]; data/trackballs-1.3.1/src/mainMode.cc:263:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/trackballs-1.3.1/src/mainMode.cc:570:9: [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 *fieldNames[3] = {_("Lives"), _("Score"), _("Time left")}; data/trackballs-1.3.1/src/mainMode.cc:595: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 str[256]; data/trackballs-1.3.1/src/mainMode.cc:629: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 left[16][256]; data/trackballs-1.3.1/src/mainMode.cc:630: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 right[16][256]; data/trackballs-1.3.1/src/mainMode.cc:631:9: [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 *left_pointers[16]; data/trackballs-1.3.1/src/mainMode.cc:632:9: [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 *right_pointers[16]; data/trackballs-1.3.1/src/map.cc:163: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. char textureName[64]; data/trackballs-1.3.1/src/map.cc:258:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data[i * size * size * 4], proj->pixels, size * size * 4); data/trackballs-1.3.1/src/map.cc:1163: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 textureName[64]; data/trackballs-1.3.1/src/map.h:131: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 mapname[256], author[256]; data/trackballs-1.3.1/src/menuMode.cc:73: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 str[256]; data/trackballs-1.3.1/src/menuMode.cc:194: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 str[256]; data/trackballs-1.3.1/src/mmad.cc:72: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 effectiveShareDir[256]; data/trackballs-1.3.1/src/mmad.cc:143: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[1024]; data/trackballs-1.3.1/src/mmad.cc:204: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 str[256]; data/trackballs-1.3.1/src/mmad.cc:218:9: [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 *options[12][2] = { data/trackballs-1.3.1/src/mmad.cc:235:9: [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 *shortcuts[5][2] = {{_("Escape"), _("Soft quit")}, data/trackballs-1.3.1/src/mmad.cc:242: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 whitespace[64]; data/trackballs-1.3.1/src/mmad.cc:263: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 str[256]; data/trackballs-1.3.1/src/mmad.cc:339:40: [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). if (screenResolutions[i][0] == atoi(optarg)) break; data/trackballs-1.3.1/src/mmad.cc:343:9: [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 estr[256]; data/trackballs-1.3.1/src/mmad.cc:379: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 str[256]; data/trackballs-1.3.1/src/mmad.cc:429: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 mapname[512]; data/trackballs-1.3.1/src/mmad.cc:630: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 thisDir[256]; data/trackballs-1.3.1/src/mmad.cc:675: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 guileLoadPath[256 + 16]; /*longest effective share directory plus"GUILE_LOAD_PATH="*/ data/trackballs-1.3.1/src/mmad.cc:682: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 homePath[MAX_PATH]; data/trackballs-1.3.1/src/mmad.cc:683: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 homeEnv[MAX_PATH + 5]; data/trackballs-1.3.1/src/mmad.cc:696: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 localedir[512]; data/trackballs-1.3.1/src/modPill.cc:100:13: [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 *modExplanations[NUM_MODS] = { data/trackballs-1.3.1/src/scoreSign.cc:58:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/trackballs-1.3.1/src/settings.cc:90: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 str[256]; data/trackballs-1.3.1/src/settings.cc:110:13: [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 *intkeys[intnum] = { data/trackballs-1.3.1/src/settings.cc:124:13: [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 *realkeys[realnum] = {"sfx-volume", "music-volume", "mouse-sensitivity"}; data/trackballs-1.3.1/src/settings.cc:161: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 str[512]; data/trackballs-1.3.1/src/settings.cc:287: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 imagename[256]; data/trackballs-1.3.1/src/settings.cc:292: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 *fp2 = fopen(setname, "r"); data/trackballs-1.3.1/src/settings.cc:304: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 str[256]; data/trackballs-1.3.1/src/settings.cc:320:14: [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 *fp = fopen(str, "w"); data/trackballs-1.3.1/src/settings.cc:434: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 localedir[512]; data/trackballs-1.3.1/src/settings.h:35: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 path[256]; data/trackballs-1.3.1/src/settings.h:36: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 name[256]; data/trackballs-1.3.1/src/settings.h:37: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 startLevel[256]; data/trackballs-1.3.1/src/settings.h:38: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 startLevelName[256]; data/trackballs-1.3.1/src/settings.h:39: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 description[5][120]; data/trackballs-1.3.1/src/settings.h:40: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 imagename[256]; data/trackballs-1.3.1/src/settings.h:76: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 specialLevel[256]; data/trackballs-1.3.1/src/settingsMode.cc:93: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 str[256]; data/trackballs-1.3.1/src/setupMode.cc:193: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 str[256]; data/trackballs-1.3.1/src/sound.cc:32: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 *wavs[MAX_EFFECTS]; data/trackballs-1.3.1/src/sound.cc:38: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 *songName[MAX_SONGS]; data/trackballs-1.3.1/src/sound.cc:41: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 musicPreferences[MAX_SONGS]; data/trackballs-1.3.1/src/sound.cc:46: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 str[512]; data/trackballs-1.3.1/src/editMode.cc:266:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelname, name, sizeof(levelname)); data/trackballs-1.3.1/src/editWindows.cc:493:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/trackballs-1.3.1/src/editWindows.cc:497:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/trackballs-1.3.1/src/editWindows.cc:576:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/editWindows.cc:577:35: [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). (strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".map") == 0)) { data/trackballs-1.3.1/src/editWindows.cc:578:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, dirent->d_name, sizeof(str)); data/trackballs-1.3.1/src/editWindows.cc:579: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). str[strlen(str) - 4] = 0; /* Remove .map ending */ data/trackballs-1.3.1/src/editWindows.cc:580:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(names[nNames++], str, 256); data/trackballs-1.3.1/src/editWindows.cc:596:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/editWindows.cc:597:35: [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). (strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".map") == 0)) { data/trackballs-1.3.1/src/editWindows.cc:598:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, dirent->d_name, sizeof(str)); data/trackballs-1.3.1/src/editWindows.cc:599: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). str[strlen(str) - 4] = 0; /* Remove .map ending */ data/trackballs-1.3.1/src/editWindows.cc:603:26: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (i == nNames) strncpy(names[nNames++], str, 256); data/trackballs-1.3.1/src/enterHighScoreMode.cc:81: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(name); data/trackballs-1.3.1/src/font.cc:31:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((text == NULL) || (strlen(text) == 0)) return (0); data/trackballs-1.3.1/src/font.cc:46:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((text == NULL) || (strlen(text) == 0)) return 0; data/trackballs-1.3.1/src/font.cc:55:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((text == NULL) || (strlen(text) == 0)) return 0; data/trackballs-1.3.1/src/font.cc:64:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((text == NULL) || (strlen(text) == 0)) return 0; data/trackballs-1.3.1/src/gamer.cc:37:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(name, _("John Doe"), sizeof(name)); data/trackballs-1.3.1/src/gamer.cc:54:19: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (nNames > 0) strncpy(name, names[0], 20); data/trackballs-1.3.1/src/gamer.cc:84:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levels[Game::current->currentLevelSet][i].fileName, level, 64); data/trackballs-1.3.1/src/gamer.cc:85:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levels[Game::current->currentLevelSet][i].name, Game::current->map->mapname, 64); data/trackballs-1.3.1/src/gamer.cc:92:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levels[Game::current->currentLevelSet][i].fileName, level, 64); data/trackballs-1.3.1/src/gamer.cc:93:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levels[Game::current->currentLevelSet][i].name, Game::current->map->mapname, 64); data/trackballs-1.3.1/src/gamer.cc:204:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levels[levelSet][i].fileName[0], fname, 64); data/trackballs-1.3.1/src/gamer.cc:205:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levels[levelSet][i].name[0], tname, 64); data/trackballs-1.3.1/src/gamer.cc:249:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/gamer.cc:250:34: [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). strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".gmr") == 0) { data/trackballs-1.3.1/src/gamer.cc:251:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(dirent->d_name); data/trackballs-1.3.1/src/glHelp.cc:189:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inf.string, string, 255); data/trackballs-1.3.1/src/goal.cc:28:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(this->nextLevel, nextLevel, sizeof(this->nextLevel)); data/trackballs-1.3.1/src/goal.cc:35:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Game::current->nextLevel, nextLevel, sizeof(Game::current->nextLevel)); data/trackballs-1.3.1/src/guile.cc:475:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(sname) > 0) { data/trackballs-1.3.1/src/guile.cc:1145:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(sname) > 0) { data/trackballs-1.3.1/src/guile.cc:1163:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Game::current->map->mapname, sname, 255); data/trackballs-1.3.1/src/guile.cc:1178:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Game::current->map->author, sname, 255); data/trackballs-1.3.1/src/highScore.cc:112:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&names[levelSet][i][0], lname, 25); data/trackballs-1.3.1/src/highScore.cc:141:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(names[levelSet][j], names[levelSet][j - 1], sizeof(names[levelSet][j])); data/trackballs-1.3.1/src/highScore.cc:145:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(names[levelSet][i], name, sizeof(names[levelSet][i])); data/trackballs-1.3.1/src/mainMode.cc:173:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(Game::current->map->mapname)) { data/trackballs-1.3.1/src/mainMode.cc:179:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(Game::current->map->author)) { data/trackballs-1.3.1/src/mainMode.cc:657:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Game::current->nextLevel, Game::current->returnLevel, data/trackballs-1.3.1/src/map.cc:1165:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(textureName, textureNames[i], 63); data/trackballs-1.3.1/src/mmad.cc:241: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). for (int i = 0; i < 5; i++) mxlen = std::max(strlen(shortcuts[i][0]), mxlen); data/trackballs-1.3.1/src/mmad.cc:245: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). whitespace[mxlen - strlen(shortcuts[i][0])] = 0; data/trackballs-1.3.1/src/mmad.cc:251:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(effectiveShareDir)) return 0; data/trackballs-1.3.1/src/mmad.cc:254:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (int i = strlen(effectiveShareDir) - 1; i >= 0; i--) data/trackballs-1.3.1/src/mmad.cc:626:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (evar && strlen(evar) > 0) data/trackballs-1.3.1/src/mmad.cc:634:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = strlen(thisDir) - 1; i >= 0; i--) data/trackballs-1.3.1/src/mmad.cc:686:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (int i = strlen(homeEnv) - 1; i >= 0; i--) data/trackballs-1.3.1/src/settings.cc:175:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/settings.cc:176:34: [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). strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".set") == 0) { data/trackballs-1.3.1/src/settings.cc:191:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/settings.cc:192:34: [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). strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".set") == 0) { data/trackballs-1.3.1/src/settings.cc:209:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelSets[nLevelSets].path, shortname, 256); data/trackballs-1.3.1/src/settings.cc:242: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 len = strlen(eval); data/trackballs-1.3.1/src/settings.cc:255:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelSets[nLevelSets].name, eval, 256); data/trackballs-1.3.1/src/settings.cc:258:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelSets[nLevelSets].startLevel, eval, 256); data/trackballs-1.3.1/src/settings.cc:261:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelSets[nLevelSets].startLevelName, eval, 256); data/trackballs-1.3.1/src/settings.cc:264:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levelSets[nLevelSets].description[0][0], eval, 120); data/trackballs-1.3.1/src/settings.cc:267:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levelSets[nLevelSets].description[1][0], eval, 120); data/trackballs-1.3.1/src/settings.cc:270:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levelSets[nLevelSets].description[2][0], eval, 120); data/trackballs-1.3.1/src/settings.cc:273:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levelSets[nLevelSets].description[3][0], eval, 120); data/trackballs-1.3.1/src/settings.cc:276:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&levelSets[nLevelSets].description[4][0], eval, 120); data/trackballs-1.3.1/src/settings.cc:288:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(imagename, setname, sizeof(imagename)); data/trackballs-1.3.1/src/settings.cc:290:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(imagename + strlen(imagename) - 4, ".jpg", sizeof(imagename) - strlen(imagename)); data/trackballs-1.3.1/src/settings.cc:290:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(imagename + strlen(imagename) - 4, ".jpg", sizeof(imagename) - strlen(imagename)); data/trackballs-1.3.1/src/settings.cc:290:74: [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). strncpy(imagename + strlen(imagename) - 4, ".jpg", sizeof(imagename) - strlen(imagename)); data/trackballs-1.3.1/src/settings.cc:297:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(levelSets[nLevelSets].imagename, imagename, sizeof(levelSets[nLevelSets].imagename)); data/trackballs-1.3.1/src/settingsMode.cc:227:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) < 15) data/trackballs-1.3.1/src/setupMode.cc:226: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). else if (strlen(gamer->levels[levelSet][level].name)) data/trackballs-1.3.1/src/setupMode.cc:263:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(settings->levelSets[levelSet].description[lineno])) { data/trackballs-1.3.1/src/setupMode.cc:281: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(gamer->name); data/trackballs-1.3.1/src/setupMode.cc:401:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gamer->name, gamer->names[name], 20); data/trackballs-1.3.1/src/sound.cc:65:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/sound.cc:66:35: [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). (strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".wav") == 0)) { data/trackballs-1.3.1/src/sound.cc:84:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) > 4 && data/trackballs-1.3.1/src/sound.cc:85:35: [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). (strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".ogg") == 0 || data/trackballs-1.3.1/src/sound.cc:86:35: [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). strcmp(&dirent->d_name[strlen(dirent->d_name) - 4], ".mp3") == 0)) { ANALYSIS SUMMARY: Hits = 241 Lines analyzed = 22887 in approximately 0.72 seconds (31997 lines/second) Physical Source Lines of Code (SLOC) = 17055 Hits@level = [0] 206 [1] 79 [2] 114 [3] 41 [4] 7 [5] 0 Hits@level+ = [0+] 447 [1+] 241 [2+] 162 [3+] 48 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 26.2093 [1+] 14.1308 [2+] 9.49868 [3+] 2.81442 [4+] 0.410437 [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.