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/haskell-bzlib-0.5.1.0/cbits/blocksort.c
Examining data/haskell-bzlib-0.5.1.0/cbits/bzlib.c
Examining data/haskell-bzlib-0.5.1.0/cbits/bzlib.h
Examining data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h
Examining data/haskell-bzlib-0.5.1.0/cbits/compress.c
Examining data/haskell-bzlib-0.5.1.0/cbits/crctable.c
Examining data/haskell-bzlib-0.5.1.0/cbits/decompress.c
Examining data/haskell-bzlib-0.5.1.0/cbits/huffman.c
Examining data/haskell-bzlib-0.5.1.0/cbits/randtable.c

FINAL RESULTS:

data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:1417:4:  [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(mode2, writing ? "w" : "r" );
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:65: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 ( stderr,   \
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:74:4:  [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,zf)
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:76:4:  [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,zf,za1)
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:78:4:  [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,zf,za1,za2)
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:80:4:  [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,zf,za1,za2,za3)
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:82:4:  [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,zf,za1,za2,za3,za4)
data/haskell-bzlib-0.5.1.0/cbits/bzlib_private.h:84:4:  [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,zf,za1,za2,za3,za4,za5)
data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:1390: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   unused[BZ_MAX_UNUSED];
data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:1393: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   mode2[10]     = "";
data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:1425:14:  [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(path,mode2);
data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:908:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   Int32 c = fgetc ( f );
data/haskell-bzlib-0.5.1.0/cbits/bzlib.c:1418:4:  [1] (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 character.
   strcat(mode2,"b");   /* binary mode */

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 5174 in approximately 0.51 seconds (10090 lines/second)
Physical Source Lines of Code (SLOC) = 3622
Hits@level = [0]   3 [1]   2 [2]   3 [3]   0 [4]   8 [5]   0
Hits@level+ = [0+]  16 [1+]  13 [2+]  11 [3+]   8 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 4.41745 [1+] 3.58918 [2+] 3.037 [3+] 2.20872 [4+] 2.20872 [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.