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/mod-gnutls-0.9.0/test/cert_helper.h
Examining data/mod-gnutls-0.9.0/test/pgpcrc.c
Examining data/mod-gnutls-0.9.0/test/gen_ocsp_index.c
Examining data/mod-gnutls-0.9.0/test/cert_helper.c
Examining data/mod-gnutls-0.9.0/src/gnutls_sni.c
Examining data/mod-gnutls-0.9.0/src/gnutls_cache.c
Examining data/mod-gnutls-0.9.0/src/gnutls_watchdog.h
Examining data/mod-gnutls-0.9.0/src/gnutls_watchdog.c
Examining data/mod-gnutls-0.9.0/src/gnutls_util.h
Examining data/mod-gnutls-0.9.0/src/gnutls_cache.h
Examining data/mod-gnutls-0.9.0/src/gnutls_ocsp.h
Examining data/mod-gnutls-0.9.0/src/gnutls_hooks.c
Examining data/mod-gnutls-0.9.0/src/gnutls_proxy.h
Examining data/mod-gnutls-0.9.0/src/gnutls_config.c
Examining data/mod-gnutls-0.9.0/src/gnutls_proxy.c
Examining data/mod-gnutls-0.9.0/src/gnutls_util.c
Examining data/mod-gnutls-0.9.0/src/gnutls_io.c
Examining data/mod-gnutls-0.9.0/src/gnutls_ocsp.c
Examining data/mod-gnutls-0.9.0/src/gnutls_sni.h
Examining data/mod-gnutls-0.9.0/src/gnutls_config.h
Examining data/mod-gnutls-0.9.0/src/mod_gnutls.c

FINAL RESULTS:

data/mod-gnutls-0.9.0/src/gnutls_cache.c:74: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 sz[GNUTLS_SESSION_ID_STRING_LEN];
data/mod-gnutls-0.9.0/src/gnutls_hooks.c:1338: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.
    unsigned char sbuf[GNUTLS_MAX_SESSION_ID];
data/mod-gnutls-0.9.0/src/gnutls_hooks.c:1498: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.
    unsigned char sbuf[64]; /* buffer to hold serials */
data/mod-gnutls-0.9.0/src/gnutls_hooks.c:1499: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 buf[AP_IOBUFSIZE];
data/mod-gnutls-0.9.0/src/gnutls_hooks.c:1708:13:  [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 cert_pem_buf[10 * 1024];
data/mod-gnutls-0.9.0/src/gnutls_io.c:169:13:  [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(c, str, consume);
data/mod-gnutls-0.9.0/src/gnutls_ocsp.c:363: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 date_str[APR_RFC822_DATE_LEN];
data/mod-gnutls-0.9.0/src/gnutls_ocsp.c:577: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 buf[OCSP_RESP_SIZE_MAX];
data/mod-gnutls-0.9.0/src/gnutls_ocsp.c:716: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 date_str[APR_RFC822_DATE_LEN];
data/mod-gnutls-0.9.0/src/gnutls_sni.c:41: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(&u, data, sizeof(uint16_t));
data/mod-gnutls-0.9.0/test/cert_helper.c:53:20:  [2] (misc) open:
  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).
        certfile = open(filename, O_RDONLY);
data/mod-gnutls-0.9.0/test/gen_ocsp_index.c:50: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 expires[14];
data/mod-gnutls-0.9.0/test/gen_ocsp_index.c:59: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 dn[512];
data/mod-gnutls-0.9.0/test/pgpcrc.c:32: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.
    unsigned char indata[100000];
data/mod-gnutls-0.9.0/src/gnutls_cache.c:82:20:  [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).
    dbmkey->size = strlen(newkey);
data/mod-gnutls-0.9.0/src/gnutls_hooks.c:208:9:  [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).
        strlen((char*) alpn_protos[pupgrades->nelts].data);
data/mod-gnutls-0.9.0/src/gnutls_ocsp.c:522:38:  [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).
    rv = sock_send_buf(sock, header, strlen(header));
data/mod-gnutls-0.9.0/src/gnutls_proxy.c:310:57:  [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).
                                         peer_hostname, strlen(peer_hostname));
data/mod-gnutls-0.9.0/src/gnutls_proxy.c:345:41:  [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).
                  __func__, proxy_alpn, strlen(proxy_alpn));
data/mod-gnutls-0.9.0/src/gnutls_util.c:196:24:  [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).
        dest[i].size = strlen(APR_ARRAY_IDX(src, i, char *));
data/mod-gnutls-0.9.0/test/cert_helper.c:81:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(certfile, (cert->data + readbytes),
data/mod-gnutls-0.9.0/test/pgpcrc.c:33:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t rr = read(0, indata, sizeof(indata));

ANALYSIS SUMMARY:

Hits = 22
Lines analyzed = 8114 in approximately 0.28 seconds (28972 lines/second)
Physical Source Lines of Code (SLOC) = 5300
Hits@level = [0]   7 [1]   8 [2]  14 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  29 [1+]  22 [2+]  14 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.4717 [1+] 4.15094 [2+] 2.64151 [3+]   0 [4+]   0 [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.