The following issues were found

Modules/_ctypes/libffi_osx/include/ffi_common.h
2 issues
bcopy - Does not check for buffer overflows when copying to destination
Security

Line: 40 Column: 27 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              #	include <string.h>
#else
#	ifndef HAVE_MEMCPY
#		define memcpy(d, s, n) bcopy((s), (d), (n))
#	endif
#endif

/*#if defined(FFI_DEBUG) 
#include <stdio.h>

            

Reported by FlawFinder.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 40 Column: 11 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              #	include <string.h>
#else
#	ifndef HAVE_MEMCPY
#		define memcpy(d, s, n) bcopy((s), (d), (n))
#	endif
#endif

/*#if defined(FFI_DEBUG) 
#include <stdio.h>

            

Reported by FlawFinder.

Objects/capsule.c
2 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 207 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      return PyErr_NoMemory();
    }

    memcpy(name_dup, name, name_length);

    trace = name_dup;
    while (trace) {
        char *dot = strchr(trace, '.');
        if (dot) {

            

Reported by FlawFinder.

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)
Security

Line: 200 Column: 27 CWE codes: 126

                  PyObject *object = NULL;
    void *return_value = NULL;
    char *trace;
    size_t name_length = (strlen(name) + 1) * sizeof(char);
    char *name_dup = (char *)PyMem_Malloc(name_length);

    if (!name_dup) {
        return PyErr_NoMemory();
    }

            

Reported by FlawFinder.

Objects/dictobject.c
2 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 682 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      return NULL;
    }

    memcpy(keys, orig->ma_keys, keys_size);

    /* After copying key/value pairs, we need to incref all
       keys and values and they are about to be co-owned by a
       new dict object. */
    PyDictKeyEntry *ep0 = DK_ENTRIES(keys);

            

Reported by FlawFinder.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 1151 Column: 13 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  }
    else {  // combined table.
        if (oldkeys->dk_nentries == numentries) {
            memcpy(newentries, oldentries, numentries * sizeof(PyDictKeyEntry));
        }
        else {
            PyDictKeyEntry *ep = oldentries;
            for (Py_ssize_t i = 0; i < numentries; i++) {
                while (ep->me_value == NULL)

            

Reported by FlawFinder.

Tools/scripts/copytime.py
2 issues
Missing module docstring
Error

Line: 1 Column: 1

              #! /usr/bin/env python3

# Copy one file's atime and mtime to another

import sys
import os
from stat import ST_ATIME, ST_MTIME # Really constants 7 and 8

def main():

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 9 Column: 1

              import os
from stat import ST_ATIME, ST_MTIME # Really constants 7 and 8

def main():
    if len(sys.argv) != 3:
        sys.stderr.write('usage: copytime source destination\n')
        sys.exit(2)
    file1, file2 = sys.argv[1], sys.argv[2]
    try:

            

Reported by Pylint.

Tools/ssl/make_ssl_data.py
2 issues
Variable name "f" doesn't conform to snake_case naming style
Error

Line: 31 Column: 43

              

def _file_search(fname, pat):
    with open(fname, encoding="utf-8") as f:
        for line in f:
            match = pat.search(line)
            if match is not None:
                yield match


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 98 Column: 1

                  yield ""


def main():
    args = parser.parse_args()

    args.err_h = os.path.join(args.srcdir, "include", "openssl", "err.h")
    if not os.path.isfile(args.err_h):
        # Fall back to infile for OpenSSL 3.0.0

            

Reported by Pylint.

Lib/test/test_importlib/frozen/__init__.py
2 issues
Missing module docstring
Error

Line: 1 Column: 1

              import os
from test.support import load_package_tests

def load_tests(*args):
    return load_package_tests(os.path.dirname(__file__), *args)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 4 Column: 1

              import os
from test.support import load_package_tests

def load_tests(*args):
    return load_package_tests(os.path.dirname(__file__), *args)

            

Reported by Pylint.

Lib/lib2to3/tests/__init__.py
2 issues
Missing module docstring
Error

Line: 1 Column: 1

              # Author: Collin Winter

import os

from test.support import load_package_tests

def load_tests(*args):
    return load_package_tests(os.path.dirname(__file__), *args)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              
from test.support import load_package_tests

def load_tests(*args):
    return load_package_tests(os.path.dirname(__file__), *args)

            

Reported by Pylint.

Lib/test/test_import/data/circular_imports/basic.py
2 issues
Attempted relative import beyond top-level package
Error

Line: 2 Column: 1

              """Circular imports through direct, relative imports."""
from . import basic2

            

Reported by Pylint.

Unused import basic2
Error

Line: 2 Column: 1

              """Circular imports through direct, relative imports."""
from . import basic2

            

Reported by Pylint.

Lib/test/test_email/__main__.py
2 issues
Unused load_tests imported from test.test_email
Error

Line: 1 Column: 1

              from test.test_email import load_tests
import unittest

unittest.main()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from test.test_email import load_tests
import unittest

unittest.main()

            

Reported by Pylint.

Lib/test/encoded_modules/module_koi8_r.py
2 issues
Missing module docstring
Error

Line: 1 Column: 1

Error reading the source code

Reported by Pylint.

Constant name "test" doesn't conform to UPPER_CASE naming style
Error

Line: 3 Column: 1

              
            

Reported by Pylint.