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/game-music-emu-0.6.3/demo/Wave_Writer.cpp Examining data/game-music-emu-0.6.3/demo/Wave_Writer.h Examining data/game-music-emu-0.6.3/demo/basics.c Examining data/game-music-emu-0.6.3/demo/basics_mem.c Examining data/game-music-emu-0.6.3/demo/cpp_basics.cpp Examining data/game-music-emu-0.6.3/demo/features.c Examining data/game-music-emu-0.6.3/gme/Ay_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Ay_Apu.h Examining data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Ay_Cpu.h Examining data/game-music-emu-0.6.3/gme/Ay_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Ay_Emu.h Examining data/game-music-emu-0.6.3/gme/Blip_Buffer.cpp Examining data/game-music-emu-0.6.3/gme/Blip_Buffer.h Examining data/game-music-emu-0.6.3/gme/Classic_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Classic_Emu.h Examining data/game-music-emu-0.6.3/gme/Data_Reader.cpp Examining data/game-music-emu-0.6.3/gme/Data_Reader.h Examining data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp Examining data/game-music-emu-0.6.3/gme/Dual_Resampler.h Examining data/game-music-emu-0.6.3/gme/Effects_Buffer.cpp Examining data/game-music-emu-0.6.3/gme/Effects_Buffer.h Examining data/game-music-emu-0.6.3/gme/Fir_Resampler.cpp Examining data/game-music-emu-0.6.3/gme/Fir_Resampler.h Examining data/game-music-emu-0.6.3/gme/Gb_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Gb_Apu.h Examining data/game-music-emu-0.6.3/gme/Gb_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Gb_Cpu.h Examining data/game-music-emu-0.6.3/gme/Gb_Oscs.cpp Examining data/game-music-emu-0.6.3/gme/Gb_Oscs.h Examining data/game-music-emu-0.6.3/gme/Gbs_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Gbs_Emu.h Examining data/game-music-emu-0.6.3/gme/Gme_File.cpp Examining data/game-music-emu-0.6.3/gme/Gme_File.h Examining data/game-music-emu-0.6.3/gme/Gym_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Gym_Emu.h Examining data/game-music-emu-0.6.3/gme/Hes_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Hes_Apu.h Examining data/game-music-emu-0.6.3/gme/Hes_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Hes_Cpu.h Examining data/game-music-emu-0.6.3/gme/Hes_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Hes_Emu.h Examining data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Kss_Cpu.h Examining data/game-music-emu-0.6.3/gme/Kss_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Kss_Emu.h Examining data/game-music-emu-0.6.3/gme/Kss_Scc_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Kss_Scc_Apu.h Examining data/game-music-emu-0.6.3/gme/M3u_Playlist.cpp Examining data/game-music-emu-0.6.3/gme/M3u_Playlist.h Examining data/game-music-emu-0.6.3/gme/Multi_Buffer.cpp Examining data/game-music-emu-0.6.3/gme/Multi_Buffer.h Examining data/game-music-emu-0.6.3/gme/Music_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Music_Emu.h Examining data/game-music-emu-0.6.3/gme/Nes_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Apu.h Examining data/game-music-emu-0.6.3/gme/Nes_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Cpu.h Examining data/game-music-emu-0.6.3/gme/Nes_Fme7_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Fme7_Apu.h Examining data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.h Examining data/game-music-emu-0.6.3/gme/Nes_Oscs.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Oscs.h Examining data/game-music-emu-0.6.3/gme/Nes_Vrc6_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Nes_Vrc6_Apu.h Examining data/game-music-emu-0.6.3/gme/Nsf_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Nsf_Emu.h Examining data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Nsfe_Emu.h Examining data/game-music-emu-0.6.3/gme/Sap_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Sap_Apu.h Examining data/game-music-emu-0.6.3/gme/Sap_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Sap_Cpu.h Examining data/game-music-emu-0.6.3/gme/Sap_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Sap_Emu.h Examining data/game-music-emu-0.6.3/gme/Sms_Apu.cpp Examining data/game-music-emu-0.6.3/gme/Sms_Apu.h Examining data/game-music-emu-0.6.3/gme/Sms_Oscs.h Examining data/game-music-emu-0.6.3/gme/Snes_Spc.cpp Examining data/game-music-emu-0.6.3/gme/Snes_Spc.h Examining data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp Examining data/game-music-emu-0.6.3/gme/Spc_Cpu.h Examining data/game-music-emu-0.6.3/gme/Spc_Dsp.cpp Examining data/game-music-emu-0.6.3/gme/Spc_Dsp.h Examining data/game-music-emu-0.6.3/gme/Spc_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Spc_Emu.h Examining data/game-music-emu-0.6.3/gme/Spc_Filter.cpp Examining data/game-music-emu-0.6.3/gme/Spc_Filter.h Examining data/game-music-emu-0.6.3/gme/Vgm_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Vgm_Emu.h Examining data/game-music-emu-0.6.3/gme/Vgm_Emu_Impl.cpp Examining data/game-music-emu-0.6.3/gme/Vgm_Emu_Impl.h Examining data/game-music-emu-0.6.3/gme/Ym2413_Emu.cpp Examining data/game-music-emu-0.6.3/gme/Ym2413_Emu.h Examining data/game-music-emu-0.6.3/gme/Ym2612_Emu.h Examining data/game-music-emu-0.6.3/gme/Ym2612_GENS.cpp Examining data/game-music-emu-0.6.3/gme/Ym2612_GENS.h Examining data/game-music-emu-0.6.3/gme/Ym2612_MAME.cpp Examining data/game-music-emu-0.6.3/gme/Ym2612_MAME.h Examining data/game-music-emu-0.6.3/gme/Ym2612_Nuked.cpp Examining data/game-music-emu-0.6.3/gme/Ym2612_Nuked.h Examining data/game-music-emu-0.6.3/gme/blargg_common.h Examining data/game-music-emu-0.6.3/gme/blargg_config.h Examining data/game-music-emu-0.6.3/gme/blargg_endian.h Examining data/game-music-emu-0.6.3/gme/blargg_source.h Examining data/game-music-emu-0.6.3/gme/gb_cpu_io.h Examining data/game-music-emu-0.6.3/gme/gme.cpp Examining data/game-music-emu-0.6.3/gme/gme.h Examining data/game-music-emu-0.6.3/gme/gme_types.h Examining data/game-music-emu-0.6.3/gme/hes_cpu_io.h Examining data/game-music-emu-0.6.3/gme/nes_cpu_io.h Examining data/game-music-emu-0.6.3/gme/sap_cpu_io.h Examining data/game-music-emu-0.6.3/player/Audio_Scope.cpp Examining data/game-music-emu-0.6.3/player/Audio_Scope.h Examining data/game-music-emu-0.6.3/player/Music_Player.cpp Examining data/game-music-emu-0.6.3/player/Music_Player.h Examining data/game-music-emu-0.6.3/player/player.cpp Examining data/game-music-emu-0.6.3/test/Wave_Writer.cpp Examining data/game-music-emu-0.6.3/test/Wave_Writer.h Examining data/game-music-emu-0.6.3/test/basics.c Examining data/game-music-emu-0.6.3/test/basics_mem.c FINAL RESULTS: data/game-music-emu-0.6.3/demo/features.c:86:36: [4] (shell) system: 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. printf( "System : %s\n", info->system ); data/game-music-emu-0.6.3/gme/Gme_File.cpp:192:7: [4] (shell) system: 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. out->system [0] = 0; data/game-music-emu-0.6.3/gme/Gme_File.cpp:194:20: [4] (shell) system: 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. copy_field_( out->system, type()->system ); data/game-music-emu-0.6.3/gme/Gme_File.cpp:194:36: [4] (shell) system: 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. copy_field_( out->system, type()->system ); data/game-music-emu-0.6.3/gme/Gme_File.h:17:14: [4] (shell) system: 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. const char* system; /* name of system this music file type is generally for */ data/game-music-emu-0.6.3/gme/Gme_File.h:37:7: [4] (shell) system: 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. char system [256]; data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:68:30: [4] (shell) system: 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. Gme_File::copy_field_( out->system, system ); data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:68:38: [4] (shell) system: 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. Gme_File::copy_field_( out->system, system ); data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.h:60:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. uint8_t& access(); data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.h:74:32: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. inline uint8_t& Nes_Namco_Apu::access() data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.h:88:48: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. inline int Nes_Namco_Apu::read_data() { return access(); } data/game-music-emu-0.6.3/gme/Nes_Namco_Apu.h:99:2: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access() = data; data/game-music-emu-0.6.3/gme/Nsf_Emu.cpp:91:31: [4] (shell) system: 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. Gme_File::copy_field_( out->system, "Famicom" ); data/game-music-emu-0.6.3/gme/Vgm_Emu.cpp:84:35: [4] (shell) system: 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. in = get_gd3_pair( in, end, out->system ); data/game-music-emu-0.6.3/gme/Ym2612_MAME.cpp:203:18: [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. #define logerror printf data/game-music-emu-0.6.3/gme/gme.cpp:336:8: [4] (shell) system: 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. COPY( system ); data/game-music-emu-0.6.3/gme/gme.cpp:419:15: [4] (shell) system: 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. return type->system; data/game-music-emu-0.6.3/gme/gme.h:120:14: [4] (shell) system: 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. const char* system; data/game-music-emu-0.6.3/player/player.cpp:220:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( str, "Error: %s", error ); data/game-music-emu-0.6.3/demo/Wave_Writer.cpp:43:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen( filename, "wb" ); data/game-music-emu-0.6.3/demo/Wave_Writer.cpp:131:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header [header_size] = data/game-music-emu-0.6.3/demo/basics.c:19:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int track = argc >= 3 ? atoi(argv[2]) : 0; data/game-music-emu-0.6.3/demo/basics_mem.c:13:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *in = fopen(file_path, "rb"); data/game-music-emu-0.6.3/demo/basics_mem.c:33:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int track = argc >= 3 ? atoi(argv[2]) : 0; data/game-music-emu-0.6.3/demo/cpp_basics.cpp:19:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int track = argc >= 3 ? atoi(argv[2]) : 0; data/game-music-emu-0.6.3/demo/features.c:27:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* in = fopen( path, "rb" ); data/game-music-emu-0.6.3/gme/Ay_Emu.cpp:220: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( mem.ram + addr, in, len ); data/game-music-emu-0.6.3/gme/Ay_Emu.cpp:248: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( mem.ram, passive, sizeof passive ); data/game-music-emu-0.6.3/gme/Ay_Emu.cpp:253: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( mem.ram, active, sizeof active ); data/game-music-emu-0.6.3/gme/Ay_Emu.cpp:262: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( mem.ram + 0x10000, mem.ram, 0x80 ); // some code wraps around (ugh) data/game-music-emu-0.6.3/gme/Classic_Emu.cpp:152: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( header_out, &rom [file_offset], header_size ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:28: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 gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ data/game-music-emu-0.6.3/gme/Data_Reader.cpp:59: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 [512]; data/game-music-emu-0.6.3/gme/Data_Reader.cpp:124: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( out, old, (size_t) first ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:187: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( p, m_begin + m_pos, static_cast<size_t>(s) ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:312:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* file = fopen( path, "rb" ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:316: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 buf [4]; data/game-music-emu-0.6.3/gme/Data_Reader.cpp:347:31: [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). blargg_err_t Std_File_Reader::open( const char* path ) data/game-music-emu-0.6.3/gme/Data_Reader.cpp:355:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file_ = fopen( path, "rb" ); data/game-music-emu-0.6.3/gme/Data_Reader.h:60: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). blargg_err_t open( const char* path ); data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp:92: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( out, &sample_buf [buf_pos], remain * sizeof *out ); data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp:110: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( out, sample_buf.begin(), count * sizeof *out ); data/game-music-emu-0.6.3/gme/Gb_Apu.cpp:88:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char const powerup_regs [0x20] = { data/game-music-emu-0.6.3/gme/Gb_Apu.cpp:130: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( wave.wave, initial_wave, sizeof initial_wave ); data/game-music-emu-0.6.3/gme/Gb_Cpu.cpp:97: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( &s, &this->state_, sizeof s ); data/game-music-emu-0.6.3/gme/Gb_Cpu.cpp:1054: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( &this->state_, &s, sizeof this->state_ ); data/game-music-emu-0.6.3/gme/Gb_Oscs.cpp:118:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const table [4] = { 1, 2, 4, 6 }; data/game-music-emu-0.6.3/gme/Gb_Oscs.cpp:193:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const table [8] = { 8, 16, 32, 48, 64, 80, 96, 112 }; data/game-music-emu-0.6.3/gme/Gbs_Emu.h:22: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 tag [3]; data/game-music-emu-0.6.3/gme/Gbs_Emu.h:32:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char game [32]; data/game-music-emu-0.6.3/gme/Gbs_Emu.h:33: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 author [32]; data/game-music-emu-0.6.3/gme/Gbs_Emu.h:34: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 copyright [32]; data/game-music-emu-0.6.3/gme/Gme_File.cpp:103: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_ERR( in.open( path ) ); data/game-music-emu-0.6.3/gme/Gme_File.cpp:142: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( out, in, len ); data/game-music-emu-0.6.3/gme/Gme_File.h: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 system [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:38: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 game [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:39: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 song [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:40: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 author [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:41: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 copyright [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:42: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 comment [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:43: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 dumper [256]; data/game-music-emu-0.6.3/gme/Gme_File.h:139: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 playlist_warning [64]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:19: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 tag [4]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:20: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 song [32]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:21: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 game [32]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:22: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 copyright [32]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:23: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 emulator [32]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:24: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 dumper [32]; data/game-music-emu-0.6.3/gme/Gym_Emu.h:25: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 comment [256]; data/game-music-emu-0.6.3/gme/Hes_Apu.h:12: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 wave [32]; data/game-music-emu-0.6.3/gme/Hes_Emu.cpp:113: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 header [Hes_Emu::header_size]; data/game-music-emu-0.6.3/gme/Hes_Emu.cpp:114: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 unused [0x20]; data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:150: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( &ext, rom.begin(), min( (int) ext_header_size, (int) header_.extra_header ) ); data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:214: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( ram + 0x01, bios, sizeof bios ); data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:215: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( ram + 0x93, vectors, sizeof vectors ); data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:224: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( ram + load_addr, rom.begin() + header_.extra_header, load_size ); data/game-music-emu-0.6.3/gme/Kss_Scc_Apu.h:54: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 regs [reg_count]; data/game-music-emu-0.6.3/gme/M3u_Playlist.cpp:44: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( out, str, sizeof str - 1 ); data/game-music-emu-0.6.3/gme/M3u_Playlist.cpp:443: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_ERR( in.open( path ) ); data/game-music-emu-0.6.3/gme/M3u_Playlist.cpp:450: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( data.begin(), in, size ); data/game-music-emu-0.6.3/gme/Music_Emu.cpp:414: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( &out [pos], buf.begin() + (buf_size - buf_remain), n * sizeof *out ); data/game-music-emu-0.6.3/gme/Nes_Apu.cpp:276: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 length_table [0x20] = { data/game-music-emu-0.6.3/gme/Nes_Cpu.cpp:992:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const illop_lens [8] = { data/game-music-emu-0.6.3/gme/Nes_Fme7_Apu.h:51:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const amp_table [16]; data/game-music-emu-0.6.3/gme/Nes_Oscs.h:14: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 regs [4]; data/game-music-emu-0.6.3/gme/Nsf_Emu.cpp:321: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( initial_banks, header_.banks, sizeof initial_banks ); data/game-music-emu-0.6.3/gme/Nsf_Emu.h:22: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 tag [5]; data/game-music-emu-0.6.3/gme/Nsf_Emu.h:29: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 game [32]; data/game-music-emu-0.6.3/gme/Nsf_Emu.h:30: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 author [32]; data/game-music-emu-0.6.3/gme/Nsf_Emu.h:31: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 copyright [32]; data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:167: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( info.load_addr, finfo.load_addr, 2 * 3 ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.h:17: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 game [256]; data/game-music-emu-0.6.3/gme/Nsfe_Emu.h:18: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 author [256]; data/game-music-emu-0.6.3/gme/Nsfe_Emu.h:19: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 copyright [256]; data/game-music-emu-0.6.3/gme/Nsfe_Emu.h:20: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 dumper [256]; data/game-music-emu-0.6.3/gme/Nsfe_Emu.h:48:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. struct header_t { char tag [4]; }; data/game-music-emu-0.6.3/gme/Sap_Apu.h:30:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char regs [2]; data/game-music-emu-0.6.3/gme/Sap_Emu.cpp:102: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( out, start, len ); data/game-music-emu-0.6.3/gme/Sap_Emu.cpp:356: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( mem.ram + start, in, len ); data/game-music-emu-0.6.3/gme/Sap_Emu.h:28: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 author [256]; data/game-music-emu-0.6.3/gme/Sap_Emu.h:29:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name [256]; data/game-music-emu-0.6.3/gme/Sap_Emu.h:30: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 copyright [ 32]; data/game-music-emu-0.6.3/gme/Sms_Apu.cpp:293:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char const volumes [16] = { data/game-music-emu-0.6.3/gme/Sms_Apu.h:67: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 regs [8] [2]; data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:44:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const cycle_table [128] = data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:73: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( reg_times, reg_times_, sizeof reg_times ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp: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( m.rom, in, sizeof m.rom ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:127: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( REGS, in, reg_count ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:128: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( REGS_IN, REGS, reg_count ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:238: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( RAM, spc->ram, 0x10000 ); data/game-music-emu-0.6.3/gme/Snes_Spc.h:150:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static signed char const reg_times_ [256]; data/game-music-emu-0.6.3/gme/Snes_Spc.h:151:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. signed char reg_times [256]; data/game-music-emu-0.6.3/gme/Snes_Spc.h:181:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char cycle_table [256]; data/game-music-emu-0.6.3/gme/Snes_Spc.h:238: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 signature [signature_size]; data/game-music-emu-0.6.3/gme/Snes_Spc.h:247: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 text [212]; data/game-music-emu-0.6.3/gme/Snes_Spc.h:254: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 const signature [signature_size + 1]; data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:87: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( m.hi_ram, &RAM [rom_addr], sizeof m.hi_ram ); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:88: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( &RAM [rom_addr], (enable ? m.rom : m.hi_ram), rom_size ); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:225:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char const glitch_probs [3] [256] = data/game-music-emu-0.6.3/gme/Spc_Dsp.cpp:489:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char const shifts [16 * 2] = { data/game-music-emu-0.6.3/gme/Spc_Dsp.cpp:695: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( m.regs, regs, sizeof m.regs ); data/game-music-emu-0.6.3/gme/Spc_Emu.cpp: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 copyright [256 + 5]; data/game-music-emu-0.6.3/gme/Spc_Emu.cpp:117: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( ©right [year_len], in, copyright_len ); data/game-music-emu-0.6.3/gme/Spc_Emu.h:22: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 tag [35]; data/game-music-emu-0.6.3/gme/Spc_Emu.h:28: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 song [32]; data/game-music-emu-0.6.3/gme/Spc_Emu.h:29: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 game [32]; data/game-music-emu-0.6.3/gme/Spc_Emu.h:30: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 dumper [16]; data/game-music-emu-0.6.3/gme/Spc_Emu.h:31: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 comment [32]; data/game-music-emu-0.6.3/gme/Spc_Emu.h:35:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char author [32]; // sometimes first char should be skipped (see official SPC spec) data/game-music-emu-0.6.3/gme/Vgm_Emu.h:30: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 tag [4]; data/game-music-emu-0.6.3/gme/Ym2612_GENS.cpp:216: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 DT_DEF_TAB [4 * 32] = data/game-music-emu-0.6.3/gme/Ym2612_GENS.cpp:235: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 FKEY_TAB [16] = data/game-music-emu-0.6.3/gme/Ym2612_GENS.cpp:243: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 LFO_AMS_TAB [4] = data/game-music-emu-0.6.3/gme/Ym2612_GENS.cpp:248: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 LFO_FMS_TAB [8] = data/game-music-emu-0.6.3/gme/Ym2612_MAME.cpp:2479: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). sample[0]=fopen("sampsum.pcm","wb"); data/game-music-emu-0.6.3/gme/blargg_endian.h:69:32: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (unsigned) ((unsigned char const*) p) [1] << 8 | data/game-music-emu-0.6.3/gme/blargg_endian.h:70:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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) ((unsigned char const*) p) [0]; data/game-music-emu-0.6.3/gme/blargg_endian.h:75:32: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (unsigned) ((unsigned char const*) p) [0] << 8 | data/game-music-emu-0.6.3/gme/blargg_endian.h:76:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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) ((unsigned char const*) p) [1]; data/game-music-emu-0.6.3/gme/blargg_endian.h:81:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (blargg_ulong) ((unsigned char const*) p) [3] << 24 | data/game-music-emu-0.6.3/gme/blargg_endian.h:82:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [2] << 16 | data/game-music-emu-0.6.3/gme/blargg_endian.h:83:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [1] << 8 | data/game-music-emu-0.6.3/gme/blargg_endian.h:84:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [0]; data/game-music-emu-0.6.3/gme/blargg_endian.h:89:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (blargg_ulong) ((unsigned char const*) p) [0] << 24 | data/game-music-emu-0.6.3/gme/blargg_endian.h:90:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [1] << 16 | data/game-music-emu-0.6.3/gme/blargg_endian.h:91:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [2] << 8 | data/game-music-emu-0.6.3/gme/blargg_endian.h:92:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (blargg_ulong) ((unsigned char const*) p) [3]; data/game-music-emu-0.6.3/gme/gme.cpp:107: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 extension [6]; data/game-music-emu-0.6.3/gme/gme.cpp:130: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 header [4]; data/game-music-emu-0.6.3/gme/gme.cpp:132: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). RETURN_ERR( in.open( path ) ); data/game-music-emu-0.6.3/gme/gme.cpp:169: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_ERR( in.open( path ) ); data/game-music-emu-0.6.3/gme/gme.cpp:171: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 [4]; data/game-music-emu-0.6.3/player/Music_Player.cpp:83: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 m3u_path [256 + 5]; data/game-music-emu-0.6.3/player/Music_Player.cpp:89: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( p, ".m3u" ); data/game-music-emu-0.6.3/player/Music_Player.cpp:195: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( self->scope_buf, out, self->scope_buf_size * sizeof *self->scope_buf ); data/game-music-emu-0.6.3/player/player.cpp:81: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 [512]; data/game-music-emu-0.6.3/player/player.cpp:219:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str [256]; data/game-music-emu-0.6.3/test/Wave_Writer.cpp:43:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen( filename, "wb" ); data/game-music-emu-0.6.3/test/Wave_Writer.cpp:131:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header [header_size] = data/game-music-emu-0.6.3/test/basics_mem.c:12:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *in = fopen(file_path, "rb"); data/game-music-emu-0.6.3/test/basics_mem.c:34:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int track = argc >= 3 ? atoi(argv[2]) : 0; data/game-music-emu-0.6.3/demo/Wave_Writer.cpp:28:32: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); data/game-music-emu-0.6.3/demo/basics.c:57:33: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); data/game-music-emu-0.6.3/demo/basics_mem.c:81:33: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); data/game-music-emu-0.6.3/demo/cpp_basics.cpp:67:33: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); data/game-music-emu-0.6.3/demo/features.c:145:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/game-music-emu-0.6.3/demo/features.c:153:33: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:810:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RLC( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:811:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t result = read;\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:829:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RL( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:830:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16_t result = (read << 1) | (flags & C01);\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:847:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SLA( read, add, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:848:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16_t result = (read << 1) | add;\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:878:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RRC( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:879:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t result = read;\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:898:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RR( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:899:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t result = read;\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:918:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SRA( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:919:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t result = read;\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:938:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SRL( read, write ) {\ data/game-music-emu-0.6.3/gme/Ay_Cpu.cpp:939:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t result = read;\ data/game-music-emu-0.6.3/gme/Blip_Buffer.h:327:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blip_long read() const { return accum >> (blip_sample_bits - 16); } data/game-music-emu-0.6.3/gme/Classic_Emu.cpp:144:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). err = in.read( rom.begin() + file_offset, file_size_ ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:39:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t Data_Reader::read( void* p, long s ) data/game-music-emu-0.6.3/gme/Data_Reader.cpp:66:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( read( buf, n ) ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:143:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t Remaining_Reader::read( void* out, long count ) data/game-music-emu-0.6.3/gme/Data_Reader.cpp:150:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return in->read( (char*) out + first, second ); data/game-music-emu-0.6.3/gme/Data_Reader.cpp:293:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( count < 0 || Callback_Reader::read( out, count ) ) data/game-music-emu-0.6.3/gme/Data_Reader.cpp:298:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t Callback_Reader::read( void* out, long count ) data/game-music-emu-0.6.3/gme/Data_Reader.cpp:391:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t Std_File_Reader::read( void* p, long s ) data/game-music-emu-0.6.3/gme/Data_Reader.h:24:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual blargg_err_t read( void*, long count ); data/game-music-emu-0.6.3/gme/Data_Reader.h:67:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t read( void*, long ); data/game-music-emu-0.6.3/gme/Data_Reader.h:126:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t read( void*, long ); data/game-music-emu-0.6.3/gme/Data_Reader.h:141:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t read( void*, long ); data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp:73:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). resampler.read( sample_buf.begin(), sample_buf_size ); data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp:75:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long count = resampler.read( sample_buf.begin(), sample_buf_size ); data/game-music-emu-0.6.3/gme/Dual_Resampler.cpp:123:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int s = sn.read(); data/game-music-emu-0.6.3/gme/Fir_Resampler.h:88:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read( sample_t* out, blargg_long count ); data/game-music-emu-0.6.3/gme/Fir_Resampler.h:100:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int Fir_Resampler<width>::read( sample_t* out_begin, blargg_long count ) data/game-music-emu-0.6.3/gme/Gbs_Emu.cpp:85:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t err = in.read( &h, Gbs_Emu::header_size ); data/game-music-emu-0.6.3/gme/Gme_File.cpp:63:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( file_data.begin(), file_data.size() ) ); data/game-music-emu-0.6.3/gme/Hes_Emu.cpp:123:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t err = in.read( &h, sizeof h ); data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:79:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline void Kss_Cpu::set_page( int i, void* write, void const* read ) data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:83:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). state->read [i] = (byte const*) read - offset; data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:100:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Kss_Cpu::map_mem( unsigned addr, blargg_ulong size, void* write, void const* read ) data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:116:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define READ_PROG( addr ) RW_MEM( addr, read ) data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:203:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t const* instr = s.read [pc >> page_shift]; data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:845:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RLC( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:846:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast8_t result = read;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:864:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RL( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:865:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast16_t result = (read << 1) | (flags & C01);\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:882:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SLA( read, add, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:883:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast16_t result = (read << 1) | add;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:913:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RRC( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:914:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast8_t result = read;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:933:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define RR( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:934:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast8_t result = read;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:953:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SRA( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:954:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast8_t result = read;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:973:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SRL( read, write ) {\ data/game-music-emu-0.6.3/gme/Kss_Cpu.cpp:974:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint_fast8_t result = read;\ data/game-music-emu-0.6.3/gme/Kss_Cpu.h:23:75: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void map_mem( unsigned addr, blargg_ulong size, void* write, void const* read ); data/game-music-emu-0.6.3/gme/Kss_Cpu.h:27:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t const* read( unsigned addr ); data/game-music-emu-0.6.3/gme/Kss_Cpu.h:84:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t const* read [page_count + 1]; data/game-music-emu-0.6.3/gme/Kss_Cpu.h:92:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void set_page( int i, void* write, void const* read ); data/game-music-emu-0.6.3/gme/Kss_Cpu.h:108:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline uint8_t const* Kss_Cpu::read( unsigned addr ) data/game-music-emu-0.6.3/gme/Kss_Cpu.h:110:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return state->read [addr >> page_shift] + KSS_CPU_PAGE_OFFSET( addr ); data/game-music-emu-0.6.3/gme/Kss_Emu.cpp:92:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t err = in.read( &header_, Kss_Emu::header_size ); data/game-music-emu-0.6.3/gme/M3u_Playlist.cpp:436:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( data.begin(), data.size() - 1 ) ); data/game-music-emu-0.6.3/gme/Nsf_Emu.cpp:115:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t err = in.read( &h, Nsf_Emu::header_size ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:60:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( &chars [0], size ) ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:81:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( out, in, out_max - 1 ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:103:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blargg_err_t err = in.read( signature, sizeof signature ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:138:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( block_header, sizeof block_header ) ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:158:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( &finfo, min( size, (blargg_long) nsfe_info_size ) ) ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:174:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( info.banks, size ) ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:200:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( track_times.begin(), track_times.size() * 4 ) ); data/game-music-emu-0.6.3/gme/Nsfe_Emu.cpp:209:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( &playlist [0], size ) ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:253:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( !(dsp.read( Spc_Dsp::r_flg ) & 0x20) ) data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:255:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int addr = 0x100 * dsp.read( Spc_Dsp::r_esa ); data/game-music-emu-0.6.3/gme/Snes_Spc.cpp:256:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int end = addr + 0x800 * (dsp.read( Spc_Dsp::r_edl ) & 0x0F); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:145:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int result = dsp.read( REGS [r_dspaddr] & 0x7F ); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:162:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m.skipped_kon |= data & ~dsp.read( Spc_Dsp::r_koff ); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:199:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( !(dsp.read( Spc_Dsp::r_flg ) & 0x20) ) data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:201:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int start = 0x100 * dsp.read( Spc_Dsp::r_esa ); data/game-music-emu-0.6.3/gme/Spc_Cpu.cpp:202:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int size = 0x800 * (dsp.read( Spc_Dsp::r_edl ) & 0x0F); data/game-music-emu-0.6.3/gme/Spc_Dsp.h:36:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read ( int addr ) const; data/game-music-emu-0.6.3/gme/Spc_Dsp.h:159:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline int Spc_Dsp::read( int addr ) const data/game-music-emu-0.6.3/gme/Spc_Emu.cpp:227:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( &header, Spc_Emu::header_size ) ); data/game-music-emu-0.6.3/gme/Spc_Emu.cpp:235:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( xid6.begin(), xid6.size() ) ); data/game-music-emu-0.6.3/gme/Spc_Emu.cpp:352:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). remain -= resampler.read( &out [count - remain], remain ); data/game-music-emu-0.6.3/gme/Vgm_Emu.cpp:177:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( &h, Vgm_Emu::header_size ) ); data/game-music-emu-0.6.3/gme/Vgm_Emu.cpp:186:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( gd3_h, sizeof gd3_h ) ); data/game-music-emu-0.6.3/gme/Vgm_Emu.cpp:191:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( gd3.begin(), gd3.size() ) ); data/game-music-emu-0.6.3/gme/Ym2612_MAME.cpp:246:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read)(void *param); data/game-music-emu-0.6.3/gme/gme.cpp:133:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( header, sizeof header ) ); data/game-music-emu-0.6.3/gme/gme.cpp:178:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). RETURN_ERR( in.read( header, sizeof header ) ); data/game-music-emu-0.6.3/player/Music_Player.cpp:84:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( m3u_path, path, 256 ); data/game-music-emu-0.6.3/player/Music_Player.cpp:88: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). p = m3u_path + strlen( m3u_path ); data/game-music-emu-0.6.3/test/Wave_Writer.cpp:28:32: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf( "Error: %s\n", str ); getchar(); ANALYSIS SUMMARY: Hits = 260 Lines analyzed = 37158 in approximately 0.85 seconds (43462 lines/second) Physical Source Lines of Code (SLOC) = 27720 Hits@level = [0] 36 [1] 99 [2] 142 [3] 0 [4] 19 [5] 0 Hits@level+ = [0+] 296 [1+] 260 [2+] 161 [3+] 19 [4+] 19 [5+] 0 Hits/KSLOC@level+ = [0+] 10.6782 [1+] 9.37951 [2+] 5.80808 [3+] 0.685426 [4+] 0.685426 [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.