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/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/irq.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_polygon.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/dualanalog.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/memcard.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/guncon.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/multitap.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/multitap.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/memcard.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/mouse.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/justifier.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/mouse.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/negcon.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/gamepad.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/gamepad.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/dualanalog.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/negcon.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/dualshock.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/guncon.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/justifier.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/dualshock.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/spu.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/mdec.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dma.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gte.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/notes/tristep.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/sio.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gte.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/FastFIFO.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/mdec.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dma.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/debug.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_common.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cpu.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/timer.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_line.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_sprite.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cpu.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/debug.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/spu.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/irq.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/sio.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/timer.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/psx.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/misc.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/SimpleFIFO.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/audioreader.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/l-ec.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/l-ec.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/misc.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/edc_crc32.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/edc_crc32.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/audioreader.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/galois.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/SimpleFIFO.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/lec.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/lec.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/galois.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDUtility.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDUtility.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codec_internal.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/os_types.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/ivorbisfile.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/mdct_lookup.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/os.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/window.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/tremor_shared.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/window.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/asm_arm.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/ogg.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/res012.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/config_types.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/mdct.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/mdct.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/misc.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/window_lookup.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/floor1.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/sharedbook.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/registry.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/registry.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/backends.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/ivorbiscodec.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/mapping0.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/floor0.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/block.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/block.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/synthesis.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/vorbisfile.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/bitwise.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/lsp_lookup.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/FileStream.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/triostr.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/triodef.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/triop.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trionan.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/retro_inline.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/rthreads/rthreads.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/boolean.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mednafen-driver.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/surface.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/surface.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/general.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings-common.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/git.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/FileStream.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings-driver.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/error.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mednafen.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher-driver.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mednafen-types.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/masmem.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mednafen-endian.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mednafen-endian.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/clamp.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/msvc_compat.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/file.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/file.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/math_ops.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/general.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/driver.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/error.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/scrc32.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/gx_pthread.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/xenon_sdl_threads.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/psp_pthread.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/rthreads.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/rthreads/rthreads.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/retro_file.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/retro_inline.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/retro_miscellaneous.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/retro_stat.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_file.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_stat.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/scrc32.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/beetle_psx_griffin_c.c Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/msvc/msvc-2003/stdint.h Examining data/libretro-beetle-psx-0.9.38.6+git20151019/beetle_psx_griffin.cpp Examining data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.h FINAL RESULTS: data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:155:9: [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. # undef printf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:156:10: [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 printf trio_printf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:159:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef vprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:160:10: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define vprintf trio_vprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:163:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef fprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:164:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define fprintf trio_fprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:167:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef vfprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:168:10: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define vfprintf trio_vfprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:171:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # undef sprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:172:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define sprintf trio_sprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:175:9: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # undef vsprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:176:10: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define vsprintf trio_vsprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:179:9: [4] (format) snprintf: 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. # undef snprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:180:10: [4] (format) snprintf: 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. # define snprintf trio_snprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:183:9: [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. # undef vsnprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:184:10: [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. # define vsnprintf trio_vsnprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:187:9: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef scanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:188:10: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define scanf trio_scanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:191:9: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef vscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:192:10: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define vscanf trio_vscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:195:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef fscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:196:10: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define fscanf trio_fscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:199:9: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef vfscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:200:10: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define vfscanf trio_vfscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:203:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef sscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:204:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define sscanf trio_sscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:207:9: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef vsscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/trio/trio.h:208:10: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define vsscanf trio_vsscanf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:620:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(next->name,name); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/msvc_compat.h:37:9: [4] (format) snprintf: 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. #define snprintf _snprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/msvc_compat.h:37:18: [4] (format) _snprintf: 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. #define snprintf _snprintf data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/psx.h:29:88: [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. void PSX_DBG(unsigned level, const char *format, ...) throw() MDFN_COLD MDFN_FORMATSTR(printf, 2, 3); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:62:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fulltag, tag); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:81:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fulltag,tag); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c:424:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). return (strcat(target, source) != NULL); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c:516:9: [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). (void)strcpy(target, source); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_file.c:167:17: [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). stream->fd = fopen(path, mode_str); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_file.c: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). stream->fd = open(path, flags); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/psp_pthread.h:47:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_buffer[256]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/psp_pthread.h:68:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name_buffer, "0x%08X", (uint32_t) thread); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/rthreads/psp_pthread.h:83:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name_buffer, "0x%08X", (uint32_t) mutex); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:32:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char retro_save_directory[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:33:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char retro_base_directory[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:34: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. static char retro_cd_base_directory[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:35: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. static char retro_cd_path[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:36:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char retro_cd_base_name[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1242:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1249:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1279:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1361:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ext[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1425: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(&TextMem[TextStart - TextMem_Start], data + 0x800, TextSize); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1618:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ext[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1766: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 tmp[256]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2209: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(MDFNGameInfo->MD5, LayoutMD5, 16); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2438:34: [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). setting_initial_scanline = atoi(var.value); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2445:31: [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). setting_last_scanline = atoi(var.value); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2452:38: [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). setting_initial_scanline_pal = atoi(var.value); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2459:35: [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). setting_last_scanline_pal = atoi(var.value); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2522: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 linebuf[2048]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2523: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 *fp = fopen(path.c_str(), "rb"); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2654: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(MDFNGameInfo->MD5, LayoutMD5, 16); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2733: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 tocbasepath[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:3196:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 ext[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:3482: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(data,st.data,size); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:3547: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. static char fullpath[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.cpp:55: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_buffer, zs->data_buffer, (size_t)data_buffer_size); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:90: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 img_extsd[4] = { 'i', 'm', 'g', 0 }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:91: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 sub_extsd[4] = { 's', 'u', 'b', 0 }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:99:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. signed char extupt[3] = { -1, -1, -1 }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:190:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpbuf[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:90:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *DI_CDRDAO_Strings[7] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:101:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *DI_CUE_Strings[7] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:312:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmpq, &ed[4], 10); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:320:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(SubQReplaceMap[aba].data, tmpq, 12); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:413:16: [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(&Tracks[active_track], &TmpTrack, sizeof(TmpTrack)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:580:16: [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(&Tracks[active_track], &TmpTrack, sizeof(TmpTrack)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:623:16: [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(&Tracks[active_track], &TmpTrack, sizeof(TmpTrack)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:631:28: [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). active_track = atoi(args[0].c_str()); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:746:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&Tracks[active_track], &TmpTrack, sizeof(TmpTrack)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:842:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sbi_ext[4] = { 's', 'b', 'i', 0 }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:1013:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dummy_buf + 16, buf + 16, 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:1134:10: [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, it->second.data, 12); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:386:10: [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(SectorBuffers[SBWritePos].data, tmpbuf, 2352 + 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:523:13: [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, SectorBuffers[i].data, 2352 + 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:558: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, tmpbuf + 2352, 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:600:13: [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(pBuf, &tmpbuf[12 + 4], 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:603:13: [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(pBuf, &tmpbuf[12 + 4 + 8], 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:710: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, tmpbuf + 2352, 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:823:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*)data + (rp - position), data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/l-ec.c:348:10: [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(lambda, t, (NROOTS+1)*sizeof(t[0])); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/l-ec.c:363: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(reg+1, lambda+1, NROOTS*sizeof(reg[0])); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.c:87:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 byte_state[2352]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.c:88:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 p_vector[P_VECTOR_SIZE]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.c:89:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 q_vector[Q_VECTOR_SIZE]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/recover-raw.c:90:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 p_state[P_VECTOR_SIZE]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/error.h:69: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 local_strerror[256]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/file.c:36: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, "rb"); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/file.c:93:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*)ptr, file->data + file->location, ak); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/file.c:100: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((uint8_t*)ptr, file->data + file->location, total); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/git.h:69: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. const char *RotateName[3]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c:184:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)(ctx->buffer + left), (void*)input, fill); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c:199:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)(ctx->buffer + left), (void*)input, length); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c:244:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *md5_asciistr(uint8_t digest[16]) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c:246: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. static char str[33]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.c:247: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. static char trans[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/md5.h:23:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *md5_asciistr(uint8_t digest[16]); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:267: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 address[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:268: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 operation[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:269: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 value[64]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:444:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char lut[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:457: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 str[10]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:508: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 lets[16]={'A','P','Z','L','G','I','T','Y','E','O','X','U','K','S','V','N'}; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:469:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(SubQBuf, tmp_q, 0xC); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:474:10: [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(SubQBuf_Safe, tmp_q, 0xC); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:972:13: [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(HeaderBuf, buf + 12, 12); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:1012:16: [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(SB, buf + 12 + offs, size); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:1032: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(SectorPipe[SectorPipe_Pos], read_buf, 2352); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.h:23:54: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void SetDisc(bool tray_open, CDIF *cdif, const char disc_id[4]); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:224: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 const char *gpr_names[32] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:230: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 const char *cop0_names[32] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:236: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 const char *gte_cr_names[32] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:242: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 const char *gte_dr_names[32] = data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:270:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_a[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:271:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_i[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:272:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_z[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:273:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_p[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:274:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_P[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:275:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_c[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:276:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s_C[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:306: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. char as[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:339: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. char s_F[16]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dma.cpp:69:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *PrettyChannelNames[7] = { "MDEC IN", "MDEC OUT", "GPU", "CDC", "SPU", "PIO", "OTC" }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp:166: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 tmpbuf[32]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp:174: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 tmpbuf[32]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp:182: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 tmpbuf[32]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp:839:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_polygon.cpp:443:10: [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(&vertices[0], &InQuad_F3Vertices[1], 2 * sizeof(tri_vertex)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/gpu_polygon.cpp:498:10: [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(&InQuad_F3Vertices[0], &vertices[0], sizeof(tri_vertex) * 3); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/input/memcard.cpp:456:22: [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(&card_data[addr << 7], rw_buffer, 128); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp:36:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char retro_cd_base_name[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp:37:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char retro_save_directory[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp:38:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char retro_base_directory[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp:143:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fullpath[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/settings.cpp:149:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fullpath[4096]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:36: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(buffer, st->data + st->loc, len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:53: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(st->data + st->loc, buffer, len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:142:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nameo[1 + 256]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:418:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sname[32]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:495: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(header, header_magic, 8); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/floor0.c:120: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 MLOOP_1[64]={ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/floor0.c:127: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 MLOOP_2[64]={ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/floor0.c:134: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 MLOOP_3[8]={0,1,2,2,3,3,3,3}; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:316: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(os->body_data+os->body_fill, iov[i].iov_base, iov[i].iov_len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:406: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(os->header,"OggS",4); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:667: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 chksum[4]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:670: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(chksum,page+22,4); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:685:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(page+22,chksum,4); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:855: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(os->body_data+os->body_fill,body,bodysize); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1105: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(temp,og->header,og->header_len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1109: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(temp,og->body,og->body_len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1529:13: [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(next,og.header,byteskipcount-byteskip); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1536:13: [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(next,og.body,byteskipcount-byteskip); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1813:9: [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(ogg_sync_buffer(&oy,og[i].header_len),og[i].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1816:9: [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(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1862:9: [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(ogg_sync_buffer(&oy,og[i].header_len),og[i].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1865:9: [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(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1915:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1921:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+3, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1927:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+23, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1934:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+28, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1939:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,1000); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1943:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body+1000, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1957:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1961:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1965:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1971:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+20, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1974:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1989:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1993:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:1997:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2001:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2008:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header+20, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2011:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2025:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2029:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2033:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2037:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2043:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2047:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[3].header_len),og[3].header, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/framing.c:2051:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ogg_sync_buffer(&oy,og[3].body_len),og[3].body, data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:308: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 buffer[6]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:344:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[6]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/mdct.c:249: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 bitrev[16]={0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/ogg.h:69: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[282]; /* working space for header encode */ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/vorbisfile.c:889: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(buffer,initial,ibytes); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/vorbisfile.c:915: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(vf->serialnos+2,serialno_list,serialno_list_size*sizeof(*vf->serialnos)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:749: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. static char internalThousandSeparator[MAX_LOCALE_SEPARATOR_LENGTH + 1] = ","; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:750: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. static char internalGrouping[MAX_LOCALE_GROUPS] = { (char)NO_GROUPING }; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:1759: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 *)(argarray[num]); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:1783:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (trio_pointer_t)((char *)argarray[num]); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:1871:64: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((char *)argarray[num])); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:1939: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 buffer[MAX_CHARS_IN(trio_uintmax_t) * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:2277: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 buffer[MB_LEN_MAX + 1]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:3577: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 buffer[MB_LEN_MAX + 1]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:3721: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 buffer[sizeof(internalNullString)]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:3738: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. *target = &((char *)0)[number]; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.cpp:91: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(dest, src, LWBuffer[y] * sizeof(T)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.cpp:102: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(dest, src, *src_lw * sizeof(T)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.cpp:125: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(dest, src, *src_lw * sizeof(T)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/video/Deinterlacer.cpp:141: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(dest, src, *src_lw * sizeof(uint32)); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_file.c:252:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(stream->fd, s, len); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/file/retro_stat.c:87:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(tmp); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro-common/include/retro_miscellaneous.h:92:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * msec); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:54:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, base, size - 1); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:64:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, path, size - 1); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:998:49: [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((char *)buf + 10, "Licensed by", strlen("Licensed by"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1038:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fp->read(pvd, 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1067:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fp->read(dr + 1, len_dr - 1); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1080:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fp->read(fb, 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1098: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). if(strlen(bootpos) == 4 && bootpos[0] == 'S' && (bootpos[1] == 'C' || bootpos[1] == 'L' || bootpos[1] == 'I')) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:1348:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BIOSFile.read(BIOSROM->data8, 512 * 1024); data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2577:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(devicename && strlen(devicename) > 4 && !strcasecmp(devicename + strlen(devicename) - 4, ".m3u")) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2577:71: [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(devicename && strlen(devicename) > 4 && !strcasecmp(devicename + strlen(devicename) - 4, ".m3u")) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2683:5: [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(name) > 4 && (!strcasecmp(name + strlen(name) - 4, ".cue") || !strcasecmp(name + strlen(name) - 4, ".ccd") || !strcasecmp(name + strlen(name) - 4, ".toc") || !strcasecmp(name + strlen(name) - 4, ".m3u"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2683:45: [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(name) > 4 && (!strcasecmp(name + strlen(name) - 4, ".cue") || !strcasecmp(name + strlen(name) - 4, ".ccd") || !strcasecmp(name + strlen(name) - 4, ".toc") || !strcasecmp(name + strlen(name) - 4, ".m3u"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2683:93: [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(name) > 4 && (!strcasecmp(name + strlen(name) - 4, ".cue") || !strcasecmp(name + strlen(name) - 4, ".ccd") || !strcasecmp(name + strlen(name) - 4, ".toc") || !strcasecmp(name + strlen(name) - 4, ".m3u"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2683:141: [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(name) > 4 && (!strcasecmp(name + strlen(name) - 4, ".cue") || !strcasecmp(name + strlen(name) - 4, ".ccd") || !strcasecmp(name + strlen(name) - 4, ".toc") || !strcasecmp(name + strlen(name) - 4, ".m3u"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2683:189: [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(name) > 4 && (!strcasecmp(name + strlen(name) - 4, ".cue") || !strcasecmp(name + strlen(name) - 4, ".ccd") || !strcasecmp(name + strlen(name) - 4, ".toc") || !strcasecmp(name + strlen(name) - 4, ".m3u"))) data/libretro-beetle-psx-0.9.38.6+git20151019/libretro.cpp:2700:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(x=0;x<strlen((char *)MDFNGameInfo->name);x++) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/FileStream.cpp:67:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint64_t FileStream::read(void *data, uint64_t count, bool error_on_eos) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/FileStream.h:36:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual uint64_t read(void *data, uint64_t count, bool error_on_eos = true); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.cpp:42:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream->read(data_buffer, data_buffer_size); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.cpp:119:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint64 MemoryStream::read(void *data, uint64 count, bool error_on_eos) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/MemoryStream.h:45:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual uint64 read(void *data, uint64 count, bool error_on_eos = true); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.cpp:39:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(read(&c, sizeof(c), false) > 0) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.h:32:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual uint64_t read(void *data, uint64_t count, bool error_on_eos = true) = 0; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.h:53:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&ret, sizeof(ret)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.h:69:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&ret, sizeof(ret)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/Stream.h:87:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(tmp, sizeof(tmp)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess.cpp:46:5: [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(path) >= 4 && !strcasecmp(path + strlen(path) - 4, ".ccd")) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess.cpp:46:45: [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(path) >= 4 && !strcasecmp(path + strlen(path) - 4, ".ccd")) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:304:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sub_stream->read(buf.full, 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:375:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). img_stream->read(buf, 2352); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_CCD.cpp:378:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sub_stream->read(sub_buf, 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:297:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sbis.read(header, 4); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:302:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(sbis.read(ed, sizeof(ed), false) == sizeof(ed)) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:357:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(fp.read(bom_tmp, 3, false) == 3 && bom_tmp[0] == 0xEF && bom_tmp[1] == 0xBB && bom_tmp[2] == 0xBF) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:960:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf, 2352); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:967:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf + 12 + 3 + 1, 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:973:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf, 2352); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:977:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf + 16, 2336); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:985:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf + 24, 2048); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:990:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf + 24, 2324); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/CDAccess_Image.cpp:997:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ct->fp->read(buf + 2352, 96); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/audioreader.cpp:86:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return fw->read(ptr, size * nmemb, false) / size; data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:760:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual uint64 read(void *data, uint64 count, bool error_on_eos = true); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/cdrom/cdromif.cpp:801:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint64 CDIF_Stream_Thing::read(void *data, uint64 count, bool error_on_eos) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/error.cpp:124:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(local_strerror, strerror(the_errno), 255); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/general.cpp:202:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int32 len = strlen(string); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/include/rthreads/rthreads.h:211:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * msec); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:469:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:528:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s=strlen(str); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:587:5: [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(str)!=8) return(0); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/mempatcher.cpp:617: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). if((t=(char *)realloc(next->name,strlen(name+1)))) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/cdc.cpp:112:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)DiscID, disc_id, 4); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/debug.cpp:316:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(TextBuf, DisassembleMIPS(A, instr).c_str(), 256); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/dis.cpp:299:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(unsigned int i = 0; i < strlen(op->format); i++) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/psx/frontio.cpp:889:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mf.read(DevicesMC[which]->GetNVData(), (1 << 17)); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:216:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)sname_tmp, sname, 32); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/state.cpp:218: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(sname) > 32) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.c:171:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lok = oggpack_look(b, read); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.c:173:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(lok<0 && read>1) data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.c:174:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lok = oggpack_look(b, --read); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/codebook.c:192:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(book->dec_codelengths[lo]<=read){ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:59:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int taglen = strlen(tag)+1; /* +1 for the = we append */ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:63:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(fulltag, "="); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:79:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int taglen = strlen(tag)+1; /* +1 for the = we append */ data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/tremor/info.c:82:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(fulltag, "="); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:180:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(int handle, char *buffer, unsigned int length); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/trio.c:184:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c:368:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(string); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c:462:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(target, source, max - length - 1); data/libretro-beetle-psx-0.9.38.6+git20151019/mednafen/trio/triostr.c:553:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(target, source, max - 1); ANALYSIS SUMMARY: Hits = 283 Lines analyzed = 60925 in approximately 1.56 seconds (39021 lines/second) Physical Source Lines of Code (SLOC) = 42158 Hits@level = [0] 190 [1] 73 [2] 174 [3] 0 [4] 36 [5] 0 Hits@level+ = [0+] 473 [1+] 283 [2+] 210 [3+] 36 [4+] 36 [5+] 0 Hits/KSLOC@level+ = [0+] 11.2197 [1+] 6.71284 [2+] 4.98126 [3+] 0.85393 [4+] 0.85393 [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.