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/libotf-0.9.13/example/otfview.c
Examining data/libotf-0.9.13/example/otfdump.c
Examining data/libotf-0.9.13/example/otflist.c
Examining data/libotf-0.9.13/example/otftobdf.c
Examining data/libotf-0.9.13/src/otfdrive.c
Examining data/libotf-0.9.13/src/internal.h
Examining data/libotf-0.9.13/src/otf.h
Examining data/libotf-0.9.13/src/otfopen.c
Examining data/libotf-0.9.13/src/otferror.c

FINAL RESULTS:

data/libotf-0.9.13/example/otfdump.c:36:49:  [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 IPRINT printf("\n%*s", indent * 2, ""), printf
data/libotf-0.9.13/example/otflist.c:44:5:  [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.
    fprintf (stderr, fmt, arg);	\
data/libotf-0.9.13/example/otflist.c:230:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf (name, "%s (%s)", filename, family);
data/libotf-0.9.13/example/otftobdf.c:42:5:  [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.
    fprintf (stderr, fmt, arg);	\
data/libotf-0.9.13/example/otfview.c:588:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf (buf + 4, " (%s)", name);
data/libotf-0.9.13/example/otfview.c:599:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf (buf + x + 5, "(%s)", name);
data/libotf-0.9.13/example/otfview.c:718:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (name, "%s-%04X.ps", face->family_name, index);
data/libotf-0.9.13/example/otfview.c:1585:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (name, "%s - %s", pname, fname);
data/libotf-0.9.13/example/otfview.c:1597:5:  [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.
    fprintf (stderr, fmt, arg);	\
data/libotf-0.9.13/example/otfview.c:1715:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (title, "%s family:%s style:%s",
data/libotf-0.9.13/src/otferror.c:49:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (error_message, "OTF-Error (%s): ", error_string[err]);
data/libotf-0.9.13/src/otferror.c:50:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (error_message + strlen (error_message), fmt, arg);
data/libotf-0.9.13/src/otferror.c:59:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (error_message, "%s", error_string[0]);
data/libotf-0.9.13/src/otfopen.c:423:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (errfmt, "nameID (%d)%%s", rec->nameID);
data/libotf-0.9.13/src/otfopen.c:2034:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (errfmt, "GSUB Lookup %d-%d%%s", type, subtable->Format);
data/libotf-0.9.13/src/otfopen.c:2505:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (errfmt, "GPOS Lookup %d-%d%%s", type, subtable->Format);
data/libotf-0.9.13/example/otftobdf.c:184: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.
    char *str = getenv ("PIXEL_SIZE");
data/libotf-0.9.13/example/otfview.c:1638: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.
    char *str = getenv ("PIXEL_SIZE");
data/libotf-0.9.13/src/otfopen.c:66:16:  [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.
  debug_flag = getenv ("LIBOTF_DEBUG") != NULL;
data/libotf-0.9.13/example/otflist.c:52:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[5];
data/libotf-0.9.13/example/otftobdf.c:175: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 (registry, "%d-%d", platform_id, encoding_id);
data/libotf-0.9.13/example/otftobdf.c:186:21:  [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).
    if (str && (i = atoi (str)) > 0)
data/libotf-0.9.13/example/otfview.c:166:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[20];
data/libotf-0.9.13/example/otfview.c:239: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[16];
data/libotf-0.9.13/example/otfview.c:262:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char str[3];
data/libotf-0.9.13/example/otfview.c:264: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 (str, "%XX", i | msb );
data/libotf-0.9.13/example/otfview.c:271: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, "  %04X-%04X  ", glyph_index, glyph_index + 0x7F);
data/libotf-0.9.13/example/otfview.c:273: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, "%06X-%06X", glyph_index, glyph_index + 0x7F);
data/libotf-0.9.13/example/otfview.c:437:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		      memcpy (log2, log, sizeof (OTF_Tag) * logsize);
data/libotf-0.9.13/example/otfview.c:582:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char name[5];
data/libotf-0.9.13/example/otfview.c:584: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, "%04X", gstring.glyphs[0].glyph_id);
data/libotf-0.9.13/example/otfview.c:595: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 + x, " %04X", gstring.glyphs[i].glyph_id);
data/libotf-0.9.13/example/otfview.c:627:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buf[5];
data/libotf-0.9.13/example/otfview.c:643: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, "%04X", glyph_rec.codes[i]);
data/libotf-0.9.13/example/otfview.c:653:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buf[4];
data/libotf-0.9.13/example/otfview.c:655: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, "%03d", idx);
data/libotf-0.9.13/example/otfview.c:721:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen (name, "w");
data/libotf-0.9.13/example/otfview.c:967:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char str[5];
data/libotf-0.9.13/example/otfview.c:992:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char str[5];
data/libotf-0.9.13/example/otfview.c:1055:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char label[5];
data/libotf-0.9.13/example/otfview.c:1140:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[11];
data/libotf-0.9.13/example/otfview.c:1370:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char lbl[4];
data/libotf-0.9.13/example/otfview.c:1377: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 (lbl, "%03d", idx + 1);
data/libotf-0.9.13/example/otfview.c:1461:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char str[3];
data/libotf-0.9.13/example/otfview.c:1465: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 (str, "%XX", i);
data/libotf-0.9.13/example/otfview.c:1499:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char str[3];
data/libotf-0.9.13/example/otfview.c:1501: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 (str, "X%X", j);
data/libotf-0.9.13/example/otfview.c:1640:21:  [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).
    if (str && (i = atoi (str)) > 0)
