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-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl.c
Examining data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c
Examining data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.h
Examining data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sspi_windows.c
Examining data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sspi_windows.h

FINAL RESULTS:

data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl.c:54:2:  [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((char *)secret->data, password);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sspi_windows.c:17:21:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
	sspi_secur32_dll = LoadLibrary("secur32.dll");
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:66:2:  [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_buffer, out_bufs[0].pvBuffer, *out_buffer_length);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:87:2:  [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(&msg[sizes.cbSecurityTrailer + 4], user_plus_realm, user_plus_realm_length);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:116:2:  [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(*buffer, wrapBufs[0].pvBuffer, wrapBufs[0].cbBuffer);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:117:2:  [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(*buffer + wrapBufs[0].cbBuffer, wrapBufs[1].pvBuffer, wrapBufs[1].cbBuffer);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:118:2:  [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(*buffer + wrapBufs[0].cbBuffer + wrapBufs[1].cbBuffer, wrapBufs[2].pvBuffer, wrapBufs[2].cbBuffer);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl.c:27: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).
		*len = *result ? strlen(*result) : 0;
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl.c:48:15:  [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 len = strlen(password);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:12:29:  [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).
	auth_identity.UserLength = strlen(username);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:17:34:  [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).
		auth_identity.PasswordLength = strlen(password);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:20: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).
	auth_identity.DomainLength = strlen(domain);
data/golang-gopkg-mgo.v2-2016.08.01/internal/sasl/sasl_windows.c:80:34:  [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 user_plus_realm_length = strlen(user_plus_realm);

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 372 in approximately 0.08 seconds (4791 lines/second)
Physical Source Lines of Code (SLOC) = 300
Hits@level = [0]   0 [1]   6 [2]   5 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]  13 [1+]  13 [2+]   7 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 43.3333 [1+] 43.3333 [2+] 23.3333 [3+] 6.66667 [4+] 3.33333 [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.