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/golang-github-mendersoftware-openssl-1.0.10/hostname.c
Examining data/golang-github-mendersoftware-openssl-1.0.10/shim.c
Examining data/golang-github-mendersoftware-openssl-1.0.10/shim.h
Examining data/golang-github-mendersoftware-openssl-1.0.10/sni.c

FINAL RESULTS:

data/golang-github-mendersoftware-openssl-1.0.10/shim.c:351:2:  [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 pem_type_str[80];
data/golang-github-mendersoftware-openssl-1.0.10/shim.c:579:36:  [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.
        int (*cb)(SSL *s, unsigned char key_name[16],
data/golang-github-mendersoftware-openssl-1.0.10/shim.c:580:28:  [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 iv[EVP_MAX_IV_LENGTH],
data/golang-github-mendersoftware-openssl-1.0.10/shim.c:585:46:  [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.
int X_SSL_CTX_ticket_key_cb(SSL *s, unsigned char key_name[16],
data/golang-github-mendersoftware-openssl-1.0.10/shim.c:586: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 iv[EVP_MAX_IV_LENGTH],
data/golang-github-mendersoftware-openssl-1.0.10/shim.h:88:36:  [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.
        int (*cb)(SSL *s, unsigned char key_name[16],
data/golang-github-mendersoftware-openssl-1.0.10/shim.h:89:28:  [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 iv[EVP_MAX_IV_LENGTH],
data/golang-github-mendersoftware-openssl-1.0.10/shim.h:91:53:  [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 int X_SSL_CTX_ticket_key_cb(SSL *s, unsigned char key_name[16],
data/golang-github-mendersoftware-openssl-1.0.10/shim.h:92:18:  [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 iv[EVP_MAX_IV_LENGTH],
data/golang-github-mendersoftware-openssl-1.0.10/hostname.c:245:67:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
data/golang-github-mendersoftware-openssl-1.0.10/hostname.c:282:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	equal_fn equal;
data/golang-github-mendersoftware-openssl-1.0.10/hostname.c:306:12:  [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).
		chklen = strlen((const char *)chk);
data/golang-github-mendersoftware-openssl-1.0.10/hostname.c:325:40:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (do_check_string(cstr, alt_type, equal, chk, chklen))
data/golang-github-mendersoftware-openssl-1.0.10/hostname.c:345:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (do_check_string(str, -1, equal, chk, chklen))
data/golang-github-mendersoftware-openssl-1.0.10/shim.c:38:48:  [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).
	return go_write_bio_write(b, (char*)str, (int)strlen(str));

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1370 in approximately 0.11 seconds (11949 lines/second)
Physical Source Lines of Code (SLOC) = 982
Hits@level = [0]   0 [1]   6 [2]   9 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]  15 [2+]   9 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 15.2749 [1+] 15.2749 [2+] 9.16497 [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.