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/openjazz-20190106/src/OpenJazz.h Examining data/openjazz-20190106/src/game/game.cpp Examining data/openjazz-20190106/src/game/game.h Examining data/openjazz-20190106/src/game/gamemode.cpp Examining data/openjazz-20190106/src/game/gamemode.h Examining data/openjazz-20190106/src/game/localgame.cpp Examining data/openjazz-20190106/src/game/clientgame.cpp Examining data/openjazz-20190106/src/game/servergame.cpp Examining data/openjazz-20190106/src/io/controls.cpp Examining data/openjazz-20190106/src/io/controls.h Examining data/openjazz-20190106/src/io/file.cpp Examining data/openjazz-20190106/src/io/file.h Examining data/openjazz-20190106/src/io/gfx/anim.cpp Examining data/openjazz-20190106/src/io/gfx/anim.h Examining data/openjazz-20190106/src/io/gfx/font.cpp Examining data/openjazz-20190106/src/io/gfx/font.h Examining data/openjazz-20190106/src/io/gfx/scale2x/getopt.cpp Examining data/openjazz-20190106/src/io/gfx/scale2x/pixel.cpp Examining data/openjazz-20190106/src/io/gfx/scale2x/pixel.h Examining data/openjazz-20190106/src/io/gfx/scale2x/portable.h Examining data/openjazz-20190106/src/io/gfx/scale2x/scale2x.cpp Examining data/openjazz-20190106/src/io/gfx/scale2x/scale2x.h Examining data/openjazz-20190106/src/io/gfx/scale2x/scale3x.cpp Examining data/openjazz-20190106/src/io/gfx/scale2x/scale3x.h Examining data/openjazz-20190106/src/io/gfx/scale2x/scalebit.cpp Examining data/openjazz-20190106/src/io/gfx/scale2x/scalebit.h Examining data/openjazz-20190106/src/io/gfx/scale2x/simple2x.cpp Examining data/openjazz-20190106/src/io/gfx/sprite.cpp Examining data/openjazz-20190106/src/io/gfx/sprite.h Examining data/openjazz-20190106/src/io/gfx/paletteeffects.cpp Examining data/openjazz-20190106/src/io/gfx/paletteeffects.h Examining data/openjazz-20190106/src/io/gfx/video.cpp Examining data/openjazz-20190106/src/io/gfx/video.h Examining data/openjazz-20190106/src/io/network.cpp Examining data/openjazz-20190106/src/io/network.h Examining data/openjazz-20190106/src/io/sound.cpp Examining data/openjazz-20190106/src/io/sound.h Examining data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevel.h Examining data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevelplayer/jj1bonuslevelplayer.cpp Examining data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevelplayer/jj1bonuslevelplayer.h Examining data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevel.cpp Examining data/openjazz-20190106/src/jj1level/jj1bullet.cpp Examining data/openjazz-20190106/src/jj1level/jj1bullet.h Examining data/openjazz-20190106/src/jj1level/jj1event/jj1bridge.cpp Examining data/openjazz-20190106/src/jj1level/jj1event/jj1event.cpp Examining data/openjazz-20190106/src/jj1level/jj1event/jj1event.h Examining data/openjazz-20190106/src/jj1level/jj1event/jj1guardians.cpp Examining data/openjazz-20190106/src/jj1level/jj1event/jj1guardians.h Examining data/openjazz-20190106/src/jj1level/jj1event/jj1standardevent.cpp Examining data/openjazz-20190106/src/jj1level/jj1levelframe.cpp Examining data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1bird.cpp Examining data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1bird.h Examining data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1levelplayer.h Examining data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1levelplayer.cpp Examining data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1levelplayerframe.cpp Examining data/openjazz-20190106/src/jj1level/jj1demolevel.cpp Examining data/openjazz-20190106/src/jj1level/jj1level.h Examining data/openjazz-20190106/src/jj1level/jj1level.cpp Examining data/openjazz-20190106/src/jj1level/jj1levelload.cpp Examining data/openjazz-20190106/src/jj1planet/jj1planet.cpp Examining data/openjazz-20190106/src/jj1planet/jj1planet.h Examining data/openjazz-20190106/src/jj1scene/jj1scene.cpp Examining data/openjazz-20190106/src/jj1scene/jj1scene.h Examining data/openjazz-20190106/src/jj1scene/jj1sceneload.cpp Examining data/openjazz-20190106/src/jj2level/jj2event/jj2event.cpp Examining data/openjazz-20190106/src/jj2level/jj2event/jj2event.h Examining data/openjazz-20190106/src/jj2level/jj2event/jj2eventframe.cpp Examining data/openjazz-20190106/src/jj2level/jj2layer.cpp Examining data/openjazz-20190106/src/jj2level/jj2level.cpp Examining data/openjazz-20190106/src/jj2level/jj2level.h Examining data/openjazz-20190106/src/jj2level/jj2levelframe.cpp Examining data/openjazz-20190106/src/jj2level/jj2levelload.cpp Examining data/openjazz-20190106/src/jj2level/jj2levelplayer/jj2levelplayer.cpp Examining data/openjazz-20190106/src/jj2level/jj2levelplayer/jj2levelplayer.h Examining data/openjazz-20190106/src/jj2level/jj2levelplayer/jj2levelplayerframe.cpp Examining data/openjazz-20190106/src/level/level.h Examining data/openjazz-20190106/src/level/levelplayer.cpp Examining data/openjazz-20190106/src/level/levelplayer.h Examining data/openjazz-20190106/src/level/movable.cpp Examining data/openjazz-20190106/src/level/movable.h Examining data/openjazz-20190106/src/level/level.cpp Examining data/openjazz-20190106/src/menu/menu.cpp Examining data/openjazz-20190106/src/menu/menu.h Examining data/openjazz-20190106/src/menu/plasma.cpp Examining data/openjazz-20190106/src/menu/plasma.h Examining data/openjazz-20190106/src/menu/setupmenu.cpp Examining data/openjazz-20190106/src/menu/gamemenu.cpp Examining data/openjazz-20190106/src/menu/mainmenu.cpp Examining data/openjazz-20190106/src/platforms/symbian.cpp Examining data/openjazz-20190106/src/platforms/wiz.cpp Examining data/openjazz-20190106/src/platforms/wiz.h Examining data/openjazz-20190106/src/player/player.cpp Examining data/openjazz-20190106/src/player/player.h Examining data/openjazz-20190106/src/setup.h Examining data/openjazz-20190106/src/util.cpp Examining data/openjazz-20190106/src/util.h Examining data/openjazz-20190106/src/setup.cpp Examining data/openjazz-20190106/src/loop.h Examining data/openjazz-20190106/src/main.cpp FINAL RESULTS: data/openjazz-20190106/src/main.cpp:123:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buffer, "/openjazz/", sizeof(buffer)); data/openjazz-20190106/src/main.cpp:128:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buffer, "/openjazz/", sizeof(buffer)); data/openjazz-20190106/src/main.cpp:289:3: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(alertBuffer, buffer, sizeof(alertBuffer)); data/openjazz-20190106/src/io/gfx/video.cpp:377: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(windowTitle, titleBase); data/openjazz-20190106/src/io/gfx/video.cpp:382:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(windowTitle, title); data/openjazz-20190106/src/jj1level/jj1levelload.cpp:494: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(levelname, string); data/openjazz-20190106/src/jj1level/jj1levelload.cpp:526:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(levelname, ext); data/openjazz-20190106/src/util.cpp:121: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(cloned, string); data/openjazz-20190106/src/util.cpp:141: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(concatenated, first); data/openjazz-20190106/src/util.cpp:142:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(concatenated, second); data/openjazz-20190106/src/util.cpp:164: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, type); data/openjazz-20190106/src/util.cpp:191: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, type); data/openjazz-20190106/src/util.cpp:193: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 + pos, extension); data/openjazz-20190106/src/util.cpp:217: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, type); data/openjazz-20190106/src/util.cpp:242: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(cloned, string); data/openjazz-20190106/src/io/gfx/scale2x/getopt.cpp:35:5: [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. int getopt(int nargc, char *const nargv[], char *ostr) data/openjazz-20190106/src/io/gfx/scale2x/portable.h:40:5: [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. int getopt(int argc, char * const *argv, const char *options); data/openjazz-20190106/src/main.cpp:195:47: [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. firstPath = new Path(firstPath, createString(getenv("HOME"), "\\")); data/openjazz-20190106/src/main.cpp:197:47: [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. firstPath = new Path(firstPath, createString(getenv("HOME"), "/.openjazz/")); data/openjazz-20190106/src/game/clientgame.cpp:50: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 buffer[BUFFER_LENGTH]; data/openjazz-20190106/src/game/clientgame.cpp:180:2: [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 + 5, setup.characterCols, 4); data/openjazz-20190106/src/game/clientgame.cpp:181:2: [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 + 9, setup.characterName, strlen(setup.characterName) + 1); data/openjazz-20190106/src/game/clientgame.cpp:336: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 sendBuffer[BUFFER_LENGTH]; data/openjazz-20190106/src/game/clientgame.cpp:454:8: [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(static_cast<void*>(players + count), players + count + 1, data/openjazz-20190106/src/game/clientgame.cpp:559: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 buffer[MTL_G_SCORE]; data/openjazz-20190106/src/game/clientgame.cpp:580: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 buffer[MTL_G_CHECK]; data/openjazz-20190106/src/game/game.h:163: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 recvBuffers[MAX_CLIENTS][BUFFER_LENGTH]; ///< Array of buffers containing data received from clients data/openjazz-20190106/src/game/game.h:187: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 recvBuffer[BUFFER_LENGTH]; ///< Buffer containing data received from server data/openjazz-20190106/src/game/servergame.cpp:222: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 sendBuffer[BUFFER_LENGTH]; data/openjazz-20190106/src/game/servergame.cpp:250:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sendBuffer + 4, levelData + clientStatus[count], length); data/openjazz-20190106/src/game/servergame.cpp:304:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)(recvBuffers[count]) + 9, data/openjazz-20190106/src/game/servergame.cpp:424:7: [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(sendBuffer + 5, players[pcount].getCols(), PCOLOURS); data/openjazz-20190106/src/game/servergame.cpp:425:7: [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(sendBuffer + 9, players[pcount].getName(), strlen(players[pcount].getName()) + 1); data/openjazz-20190106/src/game/servergame.cpp:458:8: [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(static_cast<void*>(players + pcount), players + pcount + 1, sizeof(Player)); data/openjazz-20190106/src/game/servergame.cpp:514: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 buffer[MTL_G_SCORE]; data/openjazz-20190106/src/game/servergame.cpp:543: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 buffer[MTL_G_CHECK]; data/openjazz-20190106/src/io/file.cpp:58:7: [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 (open(path->path, name, write)) return; data/openjazz-20190106/src/io/file.cpp:95:12: [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 File::open (const char* path, const char* name, bool write) { data/openjazz-20190106/src/io/file.cpp:105:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(filePath, write ? "wb": "rb"); data/openjazz-20190106/src/io/file.cpp:118: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 = fopen(filePath, write ? "wb": "rb"); data/openjazz-20190106/src/io/file.cpp:134: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 = fopen(filePath, write ? "wb": "rb"); data/openjazz-20190106/src/io/file.h:44: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 (const char* path, const char* name, bool write); data/openjazz-20190106/src/io/gfx/font.cpp:177:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(chrPixels + (y * 8), pixels + (count * 8) + (y * SW), 8); data/openjazz-20190106/src/io/gfx/font.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 map[128]; ///< Maps ASCII values to symbol indices data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:457:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first + count, data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:537:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first, skyPalette + count, data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:539:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first + (255 - count), skyPalette, data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:544:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first, skyPalette + count, data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:601:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first + (count << 3) + j, data/openjazz-20190106/src/io/gfx/paletteeffects.cpp:659:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette + first + count, data/openjazz-20190106/src/io/gfx/video.cpp:69:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(((unsigned char *)(ret->pixels)) + (ret->pitch * y), data/openjazz-20190106/src/io/gfx/video.cpp:381:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(windowTitle, " - "); data/openjazz-20190106/src/io/gfx/video.cpp:540:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(shownPalette, currentPalette, sizeof(SDL_Color) * 256); data/openjazz-20190106/src/io/network.cpp:354:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return ::send(sock, (char *)buffer, buffer[0], MSG_NOSIGNAL); data/openjazz-20190106/src/io/network.cpp:356:43: [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. return SDLNet_TCP_Send((TCPsocket)sock, (char *)buffer, buffer[0]); data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevel.cpp:155:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (count = 0; count < 20; count++) memcpy(sorted + (count * 512), pixels + (count * 832), 512); data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevel.h:67: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 mask[60][64]; ///< Tile masks (at most 60 tiles, all with 8 * 8 masks) data/openjazz-20190106/src/jj1bonuslevel/jj1bonuslevelplayer/jj1bonuslevelplayer.cpp:63:2: [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(anims, newAnims, BPANIMS * sizeof(Anim*)); data/openjazz-20190106/src/jj1level/jj1bullet.cpp:81:39: [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. sprite = level->getSprite(((unsigned char *)set)[B_SPRITE + direction]); data/openjazz-20190106/src/jj1level/jj1level.cpp:251: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 buffer[MTL_L_PROP]; data/openjazz-20190106/src/jj1level/jj1level.cpp:282: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 buffer[MTL_L_GRID]; data/openjazz-20190106/src/jj1level/jj1level.cpp:373: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 buffer[MTL_L_GRID]; data/openjazz-20190106/src/jj1level/jj1level.cpp:413: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 buffer[MTL_L_GRID]; data/openjazz-20190106/src/jj1level/jj1level.cpp:543: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 buffer[MTL_L_PROP]; data/openjazz-20190106/src/jj1level/jj1level.h:137: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 anims[6]; ///< Indices of animations data/openjazz-20190106/src/jj1level/jj1level.h:187: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 miscAnims[JJ1MANIMS]; ///< Further animations data/openjazz-20190106/src/jj1level/jj1level.h:188: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 playerAnims[JJ1PANIMS]; ///< Default player animations data/openjazz-20190106/src/jj1level/jj1level.h:189:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. signed char bulletSet[BULLETS][BLENGTH]; ///< Bullet types data/openjazz-20190106/src/jj1level/jj1level.h: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 mask[240][64]; ///< Tile masks. At most 240 tiles, all with 8 * 8 masks data/openjazz-20190106/src/jj1level/jj1levelload.cpp:719:35: [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. path[type].x[count] = ((signed char *)buffer)[(type << 9) + (count << 1) + 3] << 2; data/openjazz-20190106/src/jj1level/jj1levelload.cpp:720:35: [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. path[type].y[count] = ((signed char *)buffer)[(type << 9) + (count << 1) + 2]; data/openjazz-20190106/src/jj1level/jj1levelload.cpp:928:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bulletSet[count], buffer + (count * BLENGTH), BLENGTH); data/openjazz-20190106/src/jj1level/jj1levelplayer/jj1levelplayer.cpp:66:2: [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(anims, newAnims, JJ1PANIMS * sizeof(Anim *)); data/openjazz-20190106/src/jj1scene/jj1sceneload.cpp:110:6: [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(nextPixel, nextData, fillWidth); data/openjazz-20190106/src/jj1scene/jj1sceneload.cpp:116:37: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (nextPixel - 320 >= pixels) memcpy(nextPixel, nextPixel - 320, fillWidth); data/openjazz-20190106/src/jj2level/jj2level.cpp:185: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 buffer[MTL_L_PROP]; data/openjazz-20190106/src/jj2level/jj2level.cpp:216: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 buffer[MTL_L_GRID]; data/openjazz-20190106/src/jj2level/jj2level.cpp:324: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 buffer[MTL_L_PROP]; data/openjazz-20190106/src/jj2level/jj2level.h:205: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 playerAnims[JJ2PANIMS]; ///< Player animations data/openjazz-20190106/src/jj2level/jj2levelload.cpp:96: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(pixels + dstPos, compressedPixels + srcPos, rle); data/openjazz-20190106/src/jj2level/jj2levelload.cpp:363:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tileBuffer + (count << 10), bBuffer + createInt(aBuffer + 1028 + (maxTiles << 1) + (count << 2)), 1024); data/openjazz-20190106/src/jj2level/jj2levelload.cpp:556: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 tileQuad[8]; data/openjazz-20190106/src/jj2level/jj2levelload.cpp:687:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if ((x & 3) == 0) memcpy(tileQuad, cBuffer + (quadRefs[x >> 2] << 3), 8); data/openjazz-20190106/src/jj2level/jj2levelplayer/jj2levelplayer.cpp:71:2: [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(anims, newAnims, JJ2PANIMS * sizeof(Anim *)); data/openjazz-20190106/src/jj2level/jj2levelplayer/jj2levelplayer.cpp:72:2: [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(flippedAnims, newFlippedAnims, JJ2PANIMS * sizeof(Anim *)); data/openjazz-20190106/src/level/level.cpp:489: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 buffer[MTL_L_PROP]; data/openjazz-20190106/src/level/level.cpp:522: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 buffer[MTL_L_STAGE]; data/openjazz-20190106/src/main.cpp:73: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 KOpenJazzPath[256]; data/openjazz-20190106/src/main.cpp:118: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[10 + B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; data/openjazz-20190106/src/main.cpp:185:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(firstPath->path, argv[0], count + 1); data/openjazz-20190106/src/main.cpp:286: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 alertBuffer[100+B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH]; data/openjazz-20190106/src/main.cpp:287: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(alertBuffer, "Unable to find game data files!\n" data/openjazz-20190106/src/menu/gamemenu.cpp:201: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. const char *options[4] = {"easy", "medium", "hard", "turbo"}; data/openjazz-20190106/src/menu/gamemenu.cpp:462: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. const char *options[12] = {"episode 1", "episode 2", "episode 3", data/openjazz-20190106/src/menu/gamemenu.cpp:699: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. const char *newGameOptions[6] = {"new single player game", "new co-op game", data/openjazz-20190106/src/menu/setupmenu.cpp:50: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. const char *options[PCONTROLS] = {"up", "down", "left", "right", "jump", "swim up", "fire", "weapon"}; data/openjazz-20190106/src/menu/setupmenu.cpp:140: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. const char *options[PCONTROLS] = {"up", "down", "left", "right", "jump", "swim up", "fire", "weapon"}; data/openjazz-20190106/src/menu/setupmenu.cpp:586:17: [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 unsigned char setupCharacterCols[8] = {PC_GREY, PC_RED, PC_ORANGE, PC_YELLOW, PC_LGREEN, PC_BLUE, PC_SANIM, PC_LANIM}; data/openjazz-20190106/src/platforms/symbian.cpp:30: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 KOpenJazzPath[256]; data/openjazz-20190106/src/platforms/symbian.cpp:100:13: [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). mystdout = fopen("c:\\shared\\openjazz\\stdout.txt","w+"); data/openjazz-20190106/src/platforms/symbian.cpp:101:13: [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). mystderr = fopen("c:\\shared\\openjazz\\stderr.txt","w+"); data/openjazz-20190106/src/platforms/symbian.cpp:103:13: [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). mystdout = fopen("c:\\data\\openjazz\\stdout.txt","w+"); data/openjazz-20190106/src/platforms/symbian.cpp:104:13: [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). mystderr = fopen("c:\\data\\openjazz\\stderr.txt","w+"); data/openjazz-20190106/src/platforms/wiz.cpp:49: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). unsigned long soundDev = open("/dev/mixer", O_RDWR); data/openjazz-20190106/src/player/player.cpp:108:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cols, playerCols, PCOLOURS); data/openjazz-20190106/src/player/player.h:95: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 cols[PCOLOURS]; ///< Character colours data/openjazz-20190106/src/setup.h:42: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 characterCols[PCOLOURS]; data/openjazz-20190106/src/game/clientgame.cpp:175: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). buffer[0] = MTL_G_PJOIN + strlen(setup.characterName); data/openjazz-20190106/src/game/clientgame.cpp:181: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). memcpy(buffer + 9, setup.characterName, strlen(setup.characterName) + 1); data/openjazz-20190106/src/game/game.cpp:311: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). length = strlen(fileName); data/openjazz-20190106/src/game/servergame.cpp:179: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). levelData[count] = fileName[strlen(fileName) - 3]; data/openjazz-20190106/src/game/servergame.cpp:180: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). levelData[count + 1] = fileName[strlen(fileName) - 2]; data/openjazz-20190106/src/game/servergame.cpp:181: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). levelData[count + 2] = fileName[strlen(fileName) - 1]; data/openjazz-20190106/src/game/servergame.cpp:420:37: [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). sendBuffer[0] = MTL_G_PJOIN + strlen(players[pcount].getName()); data/openjazz-20190106/src/game/servergame.cpp:425:57: [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). memcpy(sendBuffer + 9, players[pcount].getName(), strlen(players[pcount].getName()) + 1); data/openjazz-20190106/src/io/file.cpp:111:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (count = strlen(path); filePath[count]; count++) { data/openjazz-20190106/src/io/file.cpp:127:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (count = strlen(path); filePath[count]; count++) { data/openjazz-20190106/src/io/file.cpp:210:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return fgetc(file); data/openjazz-20190106/src/io/file.cpp:233:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val = fgetc(file); data/openjazz-20190106/src/io/file.cpp:234:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val += fgetc(file) << 8; data/openjazz-20190106/src/io/file.cpp:284:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val = fgetc(file); data/openjazz-20190106/src/io/file.cpp:285:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val += fgetc(file) << 8; data/openjazz-20190106/src/io/file.cpp:286:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val += fgetc(file) << 16; data/openjazz-20190106/src/io/file.cpp:287:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val += fgetc(file) << 24; data/openjazz-20190106/src/io/file.cpp:343:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next = fgetc(file); data/openjazz-20190106/src/io/file.cpp:344:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next += fgetc(file) << 8; data/openjazz-20190106/src/io/file.cpp:353:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rle = fgetc(file); data/openjazz-20190106/src/io/file.cpp:357:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). byte = fgetc(file); data/openjazz-20190106/src/io/file.cpp:370:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer[pos++] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:375:26: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } else buffer[pos++] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:393:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next = fgetc(file); data/openjazz-20190106/src/io/file.cpp:394:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next += fgetc(file) << 8; data/openjazz-20190106/src/io/file.cpp:439:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). length = fgetc(file); data/openjazz-20190106/src/io/file.cpp:453:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string[count] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:457:23: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string[++count] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:458:23: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string[++count] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:459:23: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string[++count] = fgetc(file); data/openjazz-20190106/src/io/file.cpp:559:28: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!(count & 3)) mask = fgetc(file); data/openjazz-20190106/src/io/file.cpp:583:49: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (pixels[count] == key) pixels[count] = fgetc(file); data/openjazz-20190106/src/io/gfx/video.cpp:367: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 titleLen = strlen(titleBase) + 1; data/openjazz-20190106/src/io/gfx/video.cpp:371: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). titleLen = strlen(titleBase) + 3 + strlen(title) + 1; data/openjazz-20190106/src/io/gfx/video.cpp:371:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). titleLen = strlen(titleBase) + 3 + strlen(title) + 1; data/openjazz-20190106/src/jj1level/jj1levelload.cpp:464: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). string = createFileName("PLANET", fileName + strlen(fileName) - 3); data/openjazz-20190106/src/jj1level/jj1levelload.cpp:493: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). levelname = new char[strlen(string) + 14]; data/openjazz-20190106/src/jj1level/jj1levelload.cpp:514:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(levelname, " "); data/openjazz-20190106/src/jj1level/jj1levelload.cpp:534:25: [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). x = (canvasW >> 1) - ((strlen(string) + strlen(ext)) << 2); data/openjazz-20190106/src/jj1level/jj1levelload.cpp:534: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). x = (canvasW >> 1) - ((strlen(string) + strlen(ext)) << 2); data/openjazz-20190106/src/jj2level/jj2levelload.cpp:602:25: [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). x = (canvasW >> 1) - ((strlen(string) + 6) << 2); data/openjazz-20190106/src/main.cpp:150:20: [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 (argv[count][strlen(argv[count]) - 1] != '\\') { data/openjazz-20190106/src/main.cpp:154:20: [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 (argv[count][strlen(argv[count]) - 1] != '/') { data/openjazz-20190106/src/main.cpp:172:10: [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). count = strlen(argv[0]) - 1; data/openjazz-20190106/src/menu/menu.cpp:189: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). cursor = strlen(input); data/openjazz-20190106/src/menu/menu.cpp:228:47: [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 ((character == SDLK_DELETE) && (cursor < strlen(input))) { data/openjazz-20190106/src/menu/menu.cpp:281:46: [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 (controls.release(C_RIGHT) && (cursor < strlen(input))) cursor++; data/openjazz-20190106/src/util.cpp:120:20: [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). cloned = new char[strlen(string) + 1]; data/openjazz-20190106/src/util.cpp:140: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). concatenated = new char[strlen(first) + strlen(second) + 1]; data/openjazz-20190106/src/util.cpp:140: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). concatenated = new char[strlen(first) + strlen(second) + 1]; data/openjazz-20190106/src/util.cpp:162: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). pos = strlen(type); data/openjazz-20190106/src/util.cpp:189: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). pos = strlen(type); data/openjazz-20190106/src/util.cpp:190: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). fileName = new char[pos + strlen(extension) + 2]; data/openjazz-20190106/src/util.cpp:215: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). pos = strlen(type); ANALYSIS SUMMARY: Hits = 161 Lines analyzed = 34633 in approximately 0.73 seconds (47680 lines/second) Physical Source Lines of Code (SLOC) = 16127 Hits@level = [0] 29 [1] 54 [2] 88 [3] 4 [4] 12 [5] 3 Hits@level+ = [0+] 190 [1+] 161 [2+] 107 [3+] 19 [4+] 15 [5+] 3 Hits/KSLOC@level+ = [0+] 11.7815 [1+] 9.98326 [2+] 6.63484 [3+] 1.17815 [4+] 0.930117 [5+] 0.186023 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.