data/libotf-0.9.13/example/otfview.c:1669:19:  [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).
      fontindex = atoi (argv[2]);
data/libotf-0.9.13/example/otfview.c:1711: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 title[256];
data/libotf-0.9.13/example/otfview.c:1768: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 (charmap_rec[0].name, "no charmap");
data/libotf-0.9.13/example/otfview.c:1774: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 (charmap_rec[i + 1].name, "%d-%d",
data/libotf-0.9.13/example/otfview.c:1779:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat (charmap_rec[i + 1].name, " (unicode)");
data/libotf-0.9.13/example/otfview.c:1782:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat (charmap_rec[i + 1].name, " (apple-roman)");
data/libotf-0.9.13/src/otf.h:135:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *name[OTF_max_nameID + 1];
data/libotf-0.9.13/src/otf.h:143:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char glyphIdArray[256];
data/libotf-0.9.13/src/otf.h:198:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char is32[8192];
data/libotf-0.9.13/src/otf.h:1058:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[5];
data/libotf-0.9.13/src/otfdrive.c:232:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tagname[4];
data/libotf-0.9.13/src/otferror.c:31: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 error_message[1024];
data/libotf-0.9.13/src/otfopen.c:252: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 ((p), (stream)->buf + (stream)->pos, (nbytes));	\
data/libotf-0.9.13/src/otfopen.c:416: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 errfmt[256];
data/libotf-0.9.13/src/otfopen.c:2029: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 errfmt[256];
data/libotf-0.9.13/src/otfopen.c:2500: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 errfmt[256];
data/libotf-0.9.13/src/otfopen.c:2813:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char ttctag[4];
data/libotf-0.9.13/src/otfopen.c:2971:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen (otf_name, "r");
data/libotf-0.9.13/src/otfopen.c:3296: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 (app_data->id, id, len);
data/libotf-0.9.13/example/otflist.c:120:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (direntry->d_name);
data/libotf-0.9.13/example/otflist.c:227:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  name = alloca (strlen (filename)
data/libotf-0.9.13/example/otflist.c:228:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			 + strlen (family)
data/libotf-0.9.13/example/otfview.c:695: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).
  char *name = alloca (strlen (filename) + 10);
data/libotf-0.9.13/example/otfview.c:1583: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).
  char *name = alloca (strlen (fname) + 3 + strlen (pname) + 1);
data/libotf-0.9.13/example/otfview.c:1583:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *name = alloca (strlen (fname) + 3 + strlen (pname) + 1);
data/libotf-0.9.13/example/otfview.c:1589: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).
  text_prop.nitems = strlen (name);
data/libotf-0.9.13/src/otferror.c:50:28:  [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).
  sprintf (error_message + strlen (error_message), fmt, arg);
data/libotf-0.9.13/src/otfopen.c:2959:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (otf_name);
data/libotf-0.9.13/src/otfopen.c:3281:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (id) + 1;

ANALYSIS SUMMARY:

Hits = 77
Lines analyzed = 10953 in approximately 0.33 seconds (33254 lines/second)
Physical Source Lines of Code (SLOC) = 8944
Hits@level = [0] 208 [1]  10 [2]  48 [3]   3 [4]  16 [5]   0
Hits@level+ = [0+] 285 [1+]  77 [2+]  67 [3+]  19 [4+]  16 [5+]   0
Hits/KSLOC@level+ = [0+] 31.8649 [1+] 8.60912 [2+] 7.49106 [3+] 2.12433 [4+] 1.78891 [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.