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/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/atom.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/forge.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/util.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/data-access/data-access.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/event/event-helpers.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/event/event.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/instance-access/instance-access.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/log.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/logger.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/midi/midi.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/morph/morph.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/options/options.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/parameters/parameters.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/patch/patch.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/port-groups/port-groups.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/port-props/port-props.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/presets/presets.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/resize-port/resize-port.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/state/state.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/time/time.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/uri-map/uri-map.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/urid/urid.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/worker/worker.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/extensions/ui/ui.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/extensions/units/units.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/lv2core/lv2.h
Examining data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/lv2core/lv2_util.h
Examining data/amsynth-1.12.1/include/vestige/aeffectx.h
Examining data/amsynth-1.12.1/src/AudioOutput.cpp
Examining data/amsynth-1.12.1/src/AudioOutput.h
Examining data/amsynth-1.12.1/src/Configuration.cpp
Examining data/amsynth-1.12.1/src/Configuration.h
Examining data/amsynth-1.12.1/src/Effects/Distortion.cpp
Examining data/amsynth-1.12.1/src/Effects/Distortion.h
Examining data/amsynth-1.12.1/src/Effects/SoftLimiter.cpp
Examining data/amsynth-1.12.1/src/Effects/SoftLimiter.h
Examining data/amsynth-1.12.1/src/GUI/ConfigDialog.cpp
Examining data/amsynth-1.12.1/src/GUI/ConfigDialog.h
Examining data/amsynth-1.12.1/src/GUI/MIDILearnDialog.cpp
Examining data/amsynth-1.12.1/src/GUI/MIDILearnDialog.h
Examining data/amsynth-1.12.1/src/GUI/MainMenu.cpp
Examining data/amsynth-1.12.1/src/GUI/MainMenu.h
Examining data/amsynth-1.12.1/src/GUI/MainWindow.cpp
Examining data/amsynth-1.12.1/src/GUI/MainWindow.h
Examining data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp
Examining data/amsynth-1.12.1/src/GUI/PresetControllerView.h
Examining data/amsynth-1.12.1/src/GUI/bitmap_button.c
Examining data/amsynth-1.12.1/src/GUI/bitmap_button.h
Examining data/amsynth-1.12.1/src/GUI/bitmap_knob.c
Examining data/amsynth-1.12.1/src/GUI/bitmap_knob.h
Examining data/amsynth-1.12.1/src/GUI/bitmap_popup.c
Examining data/amsynth-1.12.1/src/GUI/bitmap_popup.h
Examining data/amsynth-1.12.1/src/GUI/controllers.h
Examining data/amsynth-1.12.1/src/GUI/editor_menus.cpp
Examining data/amsynth-1.12.1/src/GUI/editor_menus.h
Examining data/amsynth-1.12.1/src/GUI/editor_pane.c
Examining data/amsynth-1.12.1/src/GUI/editor_pane.h
Examining data/amsynth-1.12.1/src/GUI/gui_main.cpp
Examining data/amsynth-1.12.1/src/GUI/gui_main.h
Examining data/amsynth-1.12.1/src/JackOutput.cpp
Examining data/amsynth-1.12.1/src/JackOutput.h
Examining data/amsynth-1.12.1/src/MidiController.cpp
Examining data/amsynth-1.12.1/src/MidiController.h
Examining data/amsynth-1.12.1/src/Parameter.cpp
Examining data/amsynth-1.12.1/src/Parameter.h
Examining data/amsynth-1.12.1/src/Preset.cpp
Examining data/amsynth-1.12.1/src/Preset.h
Examining data/amsynth-1.12.1/src/PresetController.cpp
Examining data/amsynth-1.12.1/src/PresetController.h
Examining data/amsynth-1.12.1/src/Synthesizer.cpp
Examining data/amsynth-1.12.1/src/Synthesizer.h
Examining data/amsynth-1.12.1/src/TuningMap.cpp
Examining data/amsynth-1.12.1/src/TuningMap.h
Examining data/amsynth-1.12.1/src/UpdateListener.h
Examining data/amsynth-1.12.1/src/VoiceAllocationUnit.cpp
Examining data/amsynth-1.12.1/src/VoiceAllocationUnit.h
Examining data/amsynth-1.12.1/src/VoiceBoard/ADSR.cpp
Examining data/amsynth-1.12.1/src/VoiceBoard/ADSR.h
Examining data/amsynth-1.12.1/src/VoiceBoard/LowPassFilter.cpp
Examining data/amsynth-1.12.1/src/VoiceBoard/LowPassFilter.h
Examining data/amsynth-1.12.1/src/VoiceBoard/Oscillator.cpp
Examining data/amsynth-1.12.1/src/VoiceBoard/Oscillator.h
Examining data/amsynth-1.12.1/src/VoiceBoard/Synth--.h
Examining data/amsynth-1.12.1/src/VoiceBoard/VoiceBoard.cpp
Examining data/amsynth-1.12.1/src/VoiceBoard/VoiceBoard.h
Examining data/amsynth-1.12.1/src/amsynth_dssi.cpp
Examining data/amsynth-1.12.1/src/amsynth_dssi.h
Examining data/amsynth-1.12.1/src/amsynth_dssi_gtk.cpp
Examining data/amsynth-1.12.1/src/amsynth_lv2.cpp
Examining data/amsynth-1.12.1/src/amsynth_lv2.h
Examining data/amsynth-1.12.1/src/amsynth_lv2_ui_gtk.cpp
Examining data/amsynth-1.12.1/src/amsynth_vst.cpp
Examining data/amsynth-1.12.1/src/controls.h
Examining data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.cpp
Examining data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.h
Examining data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.cpp
Examining data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.h
Examining data/amsynth-1.12.1/src/drivers/ALSAmmapAudioDriver.cpp
Examining data/amsynth-1.12.1/src/drivers/ALSAmmapAudioDriver.h
Examining data/amsynth-1.12.1/src/drivers/AudioDriver.h
Examining data/amsynth-1.12.1/src/drivers/CoreAudio.cpp
Examining data/amsynth-1.12.1/src/drivers/CoreAudio.h
Examining data/amsynth-1.12.1/src/drivers/MidiDriver.h
Examining data/amsynth-1.12.1/src/drivers/OSSAudioDriver.cpp
Examining data/amsynth-1.12.1/src/drivers/OSSAudioDriver.h
Examining data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp
Examining data/amsynth-1.12.1/src/drivers/OSSMidiDriver.h
Examining data/amsynth-1.12.1/src/filesystem.cpp
Examining data/amsynth-1.12.1/src/filesystem.h
Examining data/amsynth-1.12.1/src/freeverb/allpass.cpp
Examining data/amsynth-1.12.1/src/freeverb/allpass.hpp
Examining data/amsynth-1.12.1/src/freeverb/comb.cpp
Examining data/amsynth-1.12.1/src/freeverb/comb.hpp
Examining data/amsynth-1.12.1/src/freeverb/denormals.h
Examining data/amsynth-1.12.1/src/freeverb/revmodel.cpp
Examining data/amsynth-1.12.1/src/freeverb/revmodel.hpp
Examining data/amsynth-1.12.1/src/freeverb/tuning.h
Examining data/amsynth-1.12.1/src/gettext.h
Examining data/amsynth-1.12.1/src/lash.c
Examining data/amsynth-1.12.1/src/lash.h
Examining data/amsynth-1.12.1/src/main.cpp
Examining data/amsynth-1.12.1/src/main.h
Examining data/amsynth-1.12.1/src/midi.h
Examining data/amsynth-1.12.1/src/nsm/NsmClient.cpp
Examining data/amsynth-1.12.1/src/nsm/NsmClient.h
Examining data/amsynth-1.12.1/src/nsm/NsmHandler.cpp
Examining data/amsynth-1.12.1/src/nsm/NsmHandler.h
Examining data/amsynth-1.12.1/src/nsm/nsm.h
Examining data/amsynth-1.12.1/src/tests.cpp
Examining data/amsynth-1.12.1/src/types.h
Examining data/amsynth-1.12.1/utils/lv2_dump_ports.cpp

