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/zytrax-0+git20190810/bin/zytrax.cpp Examining data/zytrax-0+git20190810/drivers/lv2/audio_effect_factory_lv2.cpp Examining data/zytrax-0+git20190810/drivers/lv2/audio_effect_factory_lv2.h Examining data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp Examining data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.h Examining data/zytrax-0+git20190810/drivers/rtaudio/sound_driver_rtaudio.cpp Examining data/zytrax-0+git20190810/drivers/rtaudio/sound_driver_rtaudio.h Examining data/zytrax-0+git20190810/drivers/rtmidi/midi_driver_rtmidi.cpp Examining data/zytrax-0+git20190810/drivers/rtmidi/midi_driver_rtmidi.h Examining data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp Examining data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.h Examining data/zytrax-0+git20190810/drivers/vst2/audio_effect_provider_vst2.cpp Examining data/zytrax-0+git20190810/drivers/vst2/audio_effect_provider_vst2.h Examining data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp Examining data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.h Examining data/zytrax-0+git20190810/drivers/vst2/effect_editor_vst2.cpp Examining data/zytrax-0+git20190810/drivers/vst2/effect_editor_vst2.h Examining data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.cpp Examining data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.h Examining data/zytrax-0+git20190810/drivers/vst2/factory_wrapper_vst2.cpp Examining data/zytrax-0+git20190810/drivers/vst2/factory_wrapper_vst2.h Examining data/zytrax-0+git20190810/drivers/vst2/vestige.h Examining data/zytrax-0+git20190810/dsp/db.h Examining data/zytrax-0+git20190810/dsp/filter.cpp Examining data/zytrax-0+git20190810/dsp/filter.h Examining data/zytrax-0+git20190810/dsp/frame.h Examining data/zytrax-0+git20190810/dsp/midi_event.cpp Examining data/zytrax-0+git20190810/dsp/midi_event.h Examining data/zytrax-0+git20190810/effects/effects.cpp Examining data/zytrax-0+git20190810/effects/effects.h Examining data/zytrax-0+git20190810/effects/internal/effect_amplifier.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_amplifier.h Examining data/zytrax-0+git20190810/effects/internal/effect_chorus.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_chorus.h Examining data/zytrax-0+git20190810/effects/internal/effect_compressor.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_compressor.h Examining data/zytrax-0+git20190810/effects/internal/effect_delay.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_delay.h Examining data/zytrax-0+git20190810/effects/internal/effect_equalizer.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_equalizer.h Examining data/zytrax-0+git20190810/effects/internal/effect_filter.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_filter.h Examining data/zytrax-0+git20190810/effects/internal/effect_limiter.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_limiter.h Examining data/zytrax-0+git20190810/effects/internal/effect_note_puncher.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_note_puncher.h Examining data/zytrax-0+git20190810/effects/internal/effect_panner.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_panner.h Examining data/zytrax-0+git20190810/effects/internal/effect_phaser.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_phaser.h Examining data/zytrax-0+git20190810/effects/internal/effect_reverb.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_reverb.h Examining data/zytrax-0+git20190810/effects/internal/effect_stereo_enhancer.cpp Examining data/zytrax-0+git20190810/effects/internal/effect_stereo_enhancer.h Examining data/zytrax-0+git20190810/effects/internal/eq.cpp Examining data/zytrax-0+git20190810/effects/internal/eq.h Examining data/zytrax-0+git20190810/effects/internal/reverb.cpp Examining data/zytrax-0+git20190810/effects/internal/reverb.h Examining data/zytrax-0+git20190810/engine/audio_effect.cpp Examining data/zytrax-0+git20190810/engine/audio_effect.h Examining data/zytrax-0+git20190810/engine/audio_effect_midi.cpp Examining data/zytrax-0+git20190810/engine/audio_effect_midi.h Examining data/zytrax-0+git20190810/engine/audio_lock.cpp Examining data/zytrax-0+git20190810/engine/audio_lock.h Examining data/zytrax-0+git20190810/engine/edit_commands.cpp Examining data/zytrax-0+git20190810/engine/edit_commands.h Examining data/zytrax-0+git20190810/engine/midi_driver_manager.cpp Examining data/zytrax-0+git20190810/engine/midi_driver_manager.h Examining data/zytrax-0+git20190810/engine/song.cpp Examining data/zytrax-0+git20190810/engine/song.h Examining data/zytrax-0+git20190810/engine/song_file.cpp Examining data/zytrax-0+git20190810/engine/song_file.h Examining data/zytrax-0+git20190810/engine/sound_driver.cpp Examining data/zytrax-0+git20190810/engine/sound_driver.h Examining data/zytrax-0+git20190810/engine/sound_driver_manager.cpp Examining data/zytrax-0+git20190810/engine/sound_driver_manager.h Examining data/zytrax-0+git20190810/engine/track.cpp Examining data/zytrax-0+git20190810/engine/track.h Examining data/zytrax-0+git20190810/engine/undo_redo.cpp Examining data/zytrax-0+git20190810/engine/undo_redo.h Examining data/zytrax-0+git20190810/globals/base64.cpp Examining data/zytrax-0+git20190810/globals/base64.h Examining data/zytrax-0+git20190810/globals/config.h Examining data/zytrax-0+git20190810/globals/error_list.h Examining data/zytrax-0+git20190810/globals/error_macros.cpp Examining data/zytrax-0+git20190810/globals/error_macros.h Examining data/zytrax-0+git20190810/globals/json.cpp Examining data/zytrax-0+git20190810/globals/json.h Examining data/zytrax-0+git20190810/globals/json_file.cpp Examining data/zytrax-0+git20190810/globals/json_file.h Examining data/zytrax-0+git20190810/globals/list.h Examining data/zytrax-0+git20190810/globals/map.h Examining data/zytrax-0+git20190810/globals/rstring.cpp Examining data/zytrax-0+git20190810/globals/rstring.h Examining data/zytrax-0+git20190810/globals/typedefs.h Examining data/zytrax-0+git20190810/globals/ucaps.h Examining data/zytrax-0+git20190810/globals/value_stream.h Examining data/zytrax-0+git20190810/globals/vector.h Examining data/zytrax-0+git20190810/gui/add_effect_dialog.cpp Examining data/zytrax-0+git20190810/gui/add_effect_dialog.h Examining data/zytrax-0+git20190810/gui/color_theme.cpp Examining data/zytrax-0+git20190810/gui/color_theme.h Examining data/zytrax-0+git20190810/gui/effect_editor.cpp Examining data/zytrax-0+git20190810/gui/effect_editor.h Examining data/zytrax-0+git20190810/gui/effect_editor_default.cpp Examining data/zytrax-0+git20190810/gui/effect_editor_default.h Examining data/zytrax-0+git20190810/gui/effect_editor_midi.cpp Examining data/zytrax-0+git20190810/gui/effect_editor_midi.h Examining data/zytrax-0+git20190810/gui/icons.cpp Examining data/zytrax-0+git20190810/gui/icons.h Examining data/zytrax-0+git20190810/gui/interface.cpp Examining data/zytrax-0+git20190810/gui/interface.h Examining data/zytrax-0+git20190810/gui/key_bindings.cpp Examining data/zytrax-0+git20190810/gui/key_bindings.h Examining data/zytrax-0+git20190810/gui/master_vu.cpp Examining data/zytrax-0+git20190810/gui/master_vu.h Examining data/zytrax-0+git20190810/gui/orderlist_editor.cpp Examining data/zytrax-0+git20190810/gui/orderlist_editor.h Examining data/zytrax-0+git20190810/gui/pattern_editor.cpp Examining data/zytrax-0+git20190810/gui/pattern_editor.h Examining data/zytrax-0+git20190810/gui/settings_dialog.cpp Examining data/zytrax-0+git20190810/gui/settings_dialog.h Examining data/zytrax-0+git20190810/gui/stb_image.h Examining data/zytrax-0+git20190810/gui/track_editor.cpp Examining data/zytrax-0+git20190810/gui/track_editor.h FINAL RESULTS: data/zytrax-0+git20190810/gui/stb_image.h:1149:11: [5] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high, it appears that the size is given as bytes, but the function requires size as characters. if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename))) data/zytrax-0+git20190810/gui/stb_image.h:1152:11: [5] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high, it appears that the size is given as bytes, but the function requires size as characters. if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode))) data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7470:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( name, "hw:%s,%d", cardname, subdevice ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:60:31: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define MUTEX_INITIALIZE(A) InitializeCriticalSection(A) data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:62:31: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define MUTEX_LOCK(A) EnterCriticalSection(A) data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:4963:21: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. HMODULE AvrtDll = LoadLibrary( (LPCTSTR) "AVRT.dll" ); data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:2400:4: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&(apiData->_mutex)); data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:2547:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&(data->_mutex)); data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.cpp:470:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("ARDOUR_RUNNING_UNDER_VALGRIND")) { data/zytrax-0+git20190810/globals/error_macros.h:17:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("ABORT_ON_ERROR")) abort(); data/zytrax-0+git20190810/gui/settings_dialog.cpp:1198:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_CONFIG_HOME")) { data/zytrax-0+git20190810/gui/settings_dialog.cpp:1199:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path.parse_utf8(getenv("XDG_CONFIG_HOME")); data/zytrax-0+git20190810/gui/settings_dialog.cpp:1201:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path.parse_utf8(getenv("HOME")); data/zytrax-0+git20190810/gui/settings_dialog.cpp:1207:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path.parse_utf8(getenv("HOME")); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:1734: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( outBufferList->mBuffers[handle->iStream[0]].mData, data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:1749:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( outBufferList->mBuffers[handle->iStream[0]+i].mData, data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:1827: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( stream_.userBuffer[1], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:1839:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( (void *)&outBuffer[i*stream_.bufferSize], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2045:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. port = (char *) ports[ nChannels ]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2084:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. port = (char *) ports[ nPorts ]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2240:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. port = (char *) ports[ nPorts ]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2408: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 label[64]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2705: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( jackbuffer, &stream_.deviceBuffer[i*bufferBytes], bufferBytes ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2711: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( jackbuffer, &stream_.userBuffer[0][i*bufferBytes], bufferBytes ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2727: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( &stream_.deviceBuffer[i*bufferBytes], jackbuffer, bufferBytes ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2734: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( &stream_.userBuffer[1][i*bufferBytes], jackbuffer, bufferBytes ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2851: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 driverName[32]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:2971: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 driverName[32]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3560:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( handle->bufferInfos[i].buffers[bufferIndex], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3574:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( handle->bufferInfos[i].buffers[bufferIndex], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3596:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( &stream_.deviceBuffer[j++*bufferBytes], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3611:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( &stream_.userBuffer[1][bufferBytes*j++], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3862: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( &( ( char* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( char ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3863: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( buffer_, &( ( char* ) buffer )[fromInSize], fromZeroSize * sizeof( char ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3866: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( &( ( short* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( short ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3867: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( buffer_, &( ( short* ) buffer )[fromInSize], fromZeroSize * sizeof( short ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3870: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( &( ( S24* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( S24 ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3871: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( buffer_, &( ( S24* ) buffer )[fromInSize], fromZeroSize * sizeof( S24 ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3874: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( &( ( int* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( int ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3875: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( buffer_, &( ( int* ) buffer )[fromInSize], fromZeroSize * sizeof( int ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3878: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( &( ( float* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( float ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3879: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( buffer_, &( ( float* ) buffer )[fromInSize], fromZeroSize * sizeof( float ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3882: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( &( ( double* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( double ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3883: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( buffer_, &( ( double* ) buffer )[fromInSize], fromZeroSize * sizeof( double ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3924: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( buffer, &( ( char* ) buffer_ )[outIndex_], fromOutSize * sizeof( char ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3925: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( &( ( char* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( char ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3928: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( buffer, &( ( short* ) buffer_ )[outIndex_], fromOutSize * sizeof( short ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3929: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( &( ( short* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( short ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3932: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( buffer, &( ( S24* ) buffer_ )[outIndex_], fromOutSize * sizeof( S24 ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3933: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( &( ( S24* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( S24 ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3936: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( buffer, &( ( int* ) buffer_ )[outIndex_], fromOutSize * sizeof( int ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3937: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( &( ( int* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( int ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3940: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( buffer, &( ( float* ) buffer_ )[outIndex_], fromOutSize * sizeof( float ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3941: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( &( ( float* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( float ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3944: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( buffer, &( ( double* ) buffer_ )[outIndex_], fromOutSize * sizeof( double ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:3945: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( &( ( double* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( double ) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:4062: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( outBuffer, inBuffer, inputBufferSize ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:4078: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( rInByteBuffer, inBuffer, inputBufferSize ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:4130: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( outBuffer, rOutByteBuffer, rBytes ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:5222: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( stream_.userBuffer[INPUT], data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:5308:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( stream_.deviceBuffer, data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:6796:5: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. CopyMemory( buffer1, buffer, bufferSize1 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:6797:28: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if ( buffer2 != NULL ) CopyMemory( buffer2, buffer+bufferSize1, bufferSize2 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:6925:7: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. CopyMemory( buffer, buffer1, bufferSize1 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:6926:30: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if ( buffer2 != NULL ) CopyMemory( buffer+bufferSize1, buffer2, bufferSize2 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7148:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[64]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7155:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( name, "hw:%d", card ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7199:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[64]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7207:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( name, "hw:%d", card ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7227:9: [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, "hw:%d,%d", card, subdevice ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7241:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy( name, "default" ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7506:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[64]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7516:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( name, "hw:%d", card ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7529:11: [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, "hw:%d,%d", card, subdevice ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:7542:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy( name, "default" ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:8998: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). int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:9022: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). int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:9142: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). int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:9223:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open( ainfo.devnode, flags, 0 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.h:683: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 c3[3]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.h:780: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 *userBuffer[2]; // Playback and record, respectively. data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:1152:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:1222:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:2293:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int wlength = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:2297:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, str, -1, &wstrtemp[0], wlength); data/zytrax-0+git20190810/drivers/vst2/audio_effect_provider_vst2.cpp:59:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fx_vst2->open(p_info->path, p_info->unique_ID, p_info->caption, p_info->provider_id) != OK) { data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:625:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)ptr, "ZyTrax"); data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:631:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)ptr, "ZyTrax"); data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:739: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(&datav[0], data, data_size); data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:797: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 label[kVstMaxLabelLen + 1]; data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:805:24: [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). Error AudioEffectVST2::open(const String &p_path, const String &p_unique_id, const String &p_name, const String &p_provider_id) { data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.cpp:833: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 label[kVstMaxLabelLen + 1]; data/zytrax-0+git20190810/drivers/vst2/audio_effect_vst2.h:123:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Error open(const String &p_path, const String &p_unique_id, const String &p_name, const String &p_provider_id); data/zytrax-0+git20190810/drivers/vst2/vestige.h:194: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 midiData[4]; data/zytrax-0+git20190810/drivers/vst2/vestige.h:216: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 empty5[16]; data/zytrax-0+git20190810/drivers/vst2/vestige.h:271: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 empty6[56]; data/zytrax-0+git20190810/drivers/vst2/vestige.h:297: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 empty3[4 + 4 + 4]; data/zytrax-0+git20190810/dsp/midi_event.h:51:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *cc_names[CC_MAX]; data/zytrax-0+git20190810/dsp/midi_event.h:52:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 cc_indices[CC_MAX]; data/zytrax-0+git20190810/effects/internal/effect_delay.cpp:226:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *beat_subdiv_str[BEAT_SUBDIV_MAX] = { data/zytrax-0+git20190810/engine/song_file.cpp:134: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. const char s[2] = { command, 0 }; data/zytrax-0+git20190810/engine/song_file.cpp:678:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(p_path.utf8().get_data(), "wb"); data/zytrax-0+git20190810/globals/json_file.cpp:12:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(p_path.utf8().get_data(), "wb"); data/zytrax-0+git20190810/globals/json_file.cpp:24:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(p_path.utf8().get_data(), "rb"); data/zytrax-0+git20190810/gui/color_theme.h:39:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *color_names[COLOR_MAX]; data/zytrax-0+git20190810/gui/effect_editor.cpp:63: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 s[2] = { char('A' + (port->get_command() - 'a')), 0 }; data/zytrax-0+git20190810/gui/effect_editor.cpp:175: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 s[2] = { char('A' + (i - 'a')), 0 }; data/zytrax-0+git20190810/gui/interface.cpp:1477: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. const char *beat_zoom_text[PatternEditor::BEAT_ZOOM_MAX] = { data/zytrax-0+git20190810/gui/interface.cpp:1564: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. const char *swing_divisor[Song::SWING_BEAT_DIVISOR_MAX] = { data/zytrax-0+git20190810/gui/key_bindings.h:194:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *bind_names[BIND_MAX]; data/zytrax-0+git20190810/gui/orderlist_editor.cpp:436:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[4] = { '0', '0', '0', 0 }; data/zytrax-0+git20190810/gui/pattern_editor.cpp:3012: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 text[3] = { '0' + (subbeat / 10), '0' + (subbeat % 10), 0 }; data/zytrax-0+git20190810/gui/pattern_editor.cpp:3071: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 rowstr[7] = { '.', '.', '.', ' ', '.', '.', 0 }; data/zytrax-0+git20190810/gui/pattern_editor.cpp:3161:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *note[12] = { "C-", "C#", "D-", "D#", "E-", "F-", data/zytrax-0+git20190810/gui/pattern_editor.cpp:3163:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char octave[12] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; data/zytrax-0+git20190810/gui/pattern_editor.cpp:3257: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 rowstr[4] = { '.', '0', '0', 0 }; data/zytrax-0+git20190810/gui/pattern_editor.cpp:3439: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 rowstr[3] = { '.', '.', 0 }; data/zytrax-0+git20190810/gui/settings_dialog.cpp:667: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 s[2] = { char('A' + (default_commands[i].command - 'a')), 0 }; data/zytrax-0+git20190810/gui/settings_dialog.cpp:1124: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 s[2] = { char('A' + (i - 'a')), 0 }; data/zytrax-0+git20190810/gui/stb_image.h:568:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef unsigned char validate_uint32[sizeof(stbi__uint32) == 4 ? 1 : -1]; data/zytrax-0+git20190810/gui/stb_image.h:1052:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(temp, row0, bytes_copy); data/zytrax-0+git20190810/gui/stb_image.h:1053: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(row0, row1, bytes_copy); data/zytrax-0+git20190810/gui/stb_image.h:1054: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(row1, temp, bytes_copy); data/zytrax-0+git20190810/gui/stb_image.h:1134:49: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); data/zytrax-0+git20190810/gui/stb_image.h:1147:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wMode[64]; data/zytrax-0+git20190810/gui/stb_image.h:1148:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wFilename[1024]; data/zytrax-0+git20190810/gui/stb_image.h:1166:6: [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). f = fopen(filename, mode); data/zytrax-0+git20190810/gui/stb_image.h:1447: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, s->img_buffer, blen); data/zytrax-0+git20190810/gui/stb_image.h:1457: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(buffer, s->img_buffer, n); data/zytrax-0+git20190810/gui/stb_image.h:3011:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char tag[5] = { 'J', 'F', 'I', 'F', '\0' }; data/zytrax-0+git20190810/gui/stb_image.h:3021:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char tag[6] = { 'A', 'd', 'o', 'b', 'e', '\0' }; data/zytrax-0+git20190810/gui/stb_image.h:3129:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 rgb[3] = { 'R', 'G', 'B' }; data/zytrax-0+git20190810/gui/stb_image.h:4230: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(a->zout, a->zbuffer, len); data/zytrax-0+git20190810/gui/stb_image.h:4538:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cur, raw, nk); data/zytrax-0+git20190810/gui/stb_image.h:4707:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, data/zytrax-0+git20190810/gui/stb_image.h:5663:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char raw_data[4] = { 0 }; data/zytrax-0+git20190810/gui/stb_image.h:6533:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&g->out[pi * 4], &two_back[pi * 4], 4); data/zytrax-0+git20190810/gui/stb_image.h:6540:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); data/zytrax-0+git20190810/gui/stb_image.h:6551: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(g->background, g->out, 4 * g->w * g->h); data/zytrax-0+git20190810/gui/stb_image.h:6615:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4); data/zytrax-0+git20190810/gui/stb_image.h:6701: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(out + ((layers - 1) * stride), u, stride); data/zytrax-0+git20190810/gui/stb_image.h:6835:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STBI__HDR_BUFLEN]; data/zytrax-0+git20190810/gui/stb_image.h:6975:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STBI__HDR_BUFLEN]; data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:706:42: [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). info.name.append( (const char *)mname, strlen(mname) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:728:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). info.name.append( (const char *)name, strlen(name) ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:1177:7: [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( 5000 ); data/zytrax-0+git20190810/drivers/rtaudio/rtaudio/RtAudio.cpp:9879:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read( handle->id[1], buffer, samples * formatBytes(format) ); data/zytrax-0+git20190810/drivers/rtmidi/rtmidi/RtMidi.cpp:1500:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int res = read(poll_fds[0].fd, &dummy, sizeof(dummy)); data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.cpp:359:9: [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. Glib::usleep(1000); data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.cpp:446:10: [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. Glib::usleep(1000 * (LXVST_sched_timer_interval - elapsed_time_ms - 1)); data/zytrax-0+git20190810/drivers/vst2/effect_editor_x11.cpp:740:8: [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. Glib::usleep(100000); data/zytrax-0+git20190810/gui/stb_image.h:360:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read)(void *user, char *data, int size); // fill 'data' with 'size' bytes. return number of bytes actually read data/zytrax-0+git20190810/gui/stb_image.h:1390:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = (s->io.read)(s->io_user_data, (char *)s->buffer_start, s->buflen); data/zytrax-0+git20190810/gui/stb_image.h:1415:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (s->io.read) { data/zytrax-0+git20190810/gui/stb_image.h:1430:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (s->io.read) { data/zytrax-0+git20190810/gui/stb_image.h:1442:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (s->io.read) { data/zytrax-0+git20190810/gui/stb_image.h:1449:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = (s->io.read)(s->io_user_data, (char *)buffer + blen, n - blen); ANALYSIS SUMMARY: Hits = 157 Lines analyzed = 56595 in approximately 1.25 seconds (45204 lines/second) Physical Source Lines of Code (SLOC) = 42215 Hits@level = [0] 28 [1] 14 [2] 129 [3] 11 [4] 1 [5] 2 Hits@level+ = [0+] 185 [1+] 157 [2+] 143 [3+] 14 [4+] 3 [5+] 2 Hits/KSLOC@level+ = [0+] 4.38233 [1+] 3.71906 [2+] 3.38742 [3+] 0.331636 [4+] 0.0710648 [5+] 0.0473765 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.