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/reminiscence-0.2.1/collision.cpp Examining data/reminiscence-0.2.1/cutscene.cpp Examining data/reminiscence-0.2.1/cutscene.h Examining data/reminiscence-0.2.1/file.cpp Examining data/reminiscence-0.2.1/file.h Examining data/reminiscence-0.2.1/fs.cpp Examining data/reminiscence-0.2.1/fs.h Examining data/reminiscence-0.2.1/game.cpp Examining data/reminiscence-0.2.1/game.h Examining data/reminiscence-0.2.1/graphics.cpp Examining data/reminiscence-0.2.1/graphics.h Examining data/reminiscence-0.2.1/intern.h Examining data/reminiscence-0.2.1/locale.cpp Examining data/reminiscence-0.2.1/locale.h Examining data/reminiscence-0.2.1/main.cpp Examining data/reminiscence-0.2.1/menu.cpp Examining data/reminiscence-0.2.1/menu.h Examining data/reminiscence-0.2.1/mixer.cpp Examining data/reminiscence-0.2.1/mixer.h Examining data/reminiscence-0.2.1/mod_player.cpp Examining data/reminiscence-0.2.1/mod_player.h Examining data/reminiscence-0.2.1/piege.cpp Examining data/reminiscence-0.2.1/resource.cpp Examining data/reminiscence-0.2.1/resource.h Examining data/reminiscence-0.2.1/scaler.cpp Examining data/reminiscence-0.2.1/scaler.h Examining data/reminiscence-0.2.1/seq_player.cpp Examining data/reminiscence-0.2.1/seq_player.h Examining data/reminiscence-0.2.1/sfx_player.cpp Examining data/reminiscence-0.2.1/sfx_player.h Examining data/reminiscence-0.2.1/staticres.cpp Examining data/reminiscence-0.2.1/sys.h Examining data/reminiscence-0.2.1/systemstub.h Examining data/reminiscence-0.2.1/systemstub_sdl.cpp Examining data/reminiscence-0.2.1/unpack.cpp Examining data/reminiscence-0.2.1/unpack.h Examining data/reminiscence-0.2.1/util.cpp Examining data/reminiscence-0.2.1/util.h Examining data/reminiscence-0.2.1/video.cpp Examining data/reminiscence-0.2.1/video.h FINAL RESULTS: data/reminiscence-0.2.1/game.cpp:378: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(buf, _menu._passwords[7][_skillLevel]); data/reminiscence-0.2.1/main.cpp:97:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(USAGE, argv[0]); data/reminiscence-0.2.1/util.cpp:29:3: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buf, msg, va); data/reminiscence-0.2.1/util.cpp:40:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), msg, va); data/reminiscence-0.2.1/util.cpp:50:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), msg, va); data/reminiscence-0.2.1/cutscene.cpp:47: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, pal, 0x20); data/reminiscence-0.2.1/cutscene.cpp:163: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(_page1, _pageC, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/cutscene.cpp:276: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(_page1, _page0, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/cutscene.cpp:368: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(_pageC, _page1, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/cutscene.cpp:826: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(_page1, _page0, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/file.cpp:29:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). virtual bool open(const char *path, const char *mode) = 0; data/reminiscence-0.2.1/file.cpp:40:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool open(const char *path, const char *mode) { data/reminiscence-0.2.1/file.cpp:42:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _fp = fopen(path, mode); data/reminiscence-0.2.1/file.cpp:88:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool open(const char *path, const char *mode) { data/reminiscence-0.2.1/file.cpp:145:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool File::open(const char *filename, const char *mode, FileSystem *fs) { data/reminiscence-0.2.1/file.cpp:156:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return _impl->open(path, mode); data/reminiscence-0.2.1/file.cpp:161:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool File::open(const char *filename, const char *mode, const char *directory) { data/reminiscence-0.2.1/file.cpp:176: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 path[512]; data/reminiscence-0.2.1/file.cpp:179:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return _impl->open(path, mode); data/reminiscence-0.2.1/file.h:32:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool open(const char *filename, const char *mode, FileSystem *fs); data/reminiscence-0.2.1/file.h:33:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool open(const char *filename, const char *mode, const char *directory); data/reminiscence-0.2.1/fs.cpp:75: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 searchPath[MAX_PATH]; data/reminiscence-0.2.1/fs.cpp:83: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 filePath[MAX_PATH]; data/reminiscence-0.2.1/fs.cpp:103: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 filePath[512]; data/reminiscence-0.2.1/game.cpp:51:29: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _res._hasSeqData = File().open("INTRO.SEQ", "rb", _fs); data/reminiscence-0.2.1/game.cpp:159: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(_vid._frontLayer, _vid._backLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:266:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[16]; data/reminiscence-0.2.1/game.cpp:289:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(name, "rb", _fs)) { data/reminiscence-0.2.1/game.cpp:321: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 demoFile[20]; data/reminiscence-0.2.1/game.cpp:332:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (_inp_demo->open(demoFile, "zwb", _savePath)) { data/reminiscence-0.2.1/game.cpp:347:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (_inp_demo->open(demoFile, "zrb", _savePath)) { data/reminiscence-0.2.1/game.cpp:375: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[50]; data/reminiscence-0.2.1/game.cpp:439: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 buf[30]; data/reminiscence-0.2.1/game.cpp:498: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(_vid._tempLayer, _vid._frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:504: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 buf[50]; data/reminiscence-0.2.1/game.cpp:550: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(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:577: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 codeText[7]; data/reminiscence-0.2.1/game.cpp:581: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(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:583: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 buf[20]; data/reminiscence-0.2.1/game.cpp:638: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 levelCode[50]; data/reminiscence-0.2.1/game.cpp:681: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(_vid._tempLayer, _vid._frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:718: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(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/game.cpp:1211: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 name[8]; data/reminiscence-0.2.1/game.cpp:1257: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 name[8]; data/reminiscence-0.2.1/game.cpp:1441: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[10]; data/reminiscence-0.2.1/game.cpp:1455: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/reminiscence-0.2.1/game.cpp:1548: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(buf, "rs-level%d.demo", _currentLevel + 1); data/reminiscence-0.2.1/game.cpp:1552: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(buf, "rs-level%d-%02d.state", _currentLevel + 1, slot); data/reminiscence-0.2.1/game.cpp:1557: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 stateFile[20]; data/reminiscence-0.2.1/game.cpp:1560:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!f.open(stateFile, "zwb", _savePath)) { data/reminiscence-0.2.1/game.cpp:1566: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 hdrdesc[32]; data/reminiscence-0.2.1/game.cpp:1568: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(hdrdesc, "level=%d room=%d", _currentLevel + 1, _currentRoom); data/reminiscence-0.2.1/game.cpp:1584: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 stateFile[20]; data/reminiscence-0.2.1/game.cpp:1587:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!f.open(stateFile, "zrb", _savePath)) { data/reminiscence-0.2.1/game.cpp:1598: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 hdrdesc[32]; data/reminiscence-0.2.1/game.h:60:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 char *_monsterNames[2][4]; data/reminiscence-0.2.1/main.cpp:53:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(table[i].filename, "rb", fs)) { data/reminiscence-0.2.1/main.cpp:77:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(table[i].filename, "rb", fs)) { data/reminiscence-0.2.1/main.cpp:110:42: [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). Game *g = new Game(stub, &fs, savePath, atoi(levelNum), (ResourceType)version, language); data/reminiscence-0.2.1/menu.cpp:174: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 password[7]; data/reminiscence-0.2.1/menu.h:42:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 char *_passwords[8][3]; data/reminiscence-0.2.1/mod_player.cpp:100:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_modulesFiles[num][i], "rb", _fs)) { data/reminiscence-0.2.1/mod_player.h:37:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[23]; data/reminiscence-0.2.1/mod_player.h:56: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 songName[21]; data/reminiscence-0.2.1/piege.cpp:1652: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(_di->unk2, _di->data_buf, _di->data_size + 1); data/reminiscence-0.2.1/resource.cpp:80:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:129:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:146:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:163:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:210:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:227:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:247:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open("STRINGS.TXT", "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:274:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open("MENUS.TXT", "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:441:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open(_entryName, "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:864: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(_pol, tmp + data[0].offset, data[0].packedSize); data/reminiscence-0.2.1/resource.cpp:873: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(_cmd, tmp + data[1].offset, data[1].packedSize); data/reminiscence-0.2.1/resource.cpp:889:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (f.open("VOICE.VCE", "rb", _fs)) { data/reminiscence-0.2.1/resource.cpp:1064: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(_bankDataHead, data, size); data/reminiscence-0.2.1/resource.h:104: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 _entryName[32]; data/reminiscence-0.2.1/scaler.cpp:32: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(dst, src, w * 2); data/reminiscence-0.2.1/seq_player.cpp:25:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool SeqDemuxer::open(File *f) { data/reminiscence-0.2.1/seq_player.cpp:167: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, src, MIN(len, dst_size)); data/reminiscence-0.2.1/seq_player.cpp:184: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(dst, buf + y * 8, 8); data/reminiscence-0.2.1/seq_player.cpp:215: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(dst + y * pitch, src, 8); data/reminiscence-0.2.1/seq_player.cpp:241:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (_demux.open(f)) { data/reminiscence-0.2.1/seq_player.h:34:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool open(File *f); data/reminiscence-0.2.1/systemstub_sdl.cpp: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(_fadeScreenBuffer, _screenBuffer + _screenW + 1, fadeScreenBufferSize); data/reminiscence-0.2.1/systemstub_sdl.cpp:570: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, scanline, _screenW * sizeof(uint16)); data/reminiscence-0.2.1/util.cpp:25: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[1024]; data/reminiscence-0.2.1/util.cpp:37: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[1024]; data/reminiscence-0.2.1/util.cpp:47: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[1024]; data/reminiscence-0.2.1/video.cpp:206: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, src, code); data/reminiscence-0.2.1/video.cpp:239: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(vid, _res->_memBuf, 256 * 56); data/reminiscence-0.2.1/video.cpp:251: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(_backLayer, _frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/video.cpp:408: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, src, code); data/reminiscence-0.2.1/video.cpp:437: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(buf, ptr, size); data/reminiscence-0.2.1/video.cpp:588: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(buf + sz, a6, d1); data/reminiscence-0.2.1/video.cpp:594: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(buf + sz, a6 + d4 * 32, 32); data/reminiscence-0.2.1/video.cpp:606: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(_backLayer, _frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); data/reminiscence-0.2.1/file.cpp:33:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual void read(void *ptr, uint32 len) = 0; data/reminiscence-0.2.1/file.cpp:66:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(void *ptr, uint32 len) { data/reminiscence-0.2.1/file.cpp:114:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(void *ptr, uint32 len) { data/reminiscence-0.2.1/file.cpp:200:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void File::read(void *ptr, uint32 len) { data/reminiscence-0.2.1/file.cpp:201:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _impl->read(ptr, len); data/reminiscence-0.2.1/file.cpp:206:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&b, 1); data/reminiscence-0.2.1/file.h:38:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(void *ptr, uint32 len); data/reminiscence-0.2.1/fs.cpp:41:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _filePathLen = strlen(dir) + 1; data/reminiscence-0.2.1/fs.cpp:46:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int len = strlen(file); data/reminiscence-0.2.1/fs.cpp:49: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). const int filePathLen = strlen(filePath); data/reminiscence-0.2.1/game.cpp:377:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _vid.drawString(buf, (256 - strlen(buf) * 8) / 2, 40, 0xE5); data/reminiscence-0.2.1/game.cpp:379:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _vid.drawString(buf, (256 - strlen(buf) * 8) / 2, 16, 0xE7); data/reminiscence-0.2.1/game.cpp:502:31: [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). _vid.drawString(str, (256 - strlen(str) * 8) / 2, 64, 0xE3); data/reminiscence-0.2.1/game.cpp:508:31: [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). _vid.drawString(str, (256 - strlen(str) * 8) / 2, 104, colors[0]); data/reminiscence-0.2.1/game.cpp:510:31: [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). _vid.drawString(str, (256 - strlen(str) * 8) / 2, 112, colors[1]); data/reminiscence-0.2.1/game.cpp:640:54: [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). _vid.drawString(levelCode, (Video::GAMESCREEN_W - strlen(levelCode) * 8) / 2, 16, 0xE7); data/reminiscence-0.2.1/game.cpp:648:31: [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). _vid.drawString(str, (176 - strlen(str) * 8) / 2, 34, 0xE6); data/reminiscence-0.2.1/game.cpp:665:32: [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). _vid.drawString(str, (176 - strlen(str) * 8) / 2, 26, 0xE6); data/reminiscence-0.2.1/game.cpp:1439:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _vid.drawString(str, (256 - strlen(str) * 8) / 2, 189, 0xED); data/reminiscence-0.2.1/game.cpp:1443: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). _vid.drawString(buf, (256 - strlen(buf) * 8) / 2, 197, 0xED); data/reminiscence-0.2.1/game.cpp:1457: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). _vid.drawString(buf, (114 - strlen(buf) * 8) / 2 + 72, 158, 0xE5); data/reminiscence-0.2.1/game.cpp:1459: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). _vid.drawString(buf, (114 - strlen(buf) * 8) / 2 + 72, 166, 0xE5); data/reminiscence-0.2.1/game.cpp:1599:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(hdrdesc, sizeof(hdrdesc)); data/reminiscence-0.2.1/game.cpp:1721:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(&_res._ctData[0x100], 0x1C00); data/reminiscence-0.2.1/game.cpp:1736:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(cs2->data_buf, 0x10); data/reminiscence-0.2.1/main.cpp:33: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). if (strncmp(arg + 2, longCmd, strlen(longCmd)) == 0) { data/reminiscence-0.2.1/main.cpp:34:21: [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). *opt = arg + 2 + strlen(longCmd); data/reminiscence-0.2.1/main.cpp:91: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(argv[i]) >= 2) { data/reminiscence-0.2.1/mod_player.cpp:39:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_modInfo.songName, 20); data/reminiscence-0.2.1/mod_player.cpp:45:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(si->name, 22); data/reminiscence-0.2.1/mod_player.cpp:59:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_modInfo.patternOrderTable, NUM_PATTERNS); data/reminiscence-0.2.1/mod_player.cpp:72:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_modInfo.patternsTable, n); data/reminiscence-0.2.1/mod_player.cpp:79:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(si->data, si->len); data/reminiscence-0.2.1/resource.cpp:133:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(dstPtr, 0x3800 * 4); data/reminiscence-0.2.1/resource.cpp:150:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(dstPtr, 768); data/reminiscence-0.2.1/resource.cpp:169:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(offData, len); data/reminiscence-0.2.1/resource.cpp:216:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(_cine_off, len); data/reminiscence-0.2.1/resource.cpp:233:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(_cine_txt, len); data/reminiscence-0.2.1/resource.cpp:251:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(_extStringsTable, sz); data/reminiscence-0.2.1/resource.cpp:280:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read(textData, sz); data/reminiscence-0.2.1/resource.cpp:459:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf->read(tmp, len); data/reminiscence-0.2.1/resource.cpp:474:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_fnt, len); data/reminiscence-0.2.1/resource.cpp:485:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_mbk, len); data/reminiscence-0.2.1/resource.cpp:500:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_icn + _icnLen, len); data/reminiscence-0.2.1/resource.cpp:513:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_spr1, len); data/reminiscence-0.2.1/resource.cpp:521:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_sprm, len); data/reminiscence-0.2.1/resource.cpp:526:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_rp, 0x4A); data/reminiscence-0.2.1/resource.cpp:536:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_spc, len); data/reminiscence-0.2.1/resource.cpp:548:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_pal, len); data/reminiscence-0.2.1/resource.cpp:559:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_map, len); data/reminiscence-0.2.1/resource.cpp:647:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(packedData, packedSize); data/reminiscence-0.2.1/resource.cpp:763:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_ani, size); data/reminiscence-0.2.1/resource.cpp:799:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_tbn, len); data/reminiscence-0.2.1/resource.cpp:818:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf->read(_cmd, len); data/reminiscence-0.2.1/resource.cpp:830:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf->read(_pol, len); data/reminiscence-0.2.1/resource.cpp:842:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf->read(tmp, len); data/reminiscence-0.2.1/resource.cpp:946:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_sfxList[i].data, size); data/reminiscence-0.2.1/resource.cpp:960:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(_lev, len); data/reminiscence-0.2.1/resource.cpp:973:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(tmp, len); data/reminiscence-0.2.1/resource.cpp:994:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read(tmp, len); data/reminiscence-0.2.1/seq_player.cpp:99:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _f->read(_buffers[num].data + _buffers[num].size, size); data/reminiscence-0.2.1/seq_player.cpp:109:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _f->read(dst, 256 * 3); data/reminiscence-0.2.1/seq_player.cpp:353:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *buf++ = _soundQueue->data[_soundQueue->read]; data/reminiscence-0.2.1/seq_player.cpp:354:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ++_soundQueue->read; data/reminiscence-0.2.1/seq_player.h:71:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read; ANALYSIS SUMMARY: Hits = 164 Lines analyzed = 16843 in approximately 0.70 seconds (23928 lines/second) Physical Source Lines of Code (SLOC) = 15095 Hits@level = [0] 53 [1] 65 [2] 94 [3] 0 [4] 5 [5] 0 Hits@level+ = [0+] 217 [1+] 164 [2+] 99 [3+] 5 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 14.3756 [1+] 10.8645 [2+] 6.55846 [3+] 0.331236 [4+] 0.331236 [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.