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/ams-2.1.2/src/m_vco.cpp
Examining data/ams-2.1.2/src/multi_envelope.h
Examining data/ams-2.1.2/src/m_vcpanning.h
Examining data/ams-2.1.2/src/m_inv.h
Examining data/ams-2.1.2/src/m_mcv.h
Examining data/ams-2.1.2/src/m_vcenv2.cpp
Examining data/ams-2.1.2/src/midislider.h
Examining data/ams-2.1.2/src/m_mphlfo.h
Examining data/ams-2.1.2/src/m_vcf.cpp
Examining data/ams-2.1.2/src/midicontrollable.h
Examining data/ams-2.1.2/src/m_vcorgan.h
Examining data/ams-2.1.2/src/msoptions.h
Examining data/ams-2.1.2/src/m_spectrum.h
Examining data/ams-2.1.2/src/m_vquant.h
Examining data/ams-2.1.2/src/m_pcmout.h
Examining data/ams-2.1.2/src/function.cpp
Examining data/ams-2.1.2/src/m_noise.cpp
Examining data/ams-2.1.2/src/m_advmcv.cpp
Examining data/ams-2.1.2/src/m_sh.h
Examining data/ams-2.1.2/src/m_midiout.h
Examining data/ams-2.1.2/src/m_analogmemory.h
Examining data/ams-2.1.2/src/m_lfo.cpp
Examining data/ams-2.1.2/src/m_slew.cpp
Examining data/ams-2.1.2/src/m_quantizer.h
Examining data/ams-2.1.2/src/canvas.h
Examining data/ams-2.1.2/src/ringbuffer.h
Examining data/ams-2.1.2/src/canvasfunction.cpp
Examining data/ams-2.1.2/src/intmidislider.cpp
Examining data/ams-2.1.2/src/port.h
Examining data/ams-2.1.2/src/m_advmcv.h
Examining data/ams-2.1.2/src/modularsynth.cpp
Examining data/ams-2.1.2/src/m_lfo.h
Examining data/ams-2.1.2/src/envelope.cpp
Examining data/ams-2.1.2/src/m_vcorgan.cpp
Examining data/ams-2.1.2/src/m_quantizer.cpp
Examining data/ams-2.1.2/src/mainwindow.h
Examining data/ams-2.1.2/src/canvas.cpp
Examining data/ams-2.1.2/src/m_vco2.h
Examining data/ams-2.1.2/src/m_advenv.h
Examining data/ams-2.1.2/src/m_advenv.cpp
Examining data/ams-2.1.2/src/m_noise.h
Examining data/ams-2.1.2/src/m_hysteresis.h
Examining data/ams-2.1.2/src/m_dynamicwaves.cpp
Examining data/ams-2.1.2/src/m_mix.cpp
Examining data/ams-2.1.2/src/m_vcpanning.cpp
Examining data/ams-2.1.2/src/midicontroller.h
Examining data/ams-2.1.2/src/midislider.cpp
Examining data/ams-2.1.2/src/m_vcdelay.h
Examining data/ams-2.1.2/src/multi_envelope.cpp
Examining data/ams-2.1.2/src/m_inv.cpp
Examining data/ams-2.1.2/src/m_env.cpp
Examining data/ams-2.1.2/src/m_vca.cpp
Examining data/ams-2.1.2/src/m_ad.cpp
Examining data/ams-2.1.2/src/midipushbutton.cpp
Examining data/ams-2.1.2/src/aboutdialog.cpp
Examining data/ams-2.1.2/src/m_bitgrind.cpp
Examining data/ams-2.1.2/src/m_seq.cpp
Examining data/ams-2.1.2/src/m_delay.h
Examining data/ams-2.1.2/src/m_conv.h
Examining data/ams-2.1.2/src/macros.h
Examining data/ams-2.1.2/src/m_vcenv.cpp
Examining data/ams-2.1.2/src/function.h
Examining data/ams-2.1.2/src/guiwidget.h
Examining data/ams-2.1.2/src/midisliderbase.cpp
Examining data/ams-2.1.2/src/midiguicomponent.h
Examining data/ams-2.1.2/src/ladspadialog.h
Examining data/ams-2.1.2/src/m_ringmod.cpp
Examining data/ams-2.1.2/src/midipushbutton.h
Examining data/ams-2.1.2/src/m_midiout.cpp
Examining data/ams-2.1.2/src/m_mphlfo.cpp
Examining data/ams-2.1.2/src/envelope.h
Examining data/ams-2.1.2/src/m_v8sequencer.h
Examining data/ams-2.1.2/src/module.h
Examining data/ams-2.1.2/src/m_vcdelay.cpp
Examining data/ams-2.1.2/src/prefwidget.cpp
Examining data/ams-2.1.2/src/aboutdialog.h
Examining data/ams-2.1.2/src/synthdata.h
Examining data/ams-2.1.2/src/m_vcswitch.h
Examining data/ams-2.1.2/src/m_wavout.h
Examining data/ams-2.1.2/src/m_scope.cpp
Examining data/ams-2.1.2/src/port_popup.h
Examining data/ams-2.1.2/src/box.h
Examining data/ams-2.1.2/src/scopescreen.cpp
Examining data/ams-2.1.2/src/m_env.h
Examining data/ams-2.1.2/src/m_cvs.h
Examining data/ams-2.1.2/src/m_function.cpp
Examining data/ams-2.1.2/src/m_function.h
Examining data/ams-2.1.2/src/midiguicomponent.cpp
Examining data/ams-2.1.2/src/midiwidget.h
Examining data/ams-2.1.2/src/notelist.h
Examining data/ams-2.1.2/src/m_slew.h
Examining data/ams-2.1.2/src/m_conv.cpp
Examining data/ams-2.1.2/src/m_sh.cpp
Examining data/ams-2.1.2/src/midicheckbox.cpp
Examining data/ams-2.1.2/src/m_hysteresis.cpp
Examining data/ams-2.1.2/src/intmidislider.h
Examining data/ams-2.1.2/src/mainwindow.cpp
Examining data/ams-2.1.2/src/m_wavout.cpp
Examining data/ams-2.1.2/src/m_amp.cpp
Examining data/ams-2.1.2/src/m_vcdoubledecay.h
Examining data/ams-2.1.2/src/guiwidget.cpp
Examining data/ams-2.1.2/src/m_scquantizer.h
Examining data/ams-2.1.2/src/configdialog.h
Examining data/ams-2.1.2/src/nsm.h
Examining data/ams-2.1.2/src/m_vcswitch.cpp
Examining data/ams-2.1.2/src/m_pcmin.h
Examining data/ams-2.1.2/src/m_mix.h
Examining data/ams-2.1.2/src/box.cpp
Examining data/ams-2.1.2/src/m_vca.h
Examining data/ams-2.1.2/src/m_ad.h
Examining data/ams-2.1.2/src/m_vcenv.h
Examining data/ams-2.1.2/src/main.h
Examining data/ams-2.1.2/src/m_vcf.h
Examining data/ams-2.1.2/src/canvasfunction.h
Examining data/ams-2.1.2/src/m_stereomix.cpp
Examining data/ams-2.1.2/src/configdialog.cpp
Examining data/ams-2.1.2/src/m_amp.h
Examining data/ams-2.1.2/src/m_cvs.cpp
Examining data/ams-2.1.2/src/midisliderbase.h
Examining data/ams-2.1.2/src/modularsynth.h
Examining data/ams-2.1.2/src/m_vcenv2.h
Examining data/ams-2.1.2/src/m_delay.cpp
Examining data/ams-2.1.2/src/m_scquantizer.cpp
Examining data/ams-2.1.2/src/m_ladspa.h
Examining data/ams-2.1.2/src/m_vco.h
Examining data/ams-2.1.2/src/m_noise2.cpp
Examining data/ams-2.1.2/src/m_ladspa.cpp
Examining data/ams-2.1.2/src/m_bitgrind.h
Examining data/ams-2.1.2/src/port.cpp
Examining data/ams-2.1.2/src/midicombobox.h
Examining data/ams-2.1.2/src/m_scmcv.h
Examining data/ams-2.1.2/src/m_scmcv.cpp
Examining data/ams-2.1.2/src/m_seq.h
Examining data/ams-2.1.2/src/scopescreen.h
Examining data/ams-2.1.2/src/textedit.h
Examining data/ams-2.1.2/src/m_vquant.cpp
Examining data/ams-2.1.2/src/prefwidget.h
Examining data/ams-2.1.2/src/m_mcv.cpp
Examining data/ams-2.1.2/src/m_ringmod.h
Examining data/ams-2.1.2/src/textedit.cpp
Examining data/ams-2.1.2/src/port_popup.cpp
Examining data/ams-2.1.2/src/m_noise2.h
Examining data/ams-2.1.2/src/mced.h
Examining data/ams-2.1.2/src/m_analogmemory.cpp
Examining data/ams-2.1.2/src/m_pcmin.cpp
Examining data/ams-2.1.2/src/m_v8sequencer.cpp
Examining data/ams-2.1.2/src/m_scope.h
Examining data/ams-2.1.2/src/midicombobox.cpp
Examining data/ams-2.1.2/src/m_dynamicwaves.h
Examining data/ams-2.1.2/src/m_vcdoubledecay.cpp
Examining data/ams-2.1.2/src/notelist.cpp
Examining data/ams-2.1.2/src/m_vco2.cpp
Examining data/ams-2.1.2/src/m_stereomix.h
Examining data/ams-2.1.2/src/midicheckbox.h
Examining data/ams-2.1.2/src/spectrumscreen.h
Examining data/ams-2.1.2/src/m_spectrum.cpp
Examining data/ams-2.1.2/src/ladspadialog.cpp
Examining data/ams-2.1.2/src/m_vocoder.h
Examining data/ams-2.1.2/src/main.cpp
Examining data/ams-2.1.2/src/m_vocoder.cpp
Examining data/ams-2.1.2/src/mced.cpp
Examining data/ams-2.1.2/src/midicontrollable.cpp
Examining data/ams-2.1.2/src/midicontroller.cpp
Examining data/ams-2.1.2/src/module.cpp
Examining data/ams-2.1.2/src/m_pcmout.cpp
Examining data/ams-2.1.2/src/synthdata.cpp
Examining data/ams-2.1.2/src/midiwidget.cpp

