game-music-emu-0.6.4-1.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-823): [#def1]
game-music-emu-0.6.4/gme/Ay_Apu.cpp:136: error[arrayIndexOutOfBounds]: Array 'env.modes[8][48]' accessed at index 8, which is out of bounds.
#  134|   		if ( !(data & 8) ) // convert modes 0-7 to proper equivalents
#  135|   			data = (data & 4) ? 15 : 9;
#  136|-> 		env.wave = env.modes [data - 7];
#  137|   		env.pos = -48;
#  138|   		env.delay = 0; // will get set to envelope period in run_until()

Error: CPPCHECK_WARNING (CWE-119): [#def2]
game-music-emu-0.6.4/gme/Nsfe_Emu.cpp:167: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: finfo.load_addr
#  165|   				this->actual_track_count_ = finfo.track_count;
#  166|   				info.first_track = finfo.first_track;
#  167|-> 				memcpy( info.load_addr, finfo.load_addr, 2 * 3 );
#  168|   				break;
#  169|   			}

Error: CPPCHECK_WARNING (CWE-628): [#def3]
game-music-emu-0.6.4/gme/ext/emu2413.c:271: warning[invalidFunctionArg]: Invalid log10() argument nr 1. The value is 0 but the valid values are '4.94066e-324:'.
#  269|       return (DB_MUTE - 1);
#  270|     else
#  271|->     return Min (-(e_int32) (20.0 * log10 (d) / DB_STEP), DB_MUTE-1);  /* 0 -- 127 */
#  272|   }
#  273|   

Error: CPPCHECK_WARNING (CWE-758): [#def4]
game-music-emu-0.6.4/gme/ext/emu2413.c:1071: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1069|   
# 1070|   #ifndef EMU2413_COMPACTION
# 1071|->   opll->realstep = (e_uint32) ((1 << 31) / rate);
# 1072|     opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72));
# 1073|     opll->oplltime = 0;

Error: CPPCHECK_WARNING (CWE-758): [#def5]
game-music-emu-0.6.4/gme/ext/emu2413.c:1072: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1070|   #ifndef EMU2413_COMPACTION
# 1071|     opll->realstep = (e_uint32) ((1 << 31) / rate);
# 1072|->   opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72));
# 1073|     opll->oplltime = 0;
# 1074|     /*for (i = 0; i < 14; i++)

Error: COMPILER_WARNING (CWE-252): [#def6]
game-music-emu-0.6.4/player/Music_Player.cpp: scope_hint: In function ‘const arc_type_t* identify_archive(const char*)’
game-music-emu-0.6.4/player/Music_Player.cpp:103:14: warning[-Wunused-result]: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’
#  103 |         fread( h, 1, sizeof h, in );
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#  101|   	if ( !in )
#  102|   		return nullptr;
#  103|-> 	fread( h, 1, sizeof h, in );
#  104|   	fclose( in );
#  105|   	header = BLARGG_4CHAR( h[0], h[1], h[2], h[3] );

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-241.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namegame-music-emu-0.6.4-1.fc43
store-results-to/tmp/tmp0jolunkn/game-music-emu-0.6.4-1.fc43.tar.xz
time-created2025-04-25 12:33:26
time-finished2025-04-25 12:34:50
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp0jolunkn/game-music-emu-0.6.4-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp0jolunkn/game-music-emu-0.6.4-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9