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-unix-compat-0.5.2/cbits/HsUname.c
Examining data/haskell-unix-compat-0.5.2/cbits/HsUnixCompat.c
Examining data/haskell-unix-compat-0.5.2/cbits/mktemp.c
Examining data/haskell-unix-compat-0.5.2/include/HsUnixCompat.h

FINAL RESULTS:

data/haskell-unix-compat-0.5.2/cbits/HsUname.c:17:5:  [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(dest, src);
data/haskell-unix-compat-0.5.2/cbits/HsUname.c:22:5:  [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(dest, src);
data/haskell-unix-compat-0.5.2/cbits/HsUname.c:25:25:  [4] (format) _snprintf:
  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 StringCchPrintf _snprintf
data/haskell-unix-compat-0.5.2/cbits/mktemp.c:47:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
static int random(uint32_t *);
data/haskell-unix-compat-0.5.2/cbits/mktemp.c:87:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        if (!random(&randval)) {
data/haskell-unix-compat-0.5.2/cbits/mktemp.c:157:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
static int random(uint32_t *value)
data/haskell-unix-compat-0.5.2/cbits/HsUname.c:291:9:  [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[80];
data/haskell-unix-compat-0.5.2/cbits/mktemp.c:70: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 carrybuf[MAXPATHLEN];
data/haskell-unix-compat-0.5.2/cbits/mktemp.c:98: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(carrybuf, start, suffp - start);
data/haskell-unix-compat-0.5.2/cbits/HsUname.c:286:12:  [1] (buffer) _tcslen:
  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).
        if(_tcslen(osvi.szCSDVersion) > 0) {

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 566 in approximately 0.04 seconds (12689 lines/second)
Physical Source Lines of Code (SLOC) = 419
Hits@level = [0]   0 [1]   1 [2]   3 [3]   3 [4]   3 [5]   0
Hits@level+ = [0+]  10 [1+]  10 [2+]   9 [3+]   6 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 23.8663 [1+] 23.8663 [2+] 21.4797 [3+] 14.3198 [4+] 7.1599 [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.