FINAL RESULTS:

data/ams-2.1.2/src/canvas.cpp:58:16:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            qs.sprintf("%6.0f", val);
data/ams-2.1.2/src/canvas.cpp:81:16:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            qs.sprintf("%7.0f", val);
data/ams-2.1.2/src/guiwidget.cpp:228:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("%3d", currentPreset);
data/ams-2.1.2/src/guiwidget.cpp:251:16:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            qs.sprintf("%3d", currentPreset);
data/ams-2.1.2/src/m_ad.cpp:68:10:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs.sprintf("%d", l2);
data/ams-2.1.2/src/m_ad.cpp:187:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf(" %2.3f", detune_a[voice[0]]);
data/ams-2.1.2/src/m_ad.cpp:190:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf(" %2.3f", drift_a[l1][voice[0]]);
data/ams-2.1.2/src/m_ad.cpp:193:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf(" %2.3f", detune_a[voice[1]]);
data/ams-2.1.2/src/m_ad.cpp:196:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf(" %2.3f", drift_a[l1][voice[1]]);
data/ams-2.1.2/src/m_cvs.cpp:30:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("CV %d", l1);
data/ams-2.1.2/src/m_cvs.cpp:37:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&CV %d", l1);
data/ams-2.1.2/src/m_cvs.cpp:39:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("CV %d &Fine", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:82:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Volume &%d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:87:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Osc &%d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:89:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Wave &form %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:91:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Octave %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:93:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Tune %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:95:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Harmonic %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:97:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Subharmonic %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:99:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Phi0 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:104:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Envelope %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:106:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("&Delay %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:108:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Attack &Time 0 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:110:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Attack &Level 0 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:112:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Attack T&ime 1 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:114:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Attack Le&vel 1 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:116:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Attack Ti&me 2 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:118:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Att&ack Level 2 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:120:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Atta&ck Time 3 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:122:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Susta&in %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:124:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Re&lease Time 0 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:126:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("R&elease &Level 0 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:128:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Release &Time 1 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:130:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Release &Level 1 %d", l1);
data/ams-2.1.2/src/m_dynamicwaves.cpp:132:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Release &Time 2 %d", l1);
data/ams-2.1.2/src/m_function.cpp:69:12:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qs.sprintf("%d", l1);
data/ams-2.1.2/src/m_function.cpp:149:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Mouse X: %6.3f  Y: %6.3f",
data/ams-2.1.2/src/m_ladspa.cpp:175:28:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                        qs.sprintf("%d-%d", ctrl_in_index + 1,
data/ams-2.1.2/src/m_ladspa.cpp:178:28:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                        qs.sprintf("%d-%d", ctrl_in_index + 1,
data/ams-2.1.2/src/m_ladspa.cpp:349:16:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    pluginName.sprintf("%s", ladspa_dsc->Label);
data/ams-2.1.2/src/m_mcv.cpp:38:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    qs.sprintf("RESERVED FOR LATER USE");
data/ams-2.1.2/src/m_midiout.cpp:48:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("%4d", l1);
data/ams-2.1.2/src/m_mphlfo.cpp:29:10:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs.sprintf("Saw Out %4d", l1 * 45);
data/ams-2.1.2/src/m_mphlfo.cpp:31:10:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs.sprintf("Tri Out %4d", (l1-8) * 45);
data/ams-2.1.2/src/m_pcmin.cpp:33:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf ("In %2d -> ", port);
data/ams-2.1.2/src/m_pcmin.cpp:35:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf ("In %2d -> ", port + 1);
data/ams-2.1.2/src/m_pcmout.cpp:24:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf (" -> Out %2d", port);
data/ams-2.1.2/src/m_pcmout.cpp:26:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf(" -> Out %2d", port + 1);
data/ams-2.1.2/src/m_scmcv.cpp:43:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    qs.sprintf("RESERVED FOR LATER USE");
data/ams-2.1.2/src/m_scmcv.cpp:68:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  dirpath.sprintf("%s", getenv("SCALA_PATH"));
data/ams-2.1.2/src/m_scquantizer.cpp:59:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  dirpath.sprintf("%s", getenv("SCALA_PATH"));
data/ams-2.1.2/src/m_spectrum.cpp:84:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf("%d Hz", (int)rint(f_min));
data/ams-2.1.2/src/m_spectrum.cpp:86:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf("%d Hz", (int)rint(f_max));
data/ams-2.1.2/src/m_spectrum.cpp:251:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf("%d Hz", (int)rint(f_min));
data/ams-2.1.2/src/m_spectrum.cpp:260:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  qs.sprintf("%d Hz", (int)rint(f_max));
data/ams-2.1.2/src/m_stereomix.cpp:144:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Out %d", l1);
data/ams-2.1.2/src/m_vcpanning.cpp:34:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs.sprintf("Out %d", l1);
data/ams-2.1.2/src/m_wavout.cpp:265:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    qs1.sprintf("%d", seconds / 3600);
data/ams-2.1.2/src/m_wavout.cpp:267:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs2.sprintf("0%d", minutes);
data/ams-2.1.2/src/m_wavout.cpp:269:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs2.sprintf("%d", minutes);
data/ams-2.1.2/src/m_wavout.cpp:272:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs3.sprintf("0%d", displaySeconds);
data/ams-2.1.2/src/m_wavout.cpp:274:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs3.sprintf("%d", displaySeconds);
data/ams-2.1.2/src/main.cpp:115:26:  [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.
  QLocale loc = QLocale::system();
data/ams-2.1.2/src/midiwidget.cpp:297:12:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qs.sprintf("%4d", l1);
data/ams-2.1.2/src/modularsynth.cpp:1486:11:  [4] (buffer) vfscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
   return vfscanf(f, format, argList);
data/ams-2.1.2/src/modularsynth.cpp:2286:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      qs2.sprintf("%3d", guiWidget->presetNameList.count());
data/ams-2.1.2/src/synthdata.cpp:235:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qsl.sprintf("%s", (*di)->Label);
data/ams-2.1.2/src/synthdata.cpp:236:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qsn.sprintf("%s", (*di)->Name);
data/ams-2.1.2/src/synthdata.cpp:555:12:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qs.sprintf("out_%d", i);
data/ams-2.1.2/src/synthdata.cpp:562:12:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        qs.sprintf("in_%d", i);
data/ams-2.1.2/src/ladspadialog.cpp:92:21:  [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 *_lp = getenv("LADSPA_PATH");
data/ams-2.1.2/src/m_ad.cpp:30:39:  [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.
      drift_a[l1][l2] = 0.4 * (double)random() / (double)RAND_MAX - 0.2;
data/ams-2.1.2/src/m_ad.cpp:31:39:  [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.
      drift_c[l1][l2] = 0.4 * (double)random() / (double)RAND_MAX - 0.2;
data/ams-2.1.2/src/m_ad.cpp:35:34:  [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.
    detune_a[l2] = 0.4 * (double)random() / (double)RAND_MAX - 0.2;
data/ams-2.1.2/src/m_ad.cpp:36:34:  [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.
    detune_c[l2] = 0.4 * (double)random() / (double)RAND_MAX - 0.2;
data/ams-2.1.2/src/m_ad.cpp:150:46:  [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.
                detune_c[l4] = 2.0 * (double)random() / (double)RAND_MAX - 1.0;
data/ams-2.1.2/src/m_ad.cpp:158:51:  [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.
                  drift_c[l5][l4] = 2.0 * (double)random() / (double)RAND_MAX - 1.0;
data/ams-2.1.2/src/m_lfo.cpp:68:3:  [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(abs(tm - 10000 * (tm % 100)));
data/ams-2.1.2/src/m_noise.cpp:48:3:  [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(abs(t - 10000 * (t % 100)));
data/ams-2.1.2/src/m_noise2.cpp:48:3:  [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(abs(t - 10000 * (t % 100)));
data/ams-2.1.2/src/m_scmcv.cpp:68:25:  [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.
  dirpath.sprintf("%s", getenv("SCALA_PATH"));
data/ams-2.1.2/src/m_scquantizer.cpp:59:25:  [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.
  dirpath.sprintf("%s", getenv("SCALA_PATH"));
data/ams-2.1.2/src/main.cpp:157:27:  [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 ((getopt_return = getopt_long(argc, argv,
data/ams-2.1.2/src/mainwindow.cpp:355: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/ams-2.1.2/src/m_scmcv.cpp:166: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 (!qfile.open(QIODevice::ReadOnly)) {
data/ams-2.1.2/src/m_scquantizer.cpp:192: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 (!qfile.open(QIODevice::ReadOnly)) {
data/ams-2.1.2/src/m_seq.cpp:27:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char str[1024];
data/ams-2.1.2/src/m_seq.cpp:45: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(str, "&Pitch %d", l1);
data/ams-2.1.2/src/m_seq.cpp:47: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(str, "&Gate %d", l1);
data/ams-2.1.2/src/m_seq.cpp:49: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(str, "&Velocity %d", l1);
data/ams-2.1.2/src/m_seq.cpp:74: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(str, "Gate &%d", l1);
data/ams-2.1.2/src/m_seq.cpp:76: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(str, "Pitch &%d", l1);
data/ams-2.1.2/src/m_seq.cpp:78: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(str, "Velocity &%d", l1);
data/ams-2.1.2/src/m_wavout.cpp:192: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 (wavfile.open(QIODevice::WriteOnly)) {
data/ams-2.1.2/src/m_wavout.cpp:238: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 buf[2048];
data/ams-2.1.2/src/m_wavout.h:24: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 outbuf[8];
data/ams-2.1.2/src/main.cpp:80: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).
        fd = open(rcPath.toLatin1().data(), O_CREAT|O_RDWR, 0666);
data/ams-2.1.2/src/main.cpp:194:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        msoptions.frsize = atoi(optarg);
data/ams-2.1.2/src/main.cpp:197:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        msoptions.nfrags = atoi(optarg);
data/ams-2.1.2/src/main.cpp:200: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).
        msoptions.fsamp = atoi(optarg);
data/ams-2.1.2/src/main.cpp:203: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).
        msoptions.ncapt = atoi(optarg);
data/ams-2.1.2/src/main.cpp:206: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).
        msoptions.nplay = atoi(optarg);
data/ams-2.1.2/src/main.cpp:209: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).
        msoptions.poly = atoi(optarg);
data/ams-2.1.2/src/mainwindow.cpp:610:12:  [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 (!f.open(QIODevice::ReadOnly)) {
data/ams-2.1.2/src/mainwindow.cpp:654:12:  [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 (!f.open(QIODevice::WriteOnly)) {
data/ams-2.1.2/src/mainwindow.cpp:732: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 (!file.open(rcFd, QIODevice::ReadOnly)) {
data/ams-2.1.2/src/mainwindow.cpp:773: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 (!file.open(rcFd, QIODevice::WriteOnly)) {
data/ams-2.1.2/src/modularsynth.cpp:443: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 pipeIn[16];
data/ams-2.1.2/src/modularsynth.cpp:1502: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 sc[2048];
data/ams-2.1.2/src/modularsynth.cpp:1510: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).
    if (!(f = fopen(config_fn.toLatin1().constData(), "r"))) {
data/ams-2.1.2/src/modularsynth.cpp:1565: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).
    if (!(f = fopen(config_fn.toLatin1().constData(), "w"))) {
data/ams-2.1.2/src/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/ams-2.1.2/src/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/ams-2.1.2/src/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/ams-2.1.2/src/mainwindow.cpp:437:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    result = read(fd, &message, sizeof(message));
data/ams-2.1.2/src/modularsynth.cpp:445:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t pipeRed = read(fd, pipeIn, sizeof(pipeIn));

ANALYSIS SUMMARY:

Hits = 116
Lines analyzed = 24482 in approximately 0.57 seconds (43198 lines/second)
Physical Source Lines of Code (SLOC) = 20005
Hits@level = [0]  39 [1]   2 [2]  30 [3]  14 [4]  70 [5]   0
Hits@level+ = [0+] 155 [1+] 116 [2+] 114 [3+]  84 [4+]  70 [5+]   0
Hits/KSLOC@level+ = [0+] 7.74806 [1+] 5.79855 [2+] 5.69858 [3+] 4.19895 [4+] 3.49913 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.