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/opentyrian-2.1.20130907+dfsg/src/jukebox.c Examining data/opentyrian-2.1.20130907+dfsg/src/pcxload.h Examining data/opentyrian-2.1.20130907+dfsg/src/palette.c Examining data/opentyrian-2.1.20130907+dfsg/src/hg_revision.h Examining data/opentyrian-2.1.20130907+dfsg/src/animlib.h Examining data/opentyrian-2.1.20130907+dfsg/src/starlib.h Examining data/opentyrian-2.1.20130907+dfsg/src/game_menu.c Examining data/opentyrian-2.1.20130907+dfsg/src/sprite.c Examining data/opentyrian-2.1.20130907+dfsg/src/vga_palette.c Examining data/opentyrian-2.1.20130907+dfsg/src/setup.c Examining data/opentyrian-2.1.20130907+dfsg/src/mtrand.c Examining data/opentyrian-2.1.20130907+dfsg/src/sizebuf.h Examining data/opentyrian-2.1.20130907+dfsg/src/params.c Examining data/opentyrian-2.1.20130907+dfsg/src/musmast.c Examining data/opentyrian-2.1.20130907+dfsg/src/opentyr.c Examining data/opentyrian-2.1.20130907+dfsg/src/varz.h Examining data/opentyrian-2.1.20130907+dfsg/src/musmast.h Examining data/opentyrian-2.1.20130907+dfsg/src/destruct.c Examining data/opentyrian-2.1.20130907+dfsg/src/sndmast.h Examining data/opentyrian-2.1.20130907+dfsg/src/cJSON.h Examining data/opentyrian-2.1.20130907+dfsg/src/network.h Examining data/opentyrian-2.1.20130907+dfsg/src/loudness.h Examining data/opentyrian-2.1.20130907+dfsg/src/vga256d.h Examining data/opentyrian-2.1.20130907+dfsg/src/nortvars.c Examining data/opentyrian-2.1.20130907+dfsg/src/nortsong.h Examining data/opentyrian-2.1.20130907+dfsg/src/mouse.h Examining data/opentyrian-2.1.20130907+dfsg/src/video_scale.h Examining data/opentyrian-2.1.20130907+dfsg/src/loudness.c Examining data/opentyrian-2.1.20130907+dfsg/src/destruct.h Examining data/opentyrian-2.1.20130907+dfsg/src/xmas.h Examining data/opentyrian-2.1.20130907+dfsg/src/lvllib.c Examining data/opentyrian-2.1.20130907+dfsg/src/network.c Examining data/opentyrian-2.1.20130907+dfsg/src/episodes.c Examining data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c Examining data/opentyrian-2.1.20130907+dfsg/src/scroller.c Examining data/opentyrian-2.1.20130907+dfsg/src/menus.h Examining data/opentyrian-2.1.20130907+dfsg/src/mainint.h Examining data/opentyrian-2.1.20130907+dfsg/src/animlib.c Examining data/opentyrian-2.1.20130907+dfsg/src/nortvars.h Examining data/opentyrian-2.1.20130907+dfsg/src/joystick.c Examining data/opentyrian-2.1.20130907+dfsg/src/episodes.h Examining data/opentyrian-2.1.20130907+dfsg/src/helptext.c Examining data/opentyrian-2.1.20130907+dfsg/src/palette.h Examining data/opentyrian-2.1.20130907+dfsg/src/picload.c Examining data/opentyrian-2.1.20130907+dfsg/src/font.h Examining data/opentyrian-2.1.20130907+dfsg/src/video.h Examining data/opentyrian-2.1.20130907+dfsg/src/pcxmast.c Examining data/opentyrian-2.1.20130907+dfsg/src/jukebox.h Examining data/opentyrian-2.1.20130907+dfsg/src/backgrnd.c Examining data/opentyrian-2.1.20130907+dfsg/src/video.c Examining data/opentyrian-2.1.20130907+dfsg/src/font.c Examining data/opentyrian-2.1.20130907+dfsg/src/starlib.c Examining data/opentyrian-2.1.20130907+dfsg/src/pcxmast.h Examining data/opentyrian-2.1.20130907+dfsg/src/xmas.c Examining data/opentyrian-2.1.20130907+dfsg/src/config.h Examining data/opentyrian-2.1.20130907+dfsg/src/keyboard.h Examining data/opentyrian-2.1.20130907+dfsg/src/scroller.h Examining data/opentyrian-2.1.20130907+dfsg/src/game_menu.h Examining data/opentyrian-2.1.20130907+dfsg/src/sndmast.c Examining data/opentyrian-2.1.20130907+dfsg/src/video_scale_hqNx.c Examining data/opentyrian-2.1.20130907+dfsg/src/vga256d.c Examining data/opentyrian-2.1.20130907+dfsg/src/picload.h Examining data/opentyrian-2.1.20130907+dfsg/src/backgrnd.h Examining data/opentyrian-2.1.20130907+dfsg/src/nortsong.c Examining data/opentyrian-2.1.20130907+dfsg/src/mouse.c Examining data/opentyrian-2.1.20130907+dfsg/src/vga_palette.h Examining data/opentyrian-2.1.20130907+dfsg/src/mtrand.h Examining data/opentyrian-2.1.20130907+dfsg/src/arg_parse.h Examining data/opentyrian-2.1.20130907+dfsg/src/cJSON.c Examining data/opentyrian-2.1.20130907+dfsg/src/fonthand.c Examining data/opentyrian-2.1.20130907+dfsg/src/sprite.h Examining data/opentyrian-2.1.20130907+dfsg/src/params.h Examining data/opentyrian-2.1.20130907+dfsg/src/pcxload.c Examining data/opentyrian-2.1.20130907+dfsg/src/keyboard.c Examining data/opentyrian-2.1.20130907+dfsg/src/setup.h Examining data/opentyrian-2.1.20130907+dfsg/src/lvlmast.h Examining data/opentyrian-2.1.20130907+dfsg/src/editship.c Examining data/opentyrian-2.1.20130907+dfsg/src/lds_play.c Examining data/opentyrian-2.1.20130907+dfsg/src/fonthand.h Examining data/opentyrian-2.1.20130907+dfsg/src/joystick.h Examining data/opentyrian-2.1.20130907+dfsg/src/sizebuf.c Examining data/opentyrian-2.1.20130907+dfsg/src/mingw_fixes.h Examining data/opentyrian-2.1.20130907+dfsg/src/lds_play.h Examining data/opentyrian-2.1.20130907+dfsg/src/player.h Examining data/opentyrian-2.1.20130907+dfsg/src/lvllib.h Examining data/opentyrian-2.1.20130907+dfsg/src/shots.h Examining data/opentyrian-2.1.20130907+dfsg/src/menus.c Examining data/opentyrian-2.1.20130907+dfsg/src/arg_parse.c Examining data/opentyrian-2.1.20130907+dfsg/src/video_scale.c Examining data/opentyrian-2.1.20130907+dfsg/src/helptext.h Examining data/opentyrian-2.1.20130907+dfsg/src/opentyr.h Examining data/opentyrian-2.1.20130907+dfsg/src/player.c Examining data/opentyrian-2.1.20130907+dfsg/src/tyrian2.h Examining data/opentyrian-2.1.20130907+dfsg/src/mingw_fixes.c Examining data/opentyrian-2.1.20130907+dfsg/src/editship.h Examining data/opentyrian-2.1.20130907+dfsg/src/mainint.c Examining data/opentyrian-2.1.20130907+dfsg/src/shots.c Examining data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c Examining data/opentyrian-2.1.20130907+dfsg/src/config.c Examining data/opentyrian-2.1.20130907+dfsg/src/file.h Examining data/opentyrian-2.1.20130907+dfsg/src/file.c Examining data/opentyrian-2.1.20130907+dfsg/src/varz.c Examining data/opentyrian-2.1.20130907+dfsg/src/opl.c Examining data/opentyrian-2.1.20130907+dfsg/src/opl.h FINAL RESULTS: data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:474:3: [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(ptr, ret); // strcat(out, ret); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:534:3: [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(ptr, str); // strcat(out, str); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:542:3: [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(ptr, ret); // strcat(out, ret); data/opentyrian-2.1.20130907+dfsg/src/config.c:389: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(saveFiles[slot-1].name, name); data/opentyrian-2.1.20130907+dfsg/src/config.c:886: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(saveFiles[z].highScoreName, defaultTeamNames[mt_rand() % 22]); data/opentyrian-2.1.20130907+dfsg/src/config.c:888: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(saveFiles[z].highScoreName, defaultHighScoreNames[mt_rand() % 34]); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:635:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s%i", key_names[j], k+1); data/opentyrian-2.1.20130907+dfsg/src/file.c:70:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", dir, file); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:337:6: [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(tempStr, miscText[6-1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:339:6: [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(tempStr, miscText[3-1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:341:6: [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(tempStr, saveFiles[x-2].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:367:7: [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(tempStr, saveFiles[x-2].levelName); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:450:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(value, "%s", joystick[joystick_config].analog ? "TRUE" : "FALSE"); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:546:8: [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(tempStr, ships[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:551:7: [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(tempStr, weaponPort[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:554:7: [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(tempStr, shields[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:557:7: [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(tempStr, powerSys[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:561:7: [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(tempStr, options[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:587:6: [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(tempStr, miscText[13]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:754:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp, "%s %d", inputDevices[2], inputDevice[i] - 2); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:756:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp, "%s", inputDevices[inputDevice[i] - 1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1815:6: [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(cube[cube_slot].text[line], word); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1881:4: [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(tempStr, cube[curSel[7]-2].header); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1884:4: [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(tempStr, menuInt[1][1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1887:4: [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(tempStr, menuInt[3][performSave + 1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1890:4: [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(tempStr, menuInt[curMenu + 1][0]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1934:4: [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(str+1, menuInt[curMenu + 1][x-1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1936:4: [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(str, menuInt[curMenu + 1][x-1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2465: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(menuInt[5][0], menuInt[2][itemNum - 1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2473:4: [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(tempStr, ships[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2477:4: [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(tempStr, weaponPort[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2480:4: [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(tempStr, shields[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2483:4: [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(tempStr, powerSys[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2487:4: [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(tempStr, options[temp].name); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2494:3: [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(menuInt[5][tempW], tempStr); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2497: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(menuInt[5][tempW], miscText[13]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2569: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(menuInt[4][x + 1], pName[temp - 1]); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2571:4: [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(menuInt[4][x + 1], miscText[5]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:222:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s %d", miscText[24], page-topicStart[temp2]+1); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:225:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s %d of %d", miscText[25], page, MAX_PAGE); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:254:8: [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(buf+1, topicName[temp]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:257:8: [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(buf, topicName[temp]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:593:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempstr2, "%s %d", miscTextB[2-1], saveFiles[x - 1].episode); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:600:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempstr2, "%s %s", miscTextB[3 - 1], tempstr); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:857: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(lastLevelName, miscText[19]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1502: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(saveFiles[i].highScoreName, saveFiles[i - 1].highScoreName); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1541:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s %s", miscText[48 + p], miscText[53]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1549:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s %d", miscText[37], temp_score); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1660:6: [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(saveFiles[slot].highScoreName, stemp); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1967: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(tempStr, saveFiles[temp + a].highScoreName); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1968: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(saveFiles[temp + a].highScoreName, saveFiles[temp + b].highScoreName); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1969: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(saveFiles[temp + b].highScoreName, tempStr); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2180: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(lastLevelName, levelName); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2200:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[27-1], levelName); // "Completed" data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2205:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[62-1], levelName); // "Exiting" data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2219:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %lu", miscText[28-1], player[0].cash); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2224:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %d%%", miscText[63-1], temp); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2343:3: [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(buf, end); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2344:3: [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(str, buf); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2393: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(tempStr, miscText[2-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2538:4: [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(stemp, (temp == 0) ? miscText[49-1] : miscText[50-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2541: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(stemp, JE_getName(temp+1)); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4228:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(1), miscTextB[4-1], special[evalue - 32100].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4230:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[43-1], special[evalue - 32100].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4232:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[64-1], special[evalue - 32100].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4244:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(2), miscTextB[4-1], options[evalue - 32000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4246:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[44-1], options[evalue - 32000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4273:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[64-1], options[evalue - 32000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4293:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(2), miscTextB[4-1], weaponPort[evalue - 31000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4295:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[44-1], weaponPort[evalue - 31000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4304:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[64-1], weaponPort[evalue - 31000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4320:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(1), miscTextB[4-1], weaponPort[evalue - 30000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4322:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[43-1], weaponPort[evalue - 30000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4331:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[64-1], weaponPort[evalue - 30000].name); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4401:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(1), miscTextB[4-1], miscText[45-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4403:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[43-1], miscText[45-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4405:8: [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(tempStr, miscText[45-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4414:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s %s", JE_getName(2), miscTextB[4-1], miscText[46-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4416:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s %s", miscText[44-1], miscText[46-1]); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4418:8: [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(tempStr, miscText[46-1]); data/opentyrian-2.1.20130907+dfsg/src/network.c:604: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((char *)&packet_out_temp->data[12], network_player_name); data/opentyrian-2.1.20130907+dfsg/src/network.c:652: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(network_opponent_name, (char *)&packet_in[0]->data[12]); data/opentyrian-2.1.20130907+dfsg/src/network.c:681: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((char *)&packet_out_temp->data[12], network_player_name); data/opentyrian-2.1.20130907+dfsg/src/params.c:146: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(network_opponent_host, option.arg); data/opentyrian-2.1.20130907+dfsg/src/params.c:152:4: [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(network_player_name, option.arg); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2093:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempStr, "%s%c", tempStr, smoothies[temp] + 48); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2095:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "SM = %s", tempStr); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2106:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "X:%d Y:%-5d %s FPS %d %d %d %d", (mapX - 1) * 12 + player[0].x, curLoc, tempStr, player[0].x_velocity, player[0].y_velocity, player[0].x, player[0].y); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2654:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(levelWarningText[0], "%s %lu", miscText[37], JE_totalScore(&player[0])); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2669:8: [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(levelWarningText[levelWarningLines], s); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2700:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s %s", miscTextB[4], pName[0]); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2703:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "Or play... %s", specialName[7]); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2717:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "Type %s at Title", specialName[SANextShip[superArcadeMode]-1]); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2965:11: [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(levelWarningText[levelWarningLines], s); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3356:6: [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(menuText[4], opentyrian_str); // OpenTyrian override data/opentyrian-2.1.20130907+dfsg/src/varz.c:520:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/opentyrian-2.1.20130907+dfsg/src/varz.c:523:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/opentyrian-2.1.20130907+dfsg/src/varz.c:527:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/opentyrian-2.1.20130907+dfsg/src/varz.c:533:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/opentyrian-2.1.20130907+dfsg/src/config.c:713:7: [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 (getenv("HOME")) data/opentyrian-2.1.20130907+dfsg/src/config.c:714: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(user_dir, sizeof(user_dir), "%s/.opentyrian", getenv("HOME")); data/opentyrian-2.1.20130907+dfsg/src/config.c:899:6: [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 (getenv("HOME")) data/opentyrian-2.1.20130907+dfsg/src/config.c:902:48: [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(dir, sizeof(dir), "%s/.opentyrian", getenv("HOME")); data/opentyrian-2.1.20130907+dfsg/src/animlib.c:231: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 temp[4]; data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:50: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(copy, str, size); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:288:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:481:4: [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(ptr, ", "); // strcat(out, ", "); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:503:2: [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(ptr, "{\n"); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:539: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(ptr, ":\t"); // strcat(out, ":\t"); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:549:4: [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(ptr, ",\n"); // strcat(out, ",\n"); data/opentyrian-2.1.20130907+dfsg/src/config.c:50: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 defaultHighScoreNames[34][23] = /* [1..34] of string [22] */ data/opentyrian-2.1.20130907+dfsg/src/config.c:92: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 defaultTeamNames[22][25] = /* [1..22] of string [24] */ data/opentyrian-2.1.20130907+dfsg/src/config.c:162: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 lastLevelName[11], levelName[11]; /* string [10] */ data/opentyrian-2.1.20130907+dfsg/src/config.c:367: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(&saveFiles[slot-1].levelName, &lastLevelName, sizeof(lastLevelName)); data/opentyrian-2.1.20130907+dfsg/src/config.c:476: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(&lastLevelName, &levelName, sizeof(levelName)); data/opentyrian-2.1.20130907+dfsg/src/config.c:702: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(&saveTemp, &s2, sizeof(s2)); data/opentyrian-2.1.20130907+dfsg/src/config.c:708: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. static char user_dir[500] = ""; data/opentyrian-2.1.20130907+dfsg/src/config.c:805: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(&saveFiles[z].encode, p, sizeof(JE_word)); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:808: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(&saveFiles[z].level, p, sizeof(JE_word)); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:811: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(&saveFiles[z].items, p, sizeof(JE_PItemsType)); p += sizeof(JE_PItemsType); data/opentyrian-2.1.20130907+dfsg/src/config.c:813: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(&saveFiles[z].score, p, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:816: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(&saveFiles[z].score2, p, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:821: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(&saveFiles[z].levelName, &p[1], *p); data/opentyrian-2.1.20130907+dfsg/src/config.c:825: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(&saveFiles[z].name, p, 14); data/opentyrian-2.1.20130907+dfsg/src/config.c:828: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(&saveFiles[z].cubes, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:829: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(&saveFiles[z].power, p, sizeof(JE_byte) * 2); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:830: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(&saveFiles[z].episode, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:831: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(&saveFiles[z].lastItems, p, sizeof(JE_PItemsType)); p += sizeof(JE_PItemsType); data/opentyrian-2.1.20130907+dfsg/src/config.c:832: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(&saveFiles[z].difficulty, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:833: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(&saveFiles[z].secretHint, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:834: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(&saveFiles[z].input1, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:835: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(&saveFiles[z].input2, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:839: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(&temp, p, 1); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:842: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(&saveFiles[z].initialDifficulty, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:844: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(&saveFiles[z].highScore1, p, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:847: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(&saveFiles[z].highScore2, p, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:851: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(&saveFiles[z].highScoreName, &p[1], *p); data/opentyrian-2.1.20130907+dfsg/src/config.c:854: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(&saveFiles[z].highScoreDiff, p, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:901: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 dir[1000]; data/opentyrian-2.1.20130907+dfsg/src/config.c:918: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(p, &tempSaveFile.encode, sizeof(JE_word)); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:921: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(p, &tempSaveFile.level, sizeof(JE_word)); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:923: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(p, &tempSaveFile.items, sizeof(JE_PItemsType)); p += sizeof(JE_PItemsType); data/opentyrian-2.1.20130907+dfsg/src/config.c:926: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(p, &tempSaveFile.score, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:929: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(p, &tempSaveFile.score2, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:934: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(&p[1], &tempSaveFile.levelName, *p); data/opentyrian-2.1.20130907+dfsg/src/config.c:938: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(p, &tempSaveFile.name, 14); data/opentyrian-2.1.20130907+dfsg/src/config.c:941: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(p, &tempSaveFile.cubes, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:942: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(p, &tempSaveFile.power, sizeof(JE_byte) * 2); p += 2; data/opentyrian-2.1.20130907+dfsg/src/config.c:943: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(p, &tempSaveFile.episode, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:944: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(p, &tempSaveFile.lastItems, sizeof(JE_PItemsType)); p += sizeof(JE_PItemsType); data/opentyrian-2.1.20130907+dfsg/src/config.c:945: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(p, &tempSaveFile.difficulty, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:946: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(p, &tempSaveFile.secretHint, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:947: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(p, &tempSaveFile.input1, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:948: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(p, &tempSaveFile.input2, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:952: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(p, &temp, 1); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:954: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(p, &tempSaveFile.initialDifficulty, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.c:957: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(p, &tempSaveFile.highScore1, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:960: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(p, &tempSaveFile.highScore2, sizeof(JE_longint)); p += 4; data/opentyrian-2.1.20130907+dfsg/src/config.c:964: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(&p[1], &tempSaveFile.highScoreName, *p); data/opentyrian-2.1.20130907+dfsg/src/config.c:967: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(p, &tempSaveFile.highScoreDiff, sizeof(JE_byte)); p++; data/opentyrian-2.1.20130907+dfsg/src/config.h:52: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 levelName[11]; /* string [9]; */ /* SYN: Added one more byte to match lastLevelName below */ data/opentyrian-2.1.20130907+dfsg/src/config.h:68: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 highScoreName[30]; /* string [29] */ data/opentyrian-2.1.20130907+dfsg/src/config.h:77: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 defaultHighScoreNames[34][23]; data/opentyrian-2.1.20130907+dfsg/src/config.h:78: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 defaultTeamNames[22][25]; data/opentyrian-2.1.20130907+dfsg/src/config.h:106: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 lastLevelName[11], levelName[11]; data/opentyrian-2.1.20130907+dfsg/src/destruct.c:578: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[40]; data/opentyrian-2.1.20130907+dfsg/src/destruct.c:619:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "player%i", i+1); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:661:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "player%i", i+1); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:669:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "unit%i", j); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:764: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->h * VGAScreen2->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:779: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->h * VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:808: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->h * VGAScreen2->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:872: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->h * VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:933: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(destructTempScreen->pixels, VGAScreen->pixels, destructTempScreen->pitch * destructTempScreen->h); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:1422: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->h * VGAScreen2->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:1446: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->h * VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:1457: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->h * VGAScreen2->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:1469: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->h * VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:2364: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 tempstr[16]; /* Max size needed: 16 assuming 10 digit int max. */ data/opentyrian-2.1.20130907+dfsg/src/destruct.c:2383:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (tempstr, "dmg~%d~", curUnit->health); data/opentyrian-2.1.20130907+dfsg/src/destruct.c:2385:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (tempstr, "pts~%d~", destruct_player[i].score); data/opentyrian-2.1.20130907+dfsg/src/episodes.c:44: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 episode_file[13], cube_file[13]; data/opentyrian-2.1.20130907+dfsg/src/episodes.c:261:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(levelFile, "tyrian%d.lvl", episodeNum); data/opentyrian-2.1.20130907+dfsg/src/episodes.c:262:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cube_file, "cubetxt%d.dat", episodeNum); data/opentyrian-2.1.20130907+dfsg/src/episodes.c:263:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(episode_file, "levels%d.dat", episodeNum); data/opentyrian-2.1.20130907+dfsg/src/episodes.c:273: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 ep_file[20]; data/opentyrian-2.1.20130907+dfsg/src/episodes.h:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:68:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:77:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:86:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[31]; /* string [30] */ data/opentyrian-2.1.20130907+dfsg/src/episodes.h:165: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 episode_file[13], cube_file[13]; data/opentyrian-2.1.20130907+dfsg/src/file.c:72:12: [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 *f = fopen(path, mode); data/opentyrian-2.1.20130907+dfsg/src/fonthand.c:57: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 levelWarningText[10][61]; /* [1..10] of string [60] */ data/opentyrian-2.1.20130907+dfsg/src/fonthand.h:38: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 levelWarningText[10][61]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:49: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 title[81]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:50: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 header[13]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:52:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[90][36]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:203: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:256: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:361:7: [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(tempStr, "-----"); /* Empty save slot */ data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:365: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 buf[20]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:439: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 value[30] = ""; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:446:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "%d", joystick_config + 1); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:456:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "%d", i == 2 ? joystick[joystick_config].sensitivity : joystick[joystick_config].threshold); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:603:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:617: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 buf[20]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:631: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 buf[50]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:752: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 temp[64]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:855:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1302: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1727: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 buf[256]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2311: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 tempStr[67]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2518: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 cl[24]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2521:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cl, "%d", JE_cashLeft()); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:2565:4: [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(menuInt[4][0], "Next Level"); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:3068: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 buf[32]; data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:3076:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", downgradeCost); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:3088:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", upgradeCost); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:3094:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", upgradeCost); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:3113:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "POWER: %d", temp); data/opentyrian-2.1.20130907+dfsg/src/helptext.c:55: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 helpTxt[39][231]; /* [1..39] of string [230] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:56: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 pName[21][16]; /* [1..21] of string [15] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:57: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 miscText[HELPTEXT_MISCTEXT_COUNT][42]; /* [1..68] of string [41] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:58: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 miscTextB[HELPTEXT_MISCTEXTB_COUNT][HELPTEXT_MISCTEXTB_SIZE]; /* [1..5] of string [10] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:59: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 keyName[8][18]; /* [1..8] of string [17] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:60: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 menuText[7][HELPTEXT_MENUTEXT_SIZE]; /* [1..7] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:61: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 outputs[9][31]; /* [1..9] of string [30] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:62: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 topicName[6][21]; /* [1..6] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:63: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 mainMenuHelp[HELPTEXT_MAINMENUHELP_COUNT][66]; /* [1..34] of string [65] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:64: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 inGameText[6][21]; /* [1..6] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:65: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 detailLevel[6][13]; /* [1..6] of string [12] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:66: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 gameSpeedText[5][13]; /* [1..5] of string [12] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:67: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 inputDevices[3][13]; /* [1..3] of string [12] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:68: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 networkText[HELPTEXT_NETWORKTEXT_COUNT][HELPTEXT_NETWORKTEXT_SIZE]; /* [1..4] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:69: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 difficultyNameB[11][21]; /* [0..9] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:70: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 joyButtonNames[5][21]; /* [1..5] of string [20] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:71: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 superShips[HELPTEXT_SUPERSHIPS_COUNT][26]; /* [0..10] of string [25] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c: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 specialName[HELPTEXT_SPECIALNAME_COUNT][10]; /* [1..9] of string [9] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:73: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 destructHelp[25][22]; /* [1..25] of string [21] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:74: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 weaponNames[17][17]; /* [1..17] of string [16] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:75: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 destructModeName[DESTRUCT_MODES][13]; /* [1..destructmodes] of string [12] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:76: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 shipInfo[HELPTEXT_SHIPINFO_COUNT][2][256]; /* [1..13, 1..2] of string */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:77: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 menuInt[MENU_MAX+1][11][18]; /* [0..14, 1..11] of string [17] */ data/opentyrian-2.1.20130907+dfsg/src/helptext.c:121: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 substring[256]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:59: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 helpTxt[39][231]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:60: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 pName[21][16]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:61: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 miscText[HELPTEXT_MISCTEXT_COUNT][42]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:62: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 miscTextB[HELPTEXT_MISCTEXTB_COUNT][HELPTEXT_MISCTEXTB_SIZE]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:63: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 keyName[8][18]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:64: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 menuText[7][HELPTEXT_MENUTEXT_SIZE]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:65: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 outputs[9][31]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:66: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 topicName[6][21]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:67: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 mainMenuHelp[HELPTEXT_MAINMENUHELP_COUNT][66]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:68: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 inGameText[6][21]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:69: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 detailLevel[6][13]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:70: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 gameSpeedText[5][13]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:71: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 inputDevices[3][13]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:72: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 networkText[HELPTEXT_NETWORKTEXT_COUNT][HELPTEXT_NETWORKTEXT_SIZE]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h: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 difficultyNameB[11][21]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:74: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 joyButtonNames[5][21]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:75: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 superShips[HELPTEXT_SUPERSHIPS_COUNT][26]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:76: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 specialName[HELPTEXT_SPECIALNAME_COUNT][10]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:77: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 destructHelp[25][22]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:78: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 weaponNames[17][17]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:79: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 destructModeName[DESTRUCT_MODES][13]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:80: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 shipInfo[HELPTEXT_SHIPINFO_COUNT][2][256]; data/opentyrian-2.1.20130907+dfsg/src/helptext.h:81: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 menuInt[MENU_MAX+1][11][18]; data/opentyrian-2.1.20130907+dfsg/src/joystick.c:504: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. static char name[7]; data/opentyrian-2.1.20130907+dfsg/src/jukebox.c:95:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[60]; data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:26:16: [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 op_table[9] = {0x00, 0x01, 0x02, 0x08, 0x09, 0x0a, 0x10, 0x11, 0x12}; data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:764: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(c->arp_tab, i->arp_tab, 12); data/opentyrian-2.1.20130907+dfsg/src/lds_play.h:40: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 mod_misc, mod_vol, mod_ad, mod_sr, mod_wave, data/opentyrian-2.1.20130907+dfsg/src/lds_play.h:52: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 finetune, glideto, portspeed, nextvol, volmod, volcar, data/opentyrian-2.1.20130907+dfsg/src/lvllib.c:25: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 levelFile[13]; /* string [12] */ data/opentyrian-2.1.20130907+dfsg/src/lvllib.h:28: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 levelFile[13]; /* string [12] */ data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c:29: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 lvlFile[LVL_NUM][9] = /* [1..LVLnum] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c:51: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 lvlFile2[LVL_NUM_2][9] = /* [1..LVLnum2] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c:67: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 lvlFile3[LVL_NUM_3][9] = /* [1..LVLnum3] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c:83: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 lvlFile4[LVL_NUM_4][9] = /* [1..LVLnum4] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/lvlmast.c:107: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 lvlFile5[LVL_NUM_5][9] = /* [1..lvlnum5] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/mainint.c:202: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:206: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:250: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 buf[21+1]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:503: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:514: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:589:6: [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(tempstr, "-----"); /* Unused save slot */ data/opentyrian-2.1.20130907+dfsg/src/mainint.c:738:2: [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(lastLevelName, "Completed"); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:880: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 scoretemp[32]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:894: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:900: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:918:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(scoretemp, "~#%d:~ %d", z + 1, saveFiles[temp+z].highScore1); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:940:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(scoretemp, "~#%d:~ %d", z + 1, saveFiles[temp+z].highScore1); /* Not .highScore2 for some reason */ data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1186: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1190: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1519: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 stemp[30], tempstr[30]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1520: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 buffer[256]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1522:5: [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(stemp, " "); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1674:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "~#%d:~ %d", (i - first_slot + 1), saveFiles[i].highScore1); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1684:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "~#%d:~ %d", (slot - first_slot + 1), saveFiles[slot].highScore1); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1783: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 demo_filename[9]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1960: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 tempStr[30]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1984: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 credstr[lines_max][line_max_length + 1]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2153: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 tempStr[256]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2331: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 buf[256]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2353: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 stemp[21]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2354: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 tempStr[51]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2367: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(stemp, " "); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2368: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(stemp, saveFiles[slot-1].name, strlen(saveFiles[slot-1].name)); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2498: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 stemp[21]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2499: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 tempstr[256]; data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2525:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%d", extra_lives); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:4157: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 tempStr[256]; data/opentyrian-2.1.20130907+dfsg/src/menus.c:32: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 episode_name[6][31], difficulty_name[7][21], gameplay_name[GAMEPLAY_NAME_COUNT][26]; data/opentyrian-2.1.20130907+dfsg/src/menus.h:29: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 episode_name[6][31], difficulty_name[7][21], gameplay_name[GAMEPLAY_NAME_COUNT][26]; data/opentyrian-2.1.20130907+dfsg/src/musmast.c:25: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 musicFile[MUSIC_NUM][13] = data/opentyrian-2.1.20130907+dfsg/src/musmast.c:70: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 musicTitle[MUSIC_NUM][48] = data/opentyrian-2.1.20130907+dfsg/src/musmast.h:36: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 musicFile[MUSIC_NUM][13]; data/opentyrian-2.1.20130907+dfsg/src/musmast.h:37: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 musicTitle[MUSIC_NUM][48]; data/opentyrian-2.1.20130907+dfsg/src/network.c:104: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(dst, src, sizeof(*dst)); data/opentyrian-2.1.20130907+dfsg/src/network.c:106: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(dst->data, src->data, src->len); data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:106: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:119: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:124:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:210: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:248: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/params.c:131:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int temp_port = atoi(&option.arg[temp + 1]); data/opentyrian-2.1.20130907+dfsg/src/params.c:157:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int temp = atoi(option.arg); data/opentyrian-2.1.20130907+dfsg/src/params.c:169:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int temp = atoi(option.arg); data/opentyrian-2.1.20130907+dfsg/src/pcxmast.c:23: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 *pcxfile[PCX_NUM] = /* [1..PCXnum] */ data/opentyrian-2.1.20130907+dfsg/src/pcxmast.h:29: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 *pcxfile[PCX_NUM]; /* [1..PCXnum] */ data/opentyrian-2.1.20130907+dfsg/src/sizebuf.c:82: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(sz->data + sz->bufferPos, buf, count); data/opentyrian-2.1.20130907+dfsg/src/sizebuf.c:100: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(sz->data + sz->bufferPos, bf->data + bf->bufferPos, count); data/opentyrian-2.1.20130907+dfsg/src/sndmast.c:23: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 soundTitle[SAMPLE_COUNT][9] = /* [1..soundnum + 9] of string [8] */ data/opentyrian-2.1.20130907+dfsg/src/sndmast.h:71: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 soundTitle[SAMPLE_COUNT][9]; data/opentyrian-2.1.20130907+dfsg/src/sprite.c:470: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[20]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:69: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 tempStr[31]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:622:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:936:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempStr, "demorec.%d", new_demo_num++); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2098:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "Memory left = %d", -1); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2100:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "Enemies onscreen = %d", enemyOnScreen); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2105:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempStr, "%2.3f", 1000.0f / roundf(debugHist / debugHistCount)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2147:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%.1f", levelTimerCountdown / 100.0f); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2307: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 temp[64]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2308:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "Player %d is unsynchronized!", i + 1); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2404: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 s[256]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2409:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2477:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mapOrigin = atoi(strnztcpy(buffer, s + 4, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2478:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mapPNum = atoi(strnztcpy(buffer, s + 7, 1)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2481:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mapPlanet[i] = atoi(strnztcpy(buffer, s + 1 + (i + 1) * 8, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2482:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mapSection[i] = atoi(strnztcpy(buffer, s + 4 + (i + 1) * 8, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2487:14: [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). temp = atoi(strnztcpy(buffer, s + 4, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2490:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cubeList[i] = atoi(strnztcpy(buffer, s + 3 + (i + 1) * 4, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2497:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cubeMax = atoi(strnztcpy(buffer, s + 4, 2)); /*Auto set CubeMax*/ data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2501:14: [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). temp = atoi(strnztcpy(buffer, s + 4, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2543:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2549:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2558:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); /*Allowed to go to Time War?*/ data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2567:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2576:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2599:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2610: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. char buf[256]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2623:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nextLevel = atoi(strnztcpy(buffer, s + 9, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2625:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). levelSong = atoi(strnztcpy(buffer, s + 22, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2630:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). lvlFileNum = atoi(strnztcpy(buffer, s + 25, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2746:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tempX = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2770: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2772:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tempX = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2792:12: [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(vga, pic, 320); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2797:12: [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(vga, vga2, VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2814: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(VGAScreen->pixels, pic_buffer, sizeof(pic_buffer)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2822: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2824:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tempX = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2843:12: [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(vga, vga2, VGAScreen->pitch); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2848:12: [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(vga, pic, 320); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2865: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(VGAScreen->pixels, pic_buffer, sizeof(pic_buffer)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2873: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2875:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tempX = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2893:11: [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(vga, vga2 + z, 319 - z); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2896:11: [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(vga, pic, z + 1); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2912: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(VGAScreen->pixels, pic_buffer, sizeof(pic_buffer)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2954:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). frameCountMax = atoi(strnztcpy(buffer, s + 4, 2)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2980:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mainLevel = atoi(strnztcpy(buffer, s + 4, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3004:14: [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). temp = atoi(strnztcpy(buffer, s + 3, 3)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3079:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempStr, "shapes%c.dat", tolower((unsigned char)char_shapeFile)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3096: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(megaData1.shapes[x].sh, shape, sizeof(JE_DanCShape)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3109: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(megaData2.shapes[x].sh, shape, sizeof(JE_DanCShape)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3133: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(megaData3.shapes[x].sh, shape, sizeof(JE_DanCShape)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3229: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3262: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3329: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3345: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3374: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(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3378: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(VGAScreen->pixels, VGAScreen2->pixels, VGAScreen->pitch * VGAScreen->h); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3453: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 buf[10+1+15+1]; data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:5035: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(TempScreen2, VGAScreenSeg->pixels, VGAScreenSeg->h * VGAScreenSeg->pitch); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:5061: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((Uint8 *)VGAScreenSeg->pixels + topBorder, TempScreen1 + topBorder, screenSize - bottomBorder); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:5113: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(&boss_bar[0], &boss_bar[1], sizeof(boss_bar_t)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.h:39: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 tempStr[31]; data/opentyrian-2.1.20130907+dfsg/src/video_scale.c:90: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(dst, src, src_surface->pitch * src_surface->h); data/opentyrian-2.1.20130907+dfsg/src/video_scale.c:138: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(dst, dst_temp, dst_pitch); data/opentyrian-2.1.20130907+dfsg/src/video_scale.c:187: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(dst, dst_temp, dst_pitch); data/opentyrian-2.1.20130907+dfsg/src/arg_parse.c:47: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). size_t arg_len = strlen(argv[argn]); data/opentyrian-2.1.20130907+dfsg/src/arg_parse.c:121: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). const size_t arg_len = strlen(arg); data/opentyrian-2.1.20130907+dfsg/src/arg_parse.c:186: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). const size_t arg_len = strlen(arg), data/opentyrian-2.1.20130907+dfsg/src/arg_parse.c:225: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). if (arg_opt_len == strlen(options->long_opt)) // exact match data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:46: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). size_t size = strlen(str) + 1; data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:455:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(ptr, "["); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:468: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). size_t ret_len = strlen(ret); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:472: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). ptr += strlen(out); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:488:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(ptr, "]"); // strcat(out, "]"); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:516: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). size_t str_len = strlen(str); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:525: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). size_t ret_len = strlen(ret); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:529: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). ptr = out + strlen(out); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:554:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(ptr, "\n"); // strcat(out, "\n"); data/opentyrian-2.1.20130907+dfsg/src/cJSON.c:566:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(ptr, "}"); // strcat(out, "}"); data/opentyrian-2.1.20130907+dfsg/src/config.c:710:6: [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(user_dir) == 0) data/opentyrian-2.1.20130907+dfsg/src/config.c:716:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(user_dir, "."); data/opentyrian-2.1.20130907+dfsg/src/config.c:933: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). *p = strlen(tempSaveFile.levelName); data/opentyrian-2.1.20130907+dfsg/src/config.c:963: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). *p = strlen(tempSaveFile.highScoreName); data/opentyrian-2.1.20130907+dfsg/src/file.c:69: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). char *path = malloc(strlen(dir) + 1 + strlen(file) + 1); data/opentyrian-2.1.20130907+dfsg/src/file.c:69:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *path = malloc(strlen(dir) + 1 + strlen(file) + 1); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:442:6: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(value, "-"); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1763:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buf) == 0) data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1788: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). uint word_chars = strlen(word), data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1814:7: [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(cube[cube_slot].text[line], " "); data/opentyrian-2.1.20130907+dfsg/src/game_menu.c:1930: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). str = malloc(strlen(menuInt[curMenu + 1][x-1])+2); data/opentyrian-2.1.20130907+dfsg/src/helptext.c:94:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = getc(f); data/opentyrian-2.1.20130907+dfsg/src/helptext.c:112:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = getc(f); data/opentyrian-2.1.20130907+dfsg/src/helptext.c:123:6: [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(message) == 0) data/opentyrian-2.1.20130907+dfsg/src/helptext.c:142: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). if (pos == strlen(message)) data/opentyrian-2.1.20130907+dfsg/src/joystick.c:456:2: [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 character. strncpy(buffer, "", buffer_len); data/opentyrian-2.1.20130907+dfsg/src/joystick.c:509:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(name, ""); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:92:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mode = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:99:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tempo = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:100:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pattlen = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:102:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). chandelay[i] = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:103:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). regbd = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:114:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_misc = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:115:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_vol = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:116:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_ad = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:117:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_sr = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:118:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_wave = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:119:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_misc = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:120:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_vol = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:121:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_ad = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:122:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_sr = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:123:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_wave = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:124:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->feedback = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:125:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->keyoff = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:126:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->portamento = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:127:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->glide = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:128:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->finetune = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:129:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->vibrato = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:130:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->vibdelay = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:131:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->mod_trem = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:132:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->car_trem = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:133:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->tremwait = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:134:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->arpeggio = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:136:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->arp_tab[j] = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:139:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->fms = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:141:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->midinst = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:142:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->midvelo = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:143:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->midkey = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:144:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->midtrans = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:145:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->middum1 = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:146:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sb->middum2 = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/lds_play.c:167:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). positions[i * 9 + j].transpose = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:103: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). maxloc = strlen(s); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:123:33: [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 (loc = 0; (unsigned)loc < strlen(s) + 28; loc++) data/opentyrian-2.1.20130907+dfsg/src/mainint.c:592: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). tempstr2 = malloc(5 + strlen(miscTextB[2-1])); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:598: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). len = strlen(miscTextB[3-1]) + 2 + strlen(tempstr); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:598:40: [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). len = strlen(miscTextB[3-1]) + 2 + strlen(tempstr); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1557:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempstr, stemp, temp); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1790:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Uint8 temp = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1793:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lvlFileNum = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1795:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.weapon[FRONT_WEAPON].id = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1796:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.weapon[REAR_WEAPON].id = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1797:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.super_arcade_mode = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1798:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.sidekick[LEFT_SIDEKICK] = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1799:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.sidekick[RIGHT_SIDEKICK] = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1800:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.generator = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1802:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.sidekick_level = fgetc(demo_file); // could probably ignore data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1803:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.sidekick_series = fgetc(demo_file); // could probably ignore data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1805:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). initial_episode_num = fgetc(demo_file); // could probably ignore data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1807:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.shield = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1808:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.special = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1809:45: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.ship = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1812:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). player[0].items.weapon[i].power = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1816:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). levelSong = fgetc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:1860:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next_demo_keys = getc(demo_file); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2104: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). if (strcmp(&credstr[line][0], ".") != 0 && strlen(credstr[line])) data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2332: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). assert(strlen(str) < sizeof(buf)); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2368:41: [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(stemp, saveFiles[slot-1].name, strlen(saveFiles[slot-1].name)); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2369: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). temp = strlen(stemp); data/opentyrian-2.1.20130907+dfsg/src/mainint.c:2394:5: [1] (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. strncat(tempStr, stemp, temp); data/opentyrian-2.1.20130907+dfsg/src/network.c:595:6: [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(network_player_name) > 20) data/opentyrian-2.1.20130907+dfsg/src/network.c:605: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). network_send(12 + strlen(network_player_name) + 1); // PACKET_CONNECT data/opentyrian-2.1.20130907+dfsg/src/network.c:682: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). network_send(12 + strlen(network_player_name) + 1); // PACKET_CONNECT data/opentyrian-2.1.20130907+dfsg/src/opentyr.c:63:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return strncpy(to, from, count); data/opentyrian-2.1.20130907+dfsg/src/palette.c:54:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). palettes[p][i].r = getc(f) << 2; data/opentyrian-2.1.20130907+dfsg/src/palette.c:55:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). palettes[p][i].g = getc(f) << 2; data/opentyrian-2.1.20130907+dfsg/src/palette.c:56:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). palettes[p][i].b = getc(f) << 2; data/opentyrian-2.1.20130907+dfsg/src/params.c:145:36: [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). network_opponent_host = malloc(strlen(option.arg) + 1); data/opentyrian-2.1.20130907+dfsg/src/params.c:151:33: [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). network_player_name = malloc(strlen(option.arg) + 1); data/opentyrian-2.1.20130907+dfsg/src/params.c:224: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). for (uint j = 0; j < strlen(argv[i]); ++j) data/opentyrian-2.1.20130907+dfsg/src/pcxload.c:33:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc(f) == 12) data/opentyrian-2.1.20130907+dfsg/src/pcxload.c:47:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Uint8 p = fgetc(f); data/opentyrian-2.1.20130907+dfsg/src/pcxload.c:51:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). memset(s, fgetc(f), (p & 0x3f)); data/opentyrian-2.1.20130907+dfsg/src/sprite.c:57:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!getc(f)) // sprite is empty data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2090:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(tempStr, ""); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2465:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(s, " "); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2611:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (strlen(s) > 8) ? s + 8 : "", sizeof(buf)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2611: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). strncpy(buf, (strlen(s) > 8) ? s + 8 : "", sizeof(buf)); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2632: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). bonusLevelCurrent = (strlen(s) > 28) & (s[28] == '$'); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2633: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). normalBonusLevelCurrent = (strlen(s) > 27) & (s[27] == '$'); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2649:8: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(levelWarningText[2], ""); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:2655:8: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(levelWarningText[1], ""); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3038:2: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(level_f); // char_mapFile data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3039:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). JE_char char_shapeFile = fgetc(level_f); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3084:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). JE_boolean shapeBlank = fgetc(shpFile); data/opentyrian-2.1.20130907+dfsg/src/tyrian2.c:3427:53: [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 (arcade_code_i[i] > 0 && arcade_code_i[i] == strlen(specialName[i])) ANALYSIS SUMMARY: Hits = 523 Lines analyzed = 46774 in approximately 0.98 seconds (47764 lines/second) Physical Source Lines of Code (SLOC) = 37693 Hits@level = [0] 104 [1] 120 [2] 300 [3] 4 [4] 99 [5] 0 Hits@level+ = [0+] 627 [1+] 523 [2+] 403 [3+] 103 [4+] 99 [5+] 0 Hits/KSLOC@level+ = [0+] 16.6344 [1+] 13.8753 [2+] 10.6916 [3+] 2.7326 [4+] 2.62648 [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.