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/din-5.2.1/acconfig.h
Examining data/din-5.2.1/include/main.h
Examining data/din-5.2.1/include/dingl.h
Examining data/din-5.2.1/include/key_consts.h
Examining data/din-5.2.1/include/box.h
Examining data/din-5.2.1/include/utils.h
Examining data/din-5.2.1/include/vector2d.h
Examining data/din-5.2.1/include/tick.h
Examining data/din-5.2.1/include/chrono.h
Examining data/din-5.2.1/include/ui.h
Examining data/din-5.2.1/include/ui_list.h
Examining data/din-5.2.1/include/glyph.h
Examining data/din-5.2.1/include/line.h
Examining data/din-5.2.1/include/font_editor.h
Examining data/din-5.2.1/include/font.h
Examining data/din-5.2.1/include/console.h
Examining data/din-5.2.1/include/viewwin.h
Examining data/din-5.2.1/include/input.h
Examining data/din-5.2.1/include/oscilloscope.h
Examining data/din-5.2.1/include/point.h
Examining data/din-5.2.1/include/curve.h
Examining data/din-5.2.1/include/multi_curve.h
Examining data/din-5.2.1/include/play.h
Examining data/din-5.2.1/include/curve_editor.h
Examining data/din-5.2.1/include/basic_editor.h
Examining data/din-5.2.1/include/listeners.h
Examining data/din-5.2.1/include/console_iterator.h
Examining data/din-5.2.1/include/audio.h
Examining data/din-5.2.1/include/phrasor.h
Examining data/din-5.2.1/include/beat2value.h
Examining data/din-5.2.1/include/globals.h
Examining data/din-5.2.1/include/scale_info.h
Examining data/din-5.2.1/include/command.h
Examining data/din-5.2.1/include/scalelist.h
Examining data/din-5.2.1/include/crvpt.h
Examining data/din-5.2.1/include/textboard.h
Examining data/din-5.2.1/include/sine_mixer.h
Examining data/din-5.2.1/include/levels.h
Examining data/din-5.2.1/include/help.h
Examining data/din-5.2.1/include/mocap.h
Examining data/din-5.2.1/include/din.h
Examining data/din-5.2.1/include/curve_library.h
Examining data/din-5.2.1/include/delay.h
Examining data/din-5.2.1/include/curve_listener.h
Examining data/din-5.2.1/include/strength_editor.h
Examining data/din-5.2.1/include/range.h
Examining data/din-5.2.1/include/note.h
Examining data/din-5.2.1/include/color.h
Examining data/din-5.2.1/include/solver.h
Examining data/din-5.2.1/include/container.h
Examining data/din-5.2.1/include/checkdotdin.h
Examining data/din-5.2.1/include/compressor.h
Examining data/din-5.2.1/include/osc.h
Examining data/din-5.2.1/include/tokenizer.h
Examining data/din-5.2.1/include/morse_code.h
Examining data/din-5.2.1/include/tcl_interp.h
Examining data/din-5.2.1/include/box_selector.h
Examining data/din-5.2.1/include/ansi_color_codes.h
Examining data/din-5.2.1/include/keyboard_keyboard.h
Examining data/din-5.2.1/include/fft.h
Examining data/din-5.2.1/include/widget.h
Examining data/din-5.2.1/include/button.h
Examining data/din-5.2.1/include/checkbutton.h
Examining data/din-5.2.1/include/field.h
Examining data/din-5.2.1/include/fader.h
Examining data/din-5.2.1/include/drone.h
Examining data/din-5.2.1/include/ticker_tape.h
Examining data/din-5.2.1/include/slider.h
Examining data/din-5.2.1/include/label.h
Examining data/din-5.2.1/include/label_field_slider.h
Examining data/din-5.2.1/include/filled_button.h
Examining data/din-5.2.1/include/authors_note.h
Examining data/din-5.2.1/include/bot.h
Examining data/din-5.2.1/include/random.h
Examining data/din-5.2.1/src/main.cc
Examining data/din-5.2.1/src/din.cc
Examining data/din-5.2.1/src/audio.cc
Examining data/din-5.2.1/src/range.cc
Examining data/din-5.2.1/src/note.cc
Examining data/din-5.2.1/src/play.cc
Examining data/din-5.2.1/src/curve.cc
Examining data/din-5.2.1/src/multi_curve.cc
Examining data/din-5.2.1/src/solver.cc
Examining data/din-5.2.1/src/curve_library.cc
Examining data/din-5.2.1/src/basic_editor.cc
Examining data/din-5.2.1/src/curve_editor.cc
Examining data/din-5.2.1/src/listeners.cc
Examining data/din-5.2.1/src/console.cc
Examining data/din-5.2.1/src/console_iterator.cc
Examining data/din-5.2.1/src/help.cc
Examining data/din-5.2.1/src/line.cc
Examining data/din-5.2.1/src/font.cc
Examining data/din-5.2.1/src/glyph.cc
Examining data/din-5.2.1/src/oscilloscope.cc
Examining data/din-5.2.1/src/delay.cc
Examining data/din-5.2.1/src/viewwin.cc
Examining data/din-5.2.1/src/mocap.cc
Examining data/din-5.2.1/src/beat2value.cc
Examining data/din-5.2.1/src/scale_info.cc
Examining data/din-5.2.1/src/command.cc
Examining data/din-5.2.1/src/scalelist.cc
Examining data/din-5.2.1/src/textboard.cc
Examining data/din-5.2.1/src/sine_mixer.cc
Examining data/din-5.2.1/src/levels.cc
Examining data/din-5.2.1/src/chrono.cc
Examining data/din-5.2.1/src/font_editor.cc
Examining data/din-5.2.1/src/phrasor.cc
Examining data/din-5.2.1/src/compressor.cc
Examining data/din-5.2.1/src/osc.cc
Examining data/din-5.2.1/src/globals.cc
Examining data/din-5.2.1/src/bot.cc
Examining data/din-5.2.1/src/tokenizer.cc
Examining data/din-5.2.1/src/morse_code.cc
Examining data/din-5.2.1/src/tcl_interp.cc
Examining data/din-5.2.1/src/ui.cc
Examining data/din-5.2.1/src/keyboard_keyboard.cc
Examining data/din-5.2.1/src/fft.cc
Examining data/din-5.2.1/src/widget.cc
Examining data/din-5.2.1/src/button.cc
Examining data/din-5.2.1/src/checkbutton.cc
Examining data/din-5.2.1/src/field.cc
Examining data/din-5.2.1/src/drone.cc
Examining data/din-5.2.1/src/fader.cc
Examining data/din-5.2.1/src/ticker_tape.cc
Examining data/din-5.2.1/src/label.cc
Examining data/din-5.2.1/src/filled_button.cc
Examining data/din-5.2.1/src/authors_note.cc

