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/ucspi-proxy-0.99/ucspi-proxy-log.c
Examining data/ucspi-proxy-0.99/http-xlate-filter.c
Examining data/ucspi-proxy-0.99/ucspi-proxy-pop3.c
Examining data/ucspi-proxy-0.99/ucspi-proxy-http-xlate.c
Examining data/ucspi-proxy-0.99/null-filter.c
Examining data/ucspi-proxy-0.99/auth-lib.h
Examining data/ucspi-proxy-0.99/ucspi-proxy.h
Examining data/ucspi-proxy-0.99/ucspi-proxy-imap.c
Examining data/ucspi-proxy-0.99/log-filter.c
Examining data/ucspi-proxy-0.99/auth-lib.c
Examining data/ucspi-proxy-0.99/base64.c
Examining data/ucspi-proxy-0.99/imap-filter.c
Examining data/ucspi-proxy-0.99/pop3-filter.c
Examining data/ucspi-proxy-0.99/relay-filter.c
Examining data/ucspi-proxy-0.99/tcp-connect.c
Examining data/ucspi-proxy-0.99/ucspi-proxy.c

FINAL RESULTS:

data/ucspi-proxy-0.99/relay-filter.c:25:5:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execvp(relay_command[0], relay_command);
data/ucspi-proxy-0.99/relay-filter.c:51:15:  [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.
  client_ip = getenv("TCPREMOTEIP");
data/ucspi-proxy-0.99/relay-filter.c:54:16:  [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.
    if ((tmp = getenv("PROXY_RELAY_INTERVAL")) != 0) {
data/ucspi-proxy-0.99/ucspi-proxy-imap.c:13:16:  [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.
  local_name = getenv("TCPLOCALHOST");
data/ucspi-proxy-0.99/ucspi-proxy-pop3.c:13:16:  [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.
  local_name = getenv("TCPLOCALHOST");
data/ucspi-proxy-0.99/ucspi-proxy.c:229:16:  [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, "vl:t:")) != EOF) {
data/ucspi-proxy-0.99/base64.c:12:12:  [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.
  unsigned char bin[3];
data/ucspi-proxy-0.99/http-xlate-filter.c:74: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(newbuf->buf, data, size);
data/ucspi-proxy-0.99/http-xlate-filter.c:119: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(ptr, buf->buf, buf->len);
data/ucspi-proxy-0.99/http-xlate-filter.c:197: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(out->buf+out->len, ptr, diff);
data/ucspi-proxy-0.99/http-xlate-filter.c:199: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(out->buf+out->len, repl->dst, repl->dstlen);
data/ucspi-proxy-0.99/http-xlate-filter.c:206: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(out->buf+out->len, ptr, left);
data/ucspi-proxy-0.99/http-xlate-filter.c:214:10:  [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.
  static char buf[30];
data/ucspi-proxy-0.99/log-filter.c:11:10:  [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.
  static char buf[BUFSIZE+4];
data/ucspi-proxy-0.99/relay-filter.c:70: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(s, name, nlen);
data/ucspi-proxy-0.99/relay-filter.c:72: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(s + nlen, value, len);
data/ucspi-proxy-0.99/ucspi-proxy.c:55:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(newnode->name, "FD#");
data/ucspi-proxy-0.99/ucspi-proxy.c:102:3:  [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[BUFSIZE+1];
data/ucspi-proxy-0.99/ucspi-proxy.c:177:3:  [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[i+1];
data/ucspi-proxy-0.99/ucspi-proxy.c:178: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(buf, data, i);
data/ucspi-proxy-0.99/ucspi-proxy.c:187:3:  [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 line[42+FMT_ULONG_LEN*4];
data/ucspi-proxy-0.99/ucspi-proxy.c:189: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(line, "bytes: client->server ", 22); i = 22;
data/ucspi-proxy-0.99/ucspi-proxy.c:193: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(line+i, " server->client ", 16); i += 16;
data/ucspi-proxy-0.99/base64.c:43:35:  [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).
    int r = base64decode(argv[i], strlen(argv[i]), &d);
data/ucspi-proxy-0.99/http-xlate-filter.c:56:19:  [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).
    ptr->srclen = strlen(ptr->src);
data/ucspi-proxy-0.99/http-xlate-filter.c:57:19:  [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).
    ptr->dstlen = strlen(ptr->dst);
data/ucspi-proxy-0.99/http-xlate-filter.c:59:18:  [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).
  min_src_repl = strlen(repls->src);
data/ucspi-proxy-0.99/http-xlate-filter.c:60:18:  [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).
  max_dst_repl = strlen(repls->dst);
data/ucspi-proxy-0.99/relay-filter.c:67:17:  [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 nlen = strlen(name);
data/ucspi-proxy-0.99/relay-filter.c:83: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).
    setenvb("USER", username, strlen(username));
data/ucspi-proxy-0.99/relay-filter.c:89:27:  [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).
    setenvb("DOMAIN", at, strlen(at));
data/ucspi-proxy-0.99/ucspi-proxy.c:103:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t rd = read(filter->fd, buf, BUFSIZE);

ANALYSIS SUMMARY:

Hits = 32
Lines analyzed = 1345 in approximately 0.06 seconds (23926 lines/second)
Physical Source Lines of Code (SLOC) = 1179
Hits@level = [0]   1 [1]   9 [2]  17 [3]   5 [4]   1 [5]   0
Hits@level+ = [0+]  33 [1+]  32 [2+]  23 [3+]   6 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 27.9898 [1+] 27.1416 [2+] 19.5081 [3+] 5.08906 [4+] 0.848176 [5+]   0
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.