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/petsc4py-3.14.0/demo/perftest/driver.c
Examining data/petsc4py-3.14.0/demo/poisson3d/del2mat.h
Examining data/petsc4py-3.14.0/demo/poisson3d/poisson3d.c
Examining data/petsc4py-3.14.0/demo/wrap-cython/Bratu3Dimpl.c
Examining data/petsc4py-3.14.0/demo/wrap-cython/Bratu3Dimpl.h
Examining data/petsc4py-3.14.0/demo/wrap-f2py/Bratu2Dmodule.h
Examining data/petsc4py-3.14.0/demo/wrap-swig/Bratu3D.c
Examining data/petsc4py-3.14.0/demo/wrap-swig/Bratu3D.h
Examining data/petsc4py-3.14.0/src/PETSc.c
Examining data/petsc4py-3.14.0/src/include/compat/hdf5.h
Examining data/petsc4py-3.14.0/src/include/compat/hypre.h
Examining data/petsc4py-3.14.0/src/include/compat/mpi.h
Examining data/petsc4py-3.14.0/src/include/compat/mumps.h
Examining data/petsc4py-3.14.0/src/include/compat/tao.h
Examining data/petsc4py-3.14.0/src/include/compat.h
Examining data/petsc4py-3.14.0/src/include/custom.h
Examining data/petsc4py-3.14.0/src/include/cython.h
Examining data/petsc4py-3.14.0/src/include/initpkg.h
Examining data/petsc4py-3.14.0/src/include/pep3118.h
Examining data/petsc4py-3.14.0/src/include/petsc4py/numpy.h
Examining data/petsc4py-3.14.0/src/include/petsc4py/petsc4py.PETSc.h
Examining data/petsc4py-3.14.0/src/include/petsc4py/petsc4py.PETSc_api.h
Examining data/petsc4py-3.14.0/src/include/petsc4py/petsc4py.h
Examining data/petsc4py-3.14.0/src/include/scalar.h
Examining data/petsc4py-3.14.0/src/libpetsc4py/custom.h
Examining data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c
Examining data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.h
Examining data/petsc4py-3.14.0/src/libpetsc4py.c
Examining data/petsc4py-3.14.0/src/libpetsc4py.h
Examining data/petsc4py-3.14.0/src/petsc4py.PETSc.c

FINAL RESULTS:

data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:786:5:  [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:798:5:  [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:1602:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  PyObject *access;
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54707:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_GOTREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54708:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_DECREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54870:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_GOTREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54871:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_DECREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54883:52:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_self->access); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 47, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54969:48:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->access, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 51, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54990:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_GOTREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:54991:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  __Pyx_DECREF(__pyx_v_self->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:299289:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    (void)(fprintf(stderr, ((char *)"PetscPopErrorHandler() failed [error code: %d]\n"), __pyx_v_ierr));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:299326:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    (void)(fprintf(stderr, ((char *)"PetscFinalize() failed [error code: %d]\n"), __pyx_v_ierr));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:319319:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  Py_CLEAR(p->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:319332:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (p->access) {
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:319333:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    e = (*v)(p->access, a); if (e) return e;
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:319347:24:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  tmp = ((PyObject*)p->access);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:342525:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(msg, 200, fmt, vargs);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343583:18:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (!setstate) PyErr_Clear();
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343584:18:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343584:58:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343589:29:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                } else if (!setstate || PyErr_Occurred()) {
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343609:16:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    Py_XDECREF(setstate);
data/petsc4py-3.14.0/src/include/petsc4py/petsc4py.PETSc_api.h:235:5:  [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 warning[200];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:739: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 ascii_chars[128];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:2246:8:  [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.
static char *__pyx_v_11libpetsc4py_fstack[0x400];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:3244:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscInt)))));
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:3345:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscReal)))));
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:3446:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscScalar)))));
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:9347:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:10889:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:17523:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:18038:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:20262:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:20674:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:23443:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:23836:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:26275:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:26759:3:  [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 __pyx_v_name[0x800];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:32212:5:  [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 warning[200];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:33798:5:  [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 ctversion[4], rtversion[4];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:33802: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 message[200];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:751: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 ascii_chars[128];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:3475:5:  [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 string[3];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:11256:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscInt)))));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:11357:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscReal)))));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:11458:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(PyArray_DATA(__pyx_v_ary), __pyx_v_data, (((size_t)__pyx_v_size) * (sizeof(PetscScalar)))));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:13650:3:  [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 __pyx_v_value[(0x400 + 1)];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:65432:3:  [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 __pyx_v_cversion[0x100];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:309033:27:  [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.
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:310801:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:310833:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:311341:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:312101:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:312706:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:340411:3:  [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(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:342519:5:  [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 msg[200];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343454:5:  [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 warning[200];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:356055:5:  [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 ctversion[4], rtversion[4];
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:356059: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 message[200];
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:663:87:  [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).
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:784:52:  [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).
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
data/petsc4py-3.14.0/src/libpetsc4py/libpetsc4py.c:33900:65:  [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:675:87:  [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).
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:796:52:  [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).
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:301888:56:  [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).
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(56, 249, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:301932:56:  [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).
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(56, 251, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:304506: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).
      __pyx_t_10 = strlen(__pyx_v_self->view.format); 
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:311518:53:  [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).
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(56, 1258, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:311613:55:  [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).
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(56, 1263, __pyx_L1_error)
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:343210:23:  [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 slen = strlen(cstring);
data/petsc4py-3.14.0/src/petsc4py.PETSc.c:356140:65:  [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));

ANALYSIS SUMMARY:

Hits = 72
Lines analyzed = 393384 in approximately 10.08 seconds (39008 lines/second)
Physical Source Lines of Code (SLOC) = 231889
Hits@level = [0]   0 [1]  12 [2]  37 [3]   5 [4]  18 [5]   0
Hits@level+ = [0+]  72 [1+]  72 [2+]  60 [3+]  23 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 0.310493 [1+] 0.310493 [2+] 0.258744 [3+] 0.0991854 [4+] 0.0776233 [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.