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/sfnt2woff-zopfli-1.1.0/blocksplitter.c
Examining data/sfnt2woff-zopfli-1.1.0/blocksplitter.h
Examining data/sfnt2woff-zopfli-1.1.0/cache.c
Examining data/sfnt2woff-zopfli-1.1.0/cache.h
Examining data/sfnt2woff-zopfli-1.1.0/deflate.c
Examining data/sfnt2woff-zopfli-1.1.0/deflate.h
Examining data/sfnt2woff-zopfli-1.1.0/gzip_container.c
Examining data/sfnt2woff-zopfli-1.1.0/gzip_container.h
Examining data/sfnt2woff-zopfli-1.1.0/hash.c
Examining data/sfnt2woff-zopfli-1.1.0/hash.h
Examining data/sfnt2woff-zopfli-1.1.0/katajainen.c
Examining data/sfnt2woff-zopfli-1.1.0/katajainen.h
Examining data/sfnt2woff-zopfli-1.1.0/lz77.c
Examining data/sfnt2woff-zopfli-1.1.0/lz77.h
Examining data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c
Examining data/sfnt2woff-zopfli-1.1.0/squeeze.c
Examining data/sfnt2woff-zopfli-1.1.0/squeeze.h
Examining data/sfnt2woff-zopfli-1.1.0/tree.c
Examining data/sfnt2woff-zopfli-1.1.0/tree.h
Examining data/sfnt2woff-zopfli-1.1.0/util.c
Examining data/sfnt2woff-zopfli-1.1.0/util.h
Examining data/sfnt2woff-zopfli-1.1.0/woff-private.h
Examining data/sfnt2woff-zopfli-1.1.0/woff.c
Examining data/sfnt2woff-zopfli-1.1.0/woff.h
Examining data/sfnt2woff-zopfli-1.1.0/woff2sfnt.c
Examining data/sfnt2woff-zopfli-1.1.0/zlib_container.c
Examining data/sfnt2woff-zopfli-1.1.0/zlib_container.h
Examining data/sfnt2woff-zopfli-1.1.0/zopfli.h
Examining data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c
Examining data/sfnt2woff-zopfli-1.1.0/zopfli_lib.c

FINAL RESULTS:

data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:79:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "unable to open file %s", name);
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:184:3:  [4] (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).
  strcpy(outName, argv[0]);
data/sfnt2woff-zopfli-1.1.0/woff.c:1119:7:  [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(f, template, prefix, "unrecognized sfnt version");
data/sfnt2woff-zopfli-1.1.0/woff.c:1122:7:  [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(f, template, prefix, "checksum mismatch (corrected)");
data/sfnt2woff-zopfli-1.1.0/woff.c:1125:7:  [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(f, template, prefix, "misaligned font table");
data/sfnt2woff-zopfli-1.1.0/woff.c:1128:7:  [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(f, template, prefix, "extraneous input data discarded");
data/sfnt2woff-zopfli-1.1.0/woff.c:1131:7:  [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(f, template, prefix, "final table not correctly padded");
data/sfnt2woff-zopfli-1.1.0/woff.c:1134:7:  [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(f, template, prefix, "digital signature (DSIG) table removed");
data/sfnt2woff-zopfli-1.1.0/woff.c:1166: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(f, template, prefix, msg);
data/sfnt2woff-zopfli-1.1.0/woff2sfnt.c:82:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "unable to open file %s", name);
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:119:3:  [4] (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).
  strcpy(result, str1);
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:120:3:  [4] (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).
  strcat(result, str2);
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:110:17:  [3] (buffer) getopt:
  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(argc, argv, "v:m:p:n:h")) != -1) {
data/sfnt2woff-zopfli-1.1.0/woff2sfnt.c:110:17:  [3] (buffer) getopt:
  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(argc, argv, "vmph")) != -1) {
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:76:19:  [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 * inFile = fopen(name, "rb");
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:78: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[200];
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:181:21:  [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 * outName = (char *) malloc(strlen(argv[0]) + 8);
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:188:3:  [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(outName, ".woff");
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:191:22:  [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 * outFile = fopen(outName, "wb");
data/sfnt2woff-zopfli-1.1.0/squeeze.c:51: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(dest->litlens, source->litlens, 288 * sizeof(dest->litlens[0]));
data/sfnt2woff-zopfli-1.1.0/squeeze.c:52: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(dest->dists, source->dists, 32 * sizeof(dest->dists[0]));
data/sfnt2woff-zopfli-1.1.0/squeeze.c:54: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(dest->ll_symbols, source->ll_symbols,
data/sfnt2woff-zopfli-1.1.0/squeeze.c:56: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(dest->d_symbols, source->d_symbols, 32 * sizeof(dest->d_symbols[0]));
data/sfnt2woff-zopfli-1.1.0/woff.c:296: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(woffData + tableOffset, dest, destLen);
data/sfnt2woff-zopfli-1.1.0/woff.c:310: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(woffData + tableOffset,
data/sfnt2woff-zopfli-1.1.0/woff.c:462: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(newData, woffData, tableLimit);
data/sfnt2woff-zopfli-1.1.0/woff.c:478: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(newData + offset, metaData, metaCompLen);
data/sfnt2woff-zopfli-1.1.0/woff.c:488: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(newData + offset, privData, privLen);
data/sfnt2woff-zopfli-1.1.0/woff.c:810: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(sfntData + offset, woffData + sourceOffset, origLen);
data/sfnt2woff-zopfli-1.1.0/woff.c:1056: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(data, woffData + offset, length);
data/sfnt2woff-zopfli-1.1.0/woff2sfnt.c:79:19:  [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 * inFile = fopen(name, "rb");
data/sfnt2woff-zopfli-1.1.0/woff2sfnt.c:81: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[200];
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:45:10:  [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, "rb");
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:73:16:  [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, "wb" );
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:149:31:  [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).
      options.numiterations = atoi(arg + 3);
data/sfnt2woff-zopfli-1.1.0/sfnt2woff.c:181:36:  [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 * outName = (char *) malloc(strlen(argv[0]) + 8);
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:116:16:  [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 len = strlen(str1) + strlen(str2);
data/sfnt2woff-zopfli-1.1.0/zopfli_bin.c:116:31:  [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 len = strlen(str1) + strlen(str2);

ANALYSIS SUMMARY:

Hits = 38
Lines analyzed = 6411 in approximately 0.19 seconds (33102 lines/second)
Physical Source Lines of Code (SLOC) = 4023
Hits@level = [0]  36 [1]   3 [2]  21 [3]   2 [4]  12 [5]   0
Hits@level+ = [0+]  74 [1+]  38 [2+]  35 [3+]  14 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 18.3942 [1+] 9.44569 [2+] 8.69998 [3+] 3.47999 [4+] 2.98285 [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.