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/libdontdie-1.2.0/src/libdontdie.c
Examining data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c
Examining data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c
Examining data/libdontdie-1.2.0/test/Cperformance/perf.c

FINAL RESULTS:

data/libdontdie-1.2.0/src/libdontdie.c:15:7:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
      syslog(LOG_USER | LOG_INFO, "libdontdie: " msg);                         \
data/libdontdie-1.2.0/src/libdontdie.c:33:33:  [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 const *const str_debug = getenv("DD_DEBUG");
data/libdontdie-1.2.0/src/libdontdie.c:41:7:  [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.
      getenv("DD_EVAL_ENVIRONMENT_ONCE");
data/libdontdie-1.2.0/src/libdontdie.c:49:41:  [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 const *const str_use_keepalive = getenv("DD_USE_KEEPALIVE");
data/libdontdie-1.2.0/src/libdontdie.c:59:7:  [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.
      getenv("DD_TCP_KEEPALIVE_" strtype);                                     \
data/libdontdie-1.2.0/src/libdontdie.c:61:29:  [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).
    tcp_keepalive_##ltype = atoi(str_tcp_keepalive_##ltype);                   \
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:23: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_port[256];
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:29: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).
      client_port = atoi(str_port);
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:43: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 text[256];
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:57: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 buffer[256];
data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c:73: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 buffer[256];
data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c:83: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 text[256];
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:17:19:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int const c = getchar();
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:49:26:  [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 const cnt = strlen(text) - 1;
data/libdontdie-1.2.0/test/Cblackbox/tcp_client.c:59:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int const n = read(client_socket, buffer, 255);
data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c:56:19:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int const c = getchar();
data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c:75:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int const n = read(accepted_socket, buffer, 255);
data/libdontdie-1.2.0/test/Cblackbox/tcp_server.c:89:26:  [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 const cnt = strlen(text) - 1;

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 438 in approximately 0.03 seconds (13638 lines/second)
Physical Source Lines of Code (SLOC) = 371
Hits@level = [0]  10 [1]   6 [2]   7 [3]   4 [4]   1 [5]   0
Hits@level+ = [0+]  28 [1+]  18 [2+]  12 [3+]   5 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 75.4717 [1+] 48.5175 [2+] 32.345 [3+] 13.4771 [4+] 2.69542 [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.