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-zlib-bindings-0.1.1.5/c/helper.c Examining data/haskell-zlib-bindings-0.1.1.5/cbits/zlib.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/deflate.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/inftrees.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/zconf.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/inffixed.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/crc32.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/trees.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/inflate.h Examining data/haskell-zlib-bindings-0.1.1.5/cbits/inffast.h FINAL RESULTS: data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:199:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # if !defined(vsnprintf) && !defined(NO_vsnprintf) data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:200:15: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:246:39: [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. # define Trace(x) {if (z_verbose>=0) fprintf x ;} data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:247:39: [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. # define Tracev(x) {if (z_verbose>0) fprintf x ;} data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:248:40: [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. # define Tracevv(x) {if (z_verbose>1) fprintf x ;} data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:249:48: [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. # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:250:49: [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. # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:53:14: [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. extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:111:6: [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). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:173:30: [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). # define F_OPEN(name, mode) fopen((name), (mode)) data/haskell-zlib-bindings-0.1.1.5/cbits/zutil.h:230:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define zmemcpy memcpy ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 3230 in approximately 0.15 seconds (21634 lines/second) Physical Source Lines of Code (SLOC) = 1597 Hits@level = [0] 0 [1] 0 [2] 4 [3] 0 [4] 7 [5] 0 Hits@level+ = [0+] 11 [1+] 11 [2+] 11 [3+] 7 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 6.88791 [1+] 6.88791 [2+] 6.88791 [3+] 4.38322 [4+] 4.38322 [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.