FINAL RESULTS:

data/din-5.2.1/include/checkdotdin.h:39:7:  [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 ("checkdotdin");
data/din-5.2.1/src/command.cc:727:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf (buf, "%s %s", dist1[ji], dist2[ji]);
data/din-5.2.1/src/command.cc:866:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (buf, "key %s @ %0.3f Hz, tonic@ %0.3f Hz & distance %0.3f Hz", note.c_str(), frequency, d->get_tonic(), dist);
data/din-5.2.1/src/main.cc:707:16:  [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.
  int ignore = system (". ~/.din/m00"); // xset m 0 0 for clean mouse data, without any acceleration applied by X
data/din-5.2.1/src/main.cc:876:12:  [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.
  ignore = system ("xset m $ACCEL $THRESHOLD 2>err"); // restore mouse settings
data/din-5.2.1/include/checkdotdin.h:34:26:  [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.
    dotdin = std::string(getenv ("HOME")) + std::string("/.din/");
data/din-5.2.1/include/audio.h:86:7:  [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 ();
data/din-5.2.1/include/basic_editor.h:53: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.
  static char buf [buf_size];
data/din-5.2.1/include/command.h:47: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 [size]; // for console printing
data/din-5.2.1/include/field.h:56: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 sbuf [1024]; // buffer for writing ints and floats
data/din-5.2.1/include/input.h:38: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 now [NUM_BYTES];
data/din-5.2.1/include/input.h:39: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 last [NUM_BYTES];
data/din-5.2.1/src/audio.cc:71:3:  [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).
  open ();
data/din-5.2.1/src/audio.cc:132: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 audio_out::open() {
data/din-5.2.1/src/audio.cc:269: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 (lbuf, lbuf0, samples_channel_size);
data/din-5.2.1/src/audio.cc:270: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 (rbuf, rbuf0, samples_channel_size);
data/din-5.2.1/src/audio.cc:382: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 [10];
data/din-5.2.1/src/audio.cc:390: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 (buf, " %u", *bufp++);
data/din-5.2.1/src/basic_editor.cc:249: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 (buf, " %.3f, %.3f", cx, cy);
data/din-5.2.1/src/basic_editor.cc:255:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf (buf, " sustain @ %.3f", _gotog.g);
data/din-5.2.1/src/bot.cc:190:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char nickbuf [nickbufsize]; // irc_get_target_nick will truncate to this length
data/din-5.2.1/src/command.cc:301: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 (buf, "%d", d->snap_drones);
data/din-5.2.1/src/command.cc:308: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 (buf, "rate %d x %d y %d ", d->dinfo.scroll.rate, d->dinfo.scroll.dx, d->dinfo.scroll.dy);
data/din-5.2.1/src/command.cc:384:3:  [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 (buf, "%0.2f", t);
data/din-5.2.1/src/command.cc:694:3:  [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 (buf, "%d %d %d %d", fnt.xsize, fnt.ysize, fnt.charspc, fnt.headroom);
data/din-5.2.1/src/command.cc:870: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 (buf, "%0.3f", d->get_tonic ());
data/din-5.2.1/src/command.cc:899:11:  [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).
    oct = atoi (s.c_str());
data/din-5.2.1/src/command.cc:1053: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 (buf, "%f %f %f", d->osc.lr, d->osc.lg, d->osc.lb);
data/din-5.2.1/src/command.cc:1057: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 (buf, "%f %f %f", d->osc.rr, d->osc.rg, d->osc.rb);
data/din-5.2.1/src/command.cc:1090: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 (buf, "%d", num_drones);
data/din-5.2.1/src/console.cc:91:3:  [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 (buf, "%x", i);
data/din-5.2.1/src/console.cc:97:3:  [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 (buf, "%d", i);
data/din-5.2.1/src/console.cc:103:3:  [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 (buf, "%lu", i);
data/din-5.2.1/src/console.cc:109:3:  [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 (buf, "%llux", i);
data/din-5.2.1/src/console.cc:115:3:  [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 (buf, "%f", f);
data/din-5.2.1/src/console.cc:121:3:  [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 (buf, "%f", d);
data/din-5.2.1/src/curve_editor.cc:891: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 (buf, "%d", m);
data/din-5.2.1/src/din.cc:1460: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 (aout.result, lout, aout.samples_channel_size); // voice
data/din-5.2.1/src/din.cc:1468: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 (rout, lout, aout.samples_channel_size); // copy left -> right
data/din-5.2.1/src/din.cc:1485: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 (rout, lout, aout.samples_channel_size); // copy left -> right ie drone is mono
data/din-5.2.1/src/fft.cc:44: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* wis = fopen (fname.c_str(), "r");
data/din-5.2.1/src/fft.cc:59: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* wis = fopen (fname.c_str(), "w");
data/din-5.2.1/src/field.cc:149:3:  [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 (sbuf, "%d", i);
data/din-5.2.1/src/field.cc:154:3:  [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 (sbuf, "%.2f", f);
data/din-5.2.1/src/field.cc:246:11:  [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).
  return (atoi (text.c_str()));
data/din-5.2.1/src/keyboard_keyboard.cc:344: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 (right, left, aout.samples_channel_size);
data/din-5.2.1/src/keyboard_keyboard.cc:357: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 (right, left, aout.samples_channel_size);
data/din-5.2.1/src/levels.cc:229:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              static char buf [256];
data/din-5.2.1/src/levels.cc:230:15:  [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 (buf, "%d/%.3f", lev+1, lev > -1? values[lev]:-1);
data/din-5.2.1/src/main.cc:807: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 (keys.last, keys.now, key_state::NUM_BYTES); // save keyboard state
data/din-5.2.1/src/osc.cc:37:12:  [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 pt = atoi (port.c_str());
data/din-5.2.1/src/oscilloscope.cc:191: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.
  static char buf [256];
data/din-5.2.1/src/oscilloscope.cc:192:3:  [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 (buf, "min/max: %1.2f, %1.2f", sample_t::lmin, sample_t::lmax);
data/din-5.2.1/src/oscilloscope.cc:200:3:  [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 (buf, "min/max: %1.2f, %1.2f", sample_t::rmin, sample_t::rmax);
data/din-5.2.1/src/tokenizer.cc:101:7:  [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).
  i = atoi (s.c_str());
data/din-5.2.1/src/main.cc:864:17:  [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.
    if (USLEEP) usleep (USLEEP);

ANALYSIS SUMMARY:

Hits = 56
Lines analyzed = 18977 in approximately 0.52 seconds (36731 lines/second)
Physical Source Lines of Code (SLOC) = 12346
Hits@level = [0]   0 [1]   1 [2]  49 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  56 [1+]  56 [2+]  55 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 4.53588 [1+] 4.53588 [2+] 4.45488 [3+] 0.485987 [4+] 0.404989 [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.