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/python-ldap-3.2.0/Modules/ldapcontrol.h
Examining data/python-ldap-3.2.0/Modules/message.h
Examining data/python-ldap-3.2.0/Modules/options.c
Examining data/python-ldap-3.2.0/Modules/LDAPObject.h
Examining data/python-ldap-3.2.0/Modules/berval.h
Examining data/python-ldap-3.2.0/Modules/common.c
Examining data/python-ldap-3.2.0/Modules/options.h
Examining data/python-ldap-3.2.0/Modules/LDAPObject.c
Examining data/python-ldap-3.2.0/Modules/functions.h
Examining data/python-ldap-3.2.0/Modules/ldapcontrol.c
Examining data/python-ldap-3.2.0/Modules/berval.c
Examining data/python-ldap-3.2.0/Modules/message.c
Examining data/python-ldap-3.2.0/Modules/ldapmodule.c
Examining data/python-ldap-3.2.0/Modules/common.h
Examining data/python-ldap-3.2.0/Modules/functions.c
Examining data/python-ldap-3.2.0/Modules/constants_generated.h
Examining data/python-ldap-3.2.0/Modules/constants.c
Examining data/python-ldap-3.2.0/Modules/constants.h

FINAL RESULTS:

data/python-ldap-3.2.0/Modules/LDAPObject.c:140: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(lm->mod_type, type, len + 1);
data/python-ldap-3.2.0/Modules/LDAPObject.c:342: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(attrs[i], str, strlen + 1);
data/python-ldap-3.2.0/Modules/LDAPObject.c:1166: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 *e, err[1024];
data/python-ldap-3.2.0/Modules/ldapcontrol.c:99: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(lc->ldctl_oid, oid, len + 1);
data/python-ldap-3.2.0/Modules/LDAPObject.c:135:11:  [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 = strlen(type);
data/python-ldap-3.2.0/Modules/LDAPObject.c:292:28:  [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).
        Py_ssize_t i, len, strlen;
data/python-ldap-3.2.0/Modules/LDAPObject.c:323:54:  [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).
            if (PyBytes_AsStringAndSize(item, &str, &strlen) == -1) {
data/python-ldap-3.2.0/Modules/LDAPObject.c:332:50:  [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).
            str = PyUnicode_AsUTF8AndSize(item, &strlen);
data/python-ldap-3.2.0/Modules/LDAPObject.c:637:21:  [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).
    interact->len = strlen(c_result);
data/python-ldap-3.2.0/Modules/ldapcontrol.c:92:11:  [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 = strlen(oid);

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 3704 in approximately 0.11 seconds (34696 lines/second)
Physical Source Lines of Code (SLOC) = 2828
Hits@level = [0]   1 [1]   6 [2]   4 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  11 [1+]  10 [2+]   4 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 3.88967 [1+] 3.53607 [2+] 1.41443 [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.