FINAL RESULTS:

data/amsynth-1.12.1/src/GUI/gui_main.cpp:67:2:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	readlink("/proc/self/exe", exe_path, sizeof(exe_path));
data/amsynth-1.12.1/src/JackOutput.cpp:213:2:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	readlink("/proc/self/exe", exe_path, sizeof(exe_path));
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/log.h:50:59:  [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 LV2_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/log.h:82:8:  [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.
	int (*printf)(LV2_Log_Handle handle,
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/log.h:95:8:  [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.
	int (*vprintf)(LV2_Log_Handle handle,
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/logger.h:98:23:  [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.
		return logger->log->vprintf(logger->log->handle, type, fmt, args);
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/log/logger.h:100: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.
		return vfprintf(stderr, fmt, args);
data/amsynth-1.12.1/src/GUI/MainMenu.cpp:607:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		system(cmd.c_str());
data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp:40:17:  [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.
	size_t count = vsnprintf(str, size, format, va_args);
data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp:94:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (text, "%s%d", names[value % 12], value / 12 - 1);
data/amsynth-1.12.1/src/Synthesizer.cpp:111:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	return sprintf(*buffer, "%s", string.c_str());
data/amsynth-1.12.1/src/amsynth_dssi_gtk.cpp:151:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(value, "%s%s", url, _osc_path);
data/amsynth-1.12.1/src/amsynth_lv2.cpp:40:30:  [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 LOG_FUNCTION_CALL()		fprintf(stderr, AMSYNTH_LV2_URI " %s\n", __FUNCTION__)
data/amsynth-1.12.1/src/main.cpp:75:25:  [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 DEBUGMSG( ... ) fprintf( stderr, __VA_ARGS__ )
data/amsynth-1.12.1/src/GUI/editor_pane.c:99:31:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	gchar *tempdir = g_strconcat(g_get_tmp_dir(), "/amsynth.skin.XXXXXXXX", NULL);
data/amsynth-1.12.1/src/VoiceBoard/Oscillator.cpp:182:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random * 196314165) + 907633515;
data/amsynth-1.12.1/src/VoiceBoard/Oscillator.cpp:183:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return (float)random * kTwoOverUlongMax - 1.0f;
data/amsynth-1.12.1/src/VoiceBoard/Oscillator.cpp:196:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	buffer[i] = random;
data/amsynth-1.12.1/src/filesystem.cpp:43:28:  [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.
    const char *env_home = getenv("HOME");
data/amsynth-1.12.1/src/filesystem.cpp:52:39:  [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.
    const char *env_xdg_config_home = getenv("XDG_CONFIG_HOME");
data/amsynth-1.12.1/src/filesystem.cpp:58:37:  [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.
    const char *env_xdg_data_home = getenv("XDG_DATA_HOME");
data/amsynth-1.12.1/src/main.cpp:225:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand((unsigned) time(nullptr));
data/amsynth-1.12.1/src/main.cpp:250:17:  [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.
	bool no_gui = (getenv("AMSYNTH_NO_GUI") != nullptr);
data/amsynth-1.12.1/src/main.cpp:260:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "vhsdzxm:c:a:r:p:b:U:P:n:t:", longopts, &longindex)) != -1) {
data/amsynth-1.12.1/src/nsm/NsmClient.cpp:89:27:  [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.
    const char *nsm_url = getenv("NSM_URL") ;
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/atom.h:75: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.
typedef char lv2_atom_assert_double_fits_in_64_bits[
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/forge.h:305:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(mem, data, size);
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/atom/util.h:175: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(e, event, total_size);
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/event/event-helpers.h:191: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((uint8_t*)ev + sizeof(LV2_Event), data, size);
data/amsynth-1.12.1/include/lv2/lv2plug.in/ns/ext/event/event-helpers.h:251:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((uint8_t*)write_ev + sizeof(LV2_Event), data, ev->size);
data/amsynth-1.12.1/include/vestige/aeffectx.h:164: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/amsynth-1.12.1/include/vestige/aeffectx.h:180: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 dump[sizeof (VstMidiEvent)];
data/amsynth-1.12.1/include/vestige/aeffectx.h:235: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[VestigeMaxLabelLen];  /* parameter label */
data/amsynth-1.12.1/include/vestige/aeffectx.h:241: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 shortLabel[VestigeMaxShortLabelLen]; /* short label, recommended: 6 + delimiter */
data/amsynth-1.12.1/include/vestige/aeffectx.h:246: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 categoryLabel[VestigeMaxCategLabelLen]; /* category label, e.g. "Osc 1"  */
data/amsynth-1.12.1/include/vestige/aeffectx.h:247: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 future[16];              /* reserved for future use */
data/amsynth-1.12.1/include/vestige/aeffectx.h:291: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/amsynth-1.12.1/include/vestige/aeffectx.h:301: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 unknown1[4];
data/amsynth-1.12.1/src/AudioOutput.cpp:107:14:  [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 (driver->open() != 0) {
data/amsynth-1.12.1/src/Configuration.cpp:127: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 *fout = fopen (amsynthrc_fname.c_str(), "w"); if (nullptr == fout) return -1;
data/amsynth-1.12.1/src/GUI/ConfigDialog.cpp:92: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 sample_rate[10] = "";
data/amsynth-1.12.1/src/GUI/ConfigDialog.cpp:93:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(sample_rate, "%d", config.sample_rate);
data/amsynth-1.12.1/src/GUI/MainMenu.cpp:598: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 tmp[255] = "";
data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp:43:3:  [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(str + size - 4, "...");
data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp:91: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 *names[12] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
data/amsynth-1.12.1/src/GUI/PresetControllerView.cpp:227: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 text [48] = "";
data/amsynth-1.12.1/src/GUI/bitmap_knob.c:158: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 display[32] = "";
data/amsynth-1.12.1/src/GUI/editor_menus.cpp:108: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 text[64];
data/amsynth-1.12.1/src/GUI/editor_pane.c:297:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int scale = atoi(gdk_scale);
data/amsynth-1.12.1/src/GUI/gui_main.cpp:66: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 exe_path[4096] = "";
data/amsynth-1.12.1/src/JackOutput.cpp:203: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 filename[1024]; snprintf(filename, sizeof(filename),
data/amsynth-1.12.1/src/JackOutput.cpp:212: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 exe_path[4096] = "";
data/amsynth-1.12.1/src/MidiController.h:82: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 _midi_cc_vals[MAX_CC];
data/amsynth-1.12.1/src/PresetController.cpp:239:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *file = fopen(filename, "r");
data/amsynth-1.12.1/src/PresetController.cpp:243: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[sizeof(amsynth_file_header)] = {0};
data/amsynth-1.12.1/src/PresetController.cpp:256:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *file = fopen(filename, "r");
data/amsynth-1.12.1/src/amsynth_dssi_gtk.cpp:149: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 value[MAX_PATH] = "";
data/amsynth-1.12.1/src/amsynth_vst.cpp:67: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 hostProductString[64] = "";
data/amsynth-1.12.1/src/amsynth_vst.cpp:167:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, kJumpInstructions, sizeof(kJumpInstructions));
data/amsynth-1.12.1/src/amsynth_vst.cpp:295: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 arg1[32] = "/dev/null";
data/amsynth-1.12.1/src/amsynth_vst.cpp:296: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 arg2[32] = "--g-fatal-warnings";
data/amsynth-1.12.1/src/amsynth_vst.cpp:411: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, event->midiData, msgLength);
data/amsynth-1.12.1/src/amsynth_vst.cpp:435: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, "amsynth");
data/amsynth-1.12.1/src/amsynth_vst.cpp:438: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, "Nick Dowell");
data/amsynth-1.12.1/src/amsynth_vst.cpp:441: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, "amsynth");
data/amsynth-1.12.1/src/amsynth_vst.cpp:528:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		logFile = fopen("/tmp/amsynth.log", "a");
data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.cpp:43:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int open() override;
data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.cpp:65: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.
		((unsigned char *)_buffer)[i * 2 + 0] = ( s16       & 0xff);
data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.cpp:66: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.
		((unsigned char *)_buffer)[i * 2 + 1] = ((s16 >> 8) & 0xff);
data/amsynth-1.12.1/src/drivers/ALSAAudioDriver.cpp:80:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
ALSAAudioDriver::open()
data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.cpp:45:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int open() override;
data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.cpp:110:21:  [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 ALSAMidiDriver::open()
data/amsynth-1.12.1/src/drivers/ALSAmmapAudioDriver.cpp:45:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int	open() override;
data/amsynth-1.12.1/src/drivers/ALSAmmapAudioDriver.cpp:158:22:  [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).
ALSAmmapAudioDriver::open()
data/amsynth-1.12.1/src/drivers/AudioDriver.h:36:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    virtual int  open() { return -1; }
data/amsynth-1.12.1/src/drivers/CoreAudio.cpp:188: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(self->m_MIDIBuffer + idx + 1, data, length);
data/amsynth-1.12.1/src/drivers/MidiDriver.h:34: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).
    virtual int open() = 0;
data/amsynth-1.12.1/src/drivers/OSSAudioDriver.cpp:45:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int open() override;
data/amsynth-1.12.1/src/drivers/OSSAudioDriver.cpp:64: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).
OSSAudioDriver::open()
data/amsynth-1.12.1/src/drivers/OSSAudioDriver.cpp:69:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((_fd = ::open(name, O_WRONLY, 0)) == -1) {
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:41:6:  [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 open() override;
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:57:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int OSSMidiDriver::open()
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:64:11:  [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(dev, O_RDONLY | O_NONBLOCK, 0);
data/amsynth-1.12.1/src/gettext.h:218: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/amsynth-1.12.1/src/gettext.h:220:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/amsynth-1.12.1/src/gettext.h:228: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/amsynth-1.12.1/src/gettext.h:230: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/amsynth-1.12.1/src/gettext.h:264: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/amsynth-1.12.1/src/gettext.h:266:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/amsynth-1.12.1/src/gettext.h:274: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/amsynth-1.12.1/src/gettext.h:276: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/amsynth-1.12.1/src/lash.c:52: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).
	FILE *stream = fopen(filename, "r");
data/amsynth-1.12.1/src/lash.c:125:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
					file = fopen(filename, "w");
data/amsynth-1.12.1/src/lash.c:144:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
					int preset_number = atoi(buffer);
data/amsynth-1.12.1/src/main.cpp:170: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).
	if (driver && driver->open() != 0) {
data/amsynth-1.12.1/src/main.cpp:298:25:  [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).
				initial_preset_no = atoi(optarg);
data/amsynth-1.12.1/src/main.cpp:310:27:  [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).
				config.midi_channel = atoi( optarg );
data/amsynth-1.12.1/src/main.cpp:316:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				config.sample_rate = atoi( optarg );
data/amsynth-1.12.1/src/main.cpp:319:24:  [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).
				config.polyphony = atoi( optarg );
data/amsynth-1.12.1/src/main.cpp:338:25:  [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).
					gui_scale_factor = atoi(optarg);
data/amsynth-1.12.1/src/main.cpp:445: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 buffer[3] = { status, data1, data2 };
data/amsynth-1.12.1/src/nsm/NsmClient.cpp:25:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return nsmClient->open (path, displayName, clientId) ;                                  
data/amsynth-1.12.1/src/nsm/NsmClient.cpp:125:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int NsmClient::open (const char* name, const char* displayName, const char* clientId) {
data/amsynth-1.12.1/src/nsm/NsmClient.h:20:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int open (const char* name, const char* displayName, const char* clientId) ;
data/amsynth-1.12.1/src/nsm/NsmHandler.cpp:36:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        PresetFile.open (PresetPath.c_str()) ;
data/amsynth-1.12.1/src/nsm/nsm.h:110: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).
    nsm_open_callback *open;
data/amsynth-1.12.1/src/nsm/nsm.h:366: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).
    if ( ! nsm->open )
data/amsynth-1.12.1/src/nsm/nsm.h:369:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int r = nsm->open( &argv[0]->s, &argv[1]->s, &argv[2]->s, &out_msg, nsm->open_userdata );
data/amsynth-1.12.1/src/tests.cpp:54: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.
        unsigned char midi[4] = { MIDI_STATUS_CONTROLLER, cc, value };
data/amsynth-1.12.1/src/tests.cpp:103: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.
        unsigned char midi[4] = { MIDI_STATUS_NOTE_ON, 64, 100 };
data/amsynth-1.12.1/src/tests.cpp:112: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.
        unsigned char midi[4] = { MIDI_STATUS_NOTE_ON, 80, 100 };
data/amsynth-1.12.1/src/tests.cpp:121: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.
        unsigned char midi[4] = { MIDI_STATUS_CONTROLLER, MIDI_CC_ALL_NOTES_OFF, 0 };
data/amsynth-1.12.1/src/Preset.cpp:315:17:  [1] (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 character.
                strcpy(buffer, "");
data/amsynth-1.12.1/src/Synthesizer.cpp:146:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buffer, _presetController->getCurrentPreset().getParameter(parameter).getName().c_str(), maxLen);
data/amsynth-1.12.1/src/Synthesizer.cpp:151:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buffer, _presetController->getCurrentPreset().getParameter(parameter).getLabel().c_str(), maxLen);
data/amsynth-1.12.1/src/Synthesizer.cpp:156:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buffer, _presetController->getCurrentPreset().getParameter(parameter).getStringValue().c_str(), maxLen);
data/amsynth-1.12.1/src/Synthesizer.cpp:191:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (filename && strlen(filename))
data/amsynth-1.12.1/src/Synthesizer.cpp:200:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (filename && strlen(filename))
data/amsynth-1.12.1/src/amsynth_lv2_ui_gtk.cpp:125:48:  [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).
		lv2_atom_forge_path(forge, value, (uint32_t) strlen(value));
data/amsynth-1.12.1/src/amsynth_vst.cpp:260:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy((char *)ptr, plugin->presetName.c_str(), 24);
data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.cpp:43:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read(unsigned char *buffer, unsigned maxBytes) override;
data/amsynth-1.12.1/src/drivers/ALSAMidiDriver.cpp:57:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ALSAMidiDriver::read(unsigned char *buffer, unsigned maxBytes)
data/amsynth-1.12.1/src/drivers/MidiDriver.h:32:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual int read(unsigned char *bytes, unsigned maxBytes) = 0;
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:44:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read(unsigned char *bytes, unsigned maxBytes) override;
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:87:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int OSSMidiDriver::read(unsigned char *bytes, unsigned maxBytes)
data/amsynth-1.12.1/src/drivers/OSSMidiDriver.cpp:89:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return (int) ::read(_fd, bytes, maxBytes);
data/amsynth-1.12.1/src/gettext.h:214:24:  [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 msgctxt_len = strlen (msgctxt) + 1;
data/amsynth-1.12.1/src/gettext.h:215:22:  [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 msgid_len = strlen (msgid) + 1;
data/amsynth-1.12.1/src/gettext.h:260:24:  [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 msgctxt_len = strlen (msgctxt) + 1;
data/amsynth-1.12.1/src/gettext.h:261:22:  [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 msgid_len = strlen (msgid) + 1;
data/amsynth-1.12.1/src/main.cpp:469:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t bytes_read = read(gui_midi_pipe[0], buffer, bufferSize);
data/amsynth-1.12.1/src/main.cpp:482:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			int bytes_read = midiDriver->read(buffer, (unsigned) bufferSize);

ANALYSIS SUMMARY:

Hits = 132
Lines analyzed = 21252 in approximately 0.55 seconds (38791 lines/second)
Physical Source Lines of Code (SLOC) = 12931
Hits@level = [0]  68 [1]  20 [2]  87 [3]  11 [4]  12 [5]   2
Hits@level+ = [0+] 200 [1+] 132 [2+] 112 [3+]  25 [4+]  14 [5+]   2
Hits/KSLOC@level+ = [0+] 15.4667 [1+] 10.208 [2+] 8.66136 [3+] 1.93334 [4+] 1.08267 [5+] 0.154667
Dot directories skipped = 2 (--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.