The following issues were found

Doc/includes/sqlite3/ctx_manager.py
1 issues
Missing module docstring
Error

Line: 1 Column: 1

              import sqlite3

con = sqlite3.connect(":memory:")
con.execute("create table lang (id integer primary key, name varchar unique)")

# Successful, con.commit() is called automatically afterwards
with con:
    con.execute("insert into lang(name) values (?)", ("Python",))


            

Reported by Pylint.

Doc/includes/sqlite3/execute_1.py
1 issues
Missing module docstring
Error

Line: 1 Column: 1

              import sqlite3

con = sqlite3.connect(":memory:")
cur = con.cursor()
cur.execute("create table lang (name, first_appeared)")

# This is the qmark style:
cur.execute("insert into lang values (?, ?)", ("C", 1972))


            

Reported by Pylint.

Include/pymath.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 178 Column: 39 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                      #pragma float_control (pop)
        #define Py_NAN __icc_nan()
    #else /* ICC_NAN_RELAXED as default for Intel Compiler */
        static const union { unsigned char buf[8]; double __icc_nan; } __nan_store = {0,0,0,0,0,0,0xf8,0x7f};
        #define Py_NAN (__nan_store.__icc_nan)
    #endif /* ICC_NAN_STRICT */
#endif /* __INTEL_COMPILER */
#endif


            

Reported by FlawFinder.

Tools/scripts/google.py
1 issues
Missing function or method docstring
Error

Line: 14 Column: 1

              import webbrowser


def main(args):
    def quote(arg):
        if ' ' in arg:
            arg = '"%s"' % arg
        return urllib.parse.quote_plus(arg)


            

Reported by Pylint.

Tools/scripts/import_diagnostics.py
1 issues
Missing function or method docstring
Error

Line: 31 Column: 1

                      add_args(cmd)
    return parser

def main(args):
    parser = _make_parser()
    args = parser.parse_args(args)
    return args.command(args)

if __name__ == "__main__":

            

Reported by Pylint.

Lib/test/test_warnings/data/import_warning.py
1 issues
Missing module docstring
Error

Line: 1 Column: 1

              import warnings

warnings.warn('module-level warning', DeprecationWarning, stacklevel=2)

            

Reported by Pylint.

Lib/test/test_warnings/__main__.py
1 issues
Missing module docstring
Error

Line: 1 Column: 1

              import unittest

unittest.main('test.test_warnings')

            

Reported by Pylint.

Python/clinic/bltinmodule.c.h
1 issues
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: 206 Column: 9 CWE codes: 126

                  if (mode == NULL) {
        goto exit;
    }
    if (strlen(mode) != (size_t)mode_length) {
        PyErr_SetString(PyExc_ValueError, "embedded null character");
        goto exit;
    }
    if (!noptargs) {
        goto skip_optional_pos;

            

Reported by FlawFinder.

Modules/_multiprocessing/clinic/multiprocessing.c.h
1 issues
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: 130 Column: 9 CWE codes: 126

                  if (name == NULL) {
        goto exit;
    }
    if (strlen(name) != (size_t)name_length) {
        PyErr_SetString(PyExc_ValueError, "embedded null character");
        goto exit;
    }
    return_value = _multiprocessing_sem_unlink_impl(module, name);


            

Reported by FlawFinder.

Python/bltinmodule.c
1 issues
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: 2196 Column: 15 CWE codes: 126

                          goto _readline_errors;
        }

        len = strlen(s);
        if (len == 0) {
            PyErr_SetNone(PyExc_EOFError);
            result = NULL;
        }
        else {

            

Reported by FlawFinder.