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/numpy-1.19.4/tools/swig/test/Array1.h Examining data/numpy-1.19.4/tools/swig/test/Flat.cxx Examining data/numpy-1.19.4/tools/swig/test/Array1.cxx Examining data/numpy-1.19.4/tools/swig/test/Fortran.h Examining data/numpy-1.19.4/tools/swig/test/ArrayZ.h Examining data/numpy-1.19.4/tools/swig/test/Fortran.cxx Examining data/numpy-1.19.4/tools/swig/test/Farray.cxx Examining data/numpy-1.19.4/tools/swig/test/Array2.h Examining data/numpy-1.19.4/tools/swig/test/Matrix.h Examining data/numpy-1.19.4/tools/swig/test/Vector.h Examining data/numpy-1.19.4/tools/swig/test/Array2.cxx Examining data/numpy-1.19.4/tools/swig/test/Tensor.h Examining data/numpy-1.19.4/tools/swig/test/ArrayZ.cxx Examining data/numpy-1.19.4/tools/swig/test/Vector.cxx Examining data/numpy-1.19.4/tools/swig/test/Flat.h Examining data/numpy-1.19.4/tools/swig/test/SuperTensor.cxx Examining data/numpy-1.19.4/tools/swig/test/Tensor.cxx Examining data/numpy-1.19.4/tools/swig/test/Farray.h Examining data/numpy-1.19.4/tools/swig/test/Matrix.cxx Examining data/numpy-1.19.4/tools/swig/test/SuperTensor.h Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_lapack.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_config.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/lapack_lite_names.h Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_blas.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/python_xerbla.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c.h Examining data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c Examining data/numpy-1.19.4/numpy/linalg/lapack_litemodule.c Examining data/numpy-1.19.4/numpy/random/include/legacy-distributions.h Examining data/numpy-1.19.4/numpy/random/include/aligned_malloc.h Examining data/numpy-1.19.4/numpy/random/src/splitmix64/splitmix64.orig.c Examining data/numpy-1.19.4/numpy/random/src/splitmix64/splitmix64.h Examining data/numpy-1.19.4/numpy/random/src/splitmix64/splitmix64.c Examining data/numpy-1.19.4/numpy/random/src/sfc64/sfc64.c Examining data/numpy-1.19.4/numpy/random/src/sfc64/sfc64.h Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64.c Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-benchmark.c Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64.h Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64.orig.c Examining data/numpy-1.19.4/numpy/random/src/pcg64/pcg64.orig.h Examining data/numpy-1.19.4/numpy/random/src/legacy/legacy-distributions.c Examining data/numpy-1.19.4/numpy/random/src/philox/philox.c Examining data/numpy-1.19.4/numpy/random/src/philox/philox-test-data-gen.c Examining data/numpy-1.19.4/numpy/random/src/philox/philox.h Examining data/numpy-1.19.4/numpy/random/src/philox/philox-benchmark.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.h Examining data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-test-data-gen.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-jump.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937.h Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-benchmark.c Examining data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-jump.h Examining data/numpy-1.19.4/numpy/random/src/distributions/random_mvhg_count.c Examining data/numpy-1.19.4/numpy/random/src/distributions/logfactorial.c Examining data/numpy-1.19.4/numpy/random/src/distributions/logfactorial.h Examining data/numpy-1.19.4/numpy/random/src/distributions/random_mvhg_marginals.c Examining data/numpy-1.19.4/numpy/random/src/distributions/ziggurat_constants.h Examining data/numpy-1.19.4/numpy/random/src/distributions/random_hypergeometric.c Examining data/numpy-1.19.4/numpy/random/src/distributions/distributions.c Examining data/numpy-1.19.4/numpy/distutils/mingw/gfortran_vs2003_hack.c Examining data/numpy-1.19.4/numpy/fft/_pocketfft.c Examining data/numpy-1.19.4/numpy/_build_utils/src/apple_sgemv_fix.c Examining data/numpy-1.19.4/numpy/core/include/numpy/random/bitgen.h Examining data/numpy-1.19.4/numpy/core/include/numpy/random/distributions.h Examining data/numpy-1.19.4/numpy/core/include/numpy/noprefix.h Examining data/numpy-1.19.4/numpy/core/include/numpy/numpyconfig.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_endian.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_os.h Examining data/numpy-1.19.4/numpy/core/include/numpy/utils.h Examining data/numpy-1.19.4/numpy/core/include/numpy/ufuncobject.h Examining data/numpy-1.19.4/numpy/core/include/numpy/halffloat.h Examining data/numpy-1.19.4/numpy/core/include/numpy/_neighborhood_iterator_imp.h Examining data/numpy-1.19.4/numpy/core/include/numpy/old_defines.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_3kcompat.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_common.h Examining data/numpy-1.19.4/numpy/core/include/numpy/arrayobject.h Examining data/numpy-1.19.4/numpy/core/include/numpy/arrayscalars.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_no_deprecated_api.h Examining data/numpy-1.19.4/numpy/core/include/numpy/oldnumeric.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_cpu.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_interrupt.h Examining data/numpy-1.19.4/numpy/core/include/numpy/ndarraytypes.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_math.h Examining data/numpy-1.19.4/numpy/core/include/numpy/npy_1_7_deprecated_api.h Examining data/numpy-1.19.4/numpy/core/include/numpy/ndarrayobject.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_cpu_features.h Examining data/numpy-1.19.4/numpy/core/src/common/mem_overlap.c Examining data/numpy-1.19.4/numpy/core/src/common/npy_cblas_base.h Examining data/numpy-1.19.4/numpy/core/src/common/ucsnarrow.h Examining data/numpy-1.19.4/numpy/core/src/common/array_assign.c Examining data/numpy-1.19.4/numpy/core/src/common/cblasfuncs.c Examining data/numpy-1.19.4/numpy/core/src/common/ufunc_override.c Examining data/numpy-1.19.4/numpy/core/src/common/npy_cblas.h Examining data/numpy-1.19.4/numpy/core/src/common/binop_override.h Examining data/numpy-1.19.4/numpy/core/src/common/numpyos.h Examining data/numpy-1.19.4/numpy/core/src/common/get_attr_string.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_pycompat.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_ctypes.h Examining data/numpy-1.19.4/numpy/core/src/common/numpyos.c Examining data/numpy-1.19.4/numpy/core/src/common/cblasfuncs.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_extint128.h Examining data/numpy-1.19.4/numpy/core/src/common/python_xerbla.c Examining data/numpy-1.19.4/numpy/core/src/common/npy_longdouble.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_import.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_config.h Examining data/numpy-1.19.4/numpy/core/src/common/ucsnarrow.c Examining data/numpy-1.19.4/numpy/core/src/common/array_assign.h Examining data/numpy-1.19.4/numpy/core/src/common/ufunc_override.h Examining data/numpy-1.19.4/numpy/core/src/common/lowlevel_strided_loops.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_longdouble.c Examining data/numpy-1.19.4/numpy/core/src/common/umathmodule.h Examining data/numpy-1.19.4/numpy/core/src/common/npy_fpmath.h Examining data/numpy-1.19.4/numpy/core/src/common/mem_overlap.h Examining data/numpy-1.19.4/numpy/core/src/npymath/_signbit.c Examining data/numpy-1.19.4/numpy/core/src/npymath/halffloat.c Examining data/numpy-1.19.4/numpy/core/src/npymath/npy_math_private.h Examining data/numpy-1.19.4/numpy/core/src/npymath/npy_math.c Examining data/numpy-1.19.4/numpy/core/src/npymath/npy_math_common.h Examining data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c Examining data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.h Examining data/numpy-1.19.4/numpy/core/src/umath/umathmodule.c Examining data/numpy-1.19.4/numpy/core/src/umath/npy_simd_data.h Examining data/numpy-1.19.4/numpy/core/src/umath/reduction.h Examining data/numpy-1.19.4/numpy/core/src/umath/fast_loop_macros.h Examining data/numpy-1.19.4/numpy/core/src/umath/ufunc_type_resolution.c Examining data/numpy-1.19.4/numpy/core/src/umath/reduction.c Examining data/numpy-1.19.4/numpy/core/src/umath/ufunc_type_resolution.h Examining data/numpy-1.19.4/numpy/core/src/umath/override.h Examining data/numpy-1.19.4/numpy/core/src/umath/override.c Examining data/numpy-1.19.4/numpy/core/src/umath/extobj.c Examining data/numpy-1.19.4/numpy/core/src/umath/extobj.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/hashdescr.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/common.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/common.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/alloc.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/mapping.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busday.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/convert_datatype.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/sequence.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/getset.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/iterators.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/methods.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/arrayfunction_override.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/ctors.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/conversion_utils.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/shape.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/refcount.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/conversion_utils.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busdaycal.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/number.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/convert.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/calculation.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/iterators.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/temp_elide.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/strfuncs.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/npy_buffer.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/nditer_constr.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/methods.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/convert.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/nditer_api.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/temp_elide.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/refcount.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/shape.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/strfuncs.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/usertypes.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/hashdescr.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/alloc.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/typeinfo.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/array_assign_array.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/vdot.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/convert_datatype.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/array_assign_scalar.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/nditer_pywrap.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/arraytypes.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/nditer_pywrap.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/arrayfunction_override.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/_datetime.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/flagsobject.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/typeinfo.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/usertypes.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/getset.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busdaycal.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/vdot.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/calculation.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/nditer_impl.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/sequence.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/number.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busday.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/mapping.c Examining data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h Examining data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.h Examining data/numpy-1.19.4/numpy/core/src/npysort/npysort_common.h Examining data/numpy-1.19.4/numpy/core/src/dummymodule.c Examining data/numpy-1.19.4/numpy/f2py/src/test/foomodule.c Examining data/numpy-1.19.4/numpy/f2py/src/fortranobject.h Examining data/numpy-1.19.4/numpy/f2py/src/fortranobject.c Examining data/numpy-1.19.4/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c FINAL RESULTS: data/numpy-1.19.4/numpy/core/include/numpy/ndarraytypes.h:341:22: [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. #define NPY_ERR(str) fprintf(stderr, #str); fflush(stderr); data/numpy-1.19.4/numpy/core/include/numpy/ndarraytypes.h:342:23: [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. #define NPY_ERR2(str) fprintf(stderr, str); fflush(stderr); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:561:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(" %" NPY_INTP_FMT, fobj->dimensions[i]); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:571:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(" %" NPY_INTP_FMT, fobj->strides[i]); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.c:1012:14: [4] (format) _snprintf: 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. tmplen = _snprintf(substr, sublen, "%04" NPY_INT64_FMT, dts->year); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.c:1014:14: [4] (format) snprintf: 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. tmplen = snprintf(substr, sublen, "%04" NPY_INT64_FMT, dts->year); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_impl.h:56:34: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_IT_DBG_PRINT1(s, p1) printf(s, p1) data/numpy-1.19.4/numpy/core/src/multiarray/nditer_impl.h:57:38: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_IT_DBG_PRINT2(s, p1, p2) printf(s, p1, p2) data/numpy-1.19.4/numpy/core/src/multiarray/nditer_impl.h:58:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_IT_DBG_PRINT3(s, p1, p2, p3) printf(s, p1, p2, p3) data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:56:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_UF_DBG_PRINT1(s, p1) {printf((s), (p1));fflush(stdout);} data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:57:39: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_UF_DBG_PRINT2(s, p1, p2) {printf(s, p1, p2);fflush(stdout);} data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:58:43: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NPY_UF_DBG_PRINT3(s, p1, p2, p3) {printf(s, p1, p2, p3);fflush(stdout);} data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:635:9: [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(ufunc->core_signature, signature); data/numpy-1.19.4/numpy/core/src/umath/umathmodule.c:203: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(newdocstr, docstr); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:590:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("%3" NPY_INTP_FMT, dims[i]); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:711:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mess+strlen(mess), data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:753:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mess+strlen(mess), data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:975:17: [4] (format) snprintf: 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. snprintf(msg + len, sizeof(msg) - len, data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:982:17: [4] (format) snprintf: 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. snprintf(msg + len, sizeof(msg) - len, data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:26:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("0x%" PRIx64, (uint64_t)(rng.state >> 64)); data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:28:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("0x%" PRIx64, (uint64_t)(rng.inc >> 64)); data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:53:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("0x%" PRIx64, (uint64_t)(rng.state >> 64)); data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:55:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("0x%" PRIx64, (uint64_t)(rng.inc >> 64)); data/numpy-1.19.4/numpy/_build_utils/src/apple_sgemv_fix.c:91: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 str[32] = {0}; data/numpy-1.19.4/numpy/_build_utils/src/apple_sgemv_fix.c:112: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 errormsg[1024]; data/numpy-1.19.4/numpy/core/include/numpy/npy_3kcompat.h:382:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). PyObject *open; data/numpy-1.19.4/numpy/core/include/numpy/npy_3kcompat.h:387:34: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return PyObject_CallFunction(open, "Os", filename, mode); data/numpy-1.19.4/numpy/core/include/numpy/npy_cpu.h:114:41: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define NPY_COPY_PYOBJECT_PTR(dst, src) memcpy(dst, src, sizeof(PyObject *)) data/numpy-1.19.4/numpy/core/src/common/numpyos.c:165: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(p, chars_to_insert, insert_count); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:315:13: [2] (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). Risk is low because the source is a constant string. strcpy(buffer, "nan"); \ data/numpy-1.19.4/numpy/core/src/common/numpyos.c:322:17: [2] (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). Risk is low because the source is a constant string. strcpy(buffer, "-inf"); \ data/numpy-1.19.4/numpy/core/src/common/numpyos.c:328:17: [2] (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). Risk is low because the source is a constant string. strcpy(buffer, "inf"); \ data/numpy-1.19.4/numpy/core/src/common/numpyos.c:744: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 buffer[FLOAT_FORMATBUFLEN + 1]; data/numpy-1.19.4/numpy/core/src/common/numpyos.c:760: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 buffer[FLOAT_FORMATBUFLEN + 1]; data/numpy-1.19.4/numpy/core/src/common/python_xerbla.c:26: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 buf[sizeof(format) + 6 + 4]; /* 6 for name, 4 for param. num. */ data/numpy-1.19.4/numpy/core/src/common/ucsnarrow.c:59:9: [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(buf, src, size); data/numpy-1.19.4/numpy/core/src/multiarray/_datetime.h:4:22: [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. extern NPY_NO_EXPORT char const *_datetime_strings[NPY_DATETIME_NUMUNITS]; data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:269: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(new_string, PyString_AS_STRING(src_object), n_old); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:720:9: [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(s1t, s1, size); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:726:9: [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(s2t, s2, size); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:846: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(temp, original, nc); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:869: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(temp, original, nc*sizeof(npy_ucs4)); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:887: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 atemp[SMALL_STRING], btemp[SMALL_STRING]; \ data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:1165:25: [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(dimensions, PyArray_DIMS((PyArrayObject *)temp), data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:196: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 buf[128]; data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:385:13: [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 buf[128]; data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:392:13: [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 buf[128]; data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:400:13: [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 buf[128]; data/numpy-1.19.4/numpy/core/src/multiarray/common.c:360: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 buf[40]; data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c:1588: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(outptr, &r, 1); data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c:1590: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(outptr, (char*)&r + 1, 1); data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c:1882:21: [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(outptr, &v, 8); data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c:1893:21: [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(outptr, &v, 8); data/numpy-1.19.4/numpy/core/src/multiarray/compiled_base.c:1904:17: [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(outptr, &v, in_tail); data/numpy-1.19.4/numpy/core/src/multiarray/convert.c:350: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(dptr, it->dataptr, elsize); data/numpy-1.19.4/numpy/core/src/multiarray/convert_datatype.c:2078:9: [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(zeroval, &zero_obj, sizeof(PyObject *)); data/numpy-1.19.4/numpy/core/src/multiarray/convert_datatype.c:2124:9: [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(oneval, &one_obj, sizeof(PyObject *)); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:342:9: [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(tout, tin, size); \ data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:439:9: [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(dst, src, itemsize*numitems); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:447: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(d1, s1, itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:927:9: [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(newdims, dims, nd*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:930: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(newstrides, strides, nd*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:1040: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(fa->dimensions, dims, sizeof(npy_intp)*nd); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:1052:17: [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(fa->strides, strides, sizeof(npy_intp)*nd); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:2292: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 buf[40]; data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:2647: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(PyArray_STRIDES(ret), strides, n*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:3941:9: [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(PyArray_DATA(ret), data, size_to_copy); data/numpy-1.19.4/numpy/core/src/multiarray/datetime.c:74:15: [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. NPY_NO_EXPORT char const *_datetime_strings[NPY_DATETIME_NUMUNITS] = { data/numpy-1.19.4/numpy/core/src/multiarray/datetime.c:3504:17: [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(tmp_buffer, data, maxlen); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busday.c:978:9: [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(weekmask, busdaycal->weekmask, 7); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busday.c:1107:9: [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(weekmask, busdaycal->weekmask, 7); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busday.c:1251:9: [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(weekmask, busdaycal->weekmask, 7); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busdaycal.c:451: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(PyArray_DATA(ret), self->weekmask, 7); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_busdaycal.c:477:9: [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(PyArray_DATA(ret), self->holidays.begin, data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.c:96: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(tms, tms_tmp, sizeof(struct tm)); data/numpy-1.19.4/numpy/core/src/multiarray/datetime_strings.c:1560:47: [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. if (make_iso_8601_datetime(&dts, (char *)dataptr[1], strsize, data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.c:1753: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((char *)newdescr + sizeof(PyObject), data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.c:1785:9: [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(newdescr->subarray, base->subarray, sizeof(PyArray_ArrayDescr)); data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.c:2895:9: [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((char *) &((PyArray_DatetimeDTypeMetaData *)self->c_metadata)->meta, data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c:163: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 repr[16384]; data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c:1982: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 exponentBuffer[7]; data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c:2023:9: [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(pCurOut, exponentBuffer, count); data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c:2102:9: [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 + pos, "inf", printLen); data/numpy-1.19.4/numpy/core/src/multiarray/dragon4.c:2109:9: [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 + pos, "nan", printLen); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:182: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(newdata, data, sizeof(_strided_zero_pad_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:202:9: [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(dst, src, src_itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:224:9: [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(dst, src, dst_itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:250:9: [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(dst, src, copy_size); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:347: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(newdata, data, basedatasize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:535: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(newdata, data, sizeof(_wrap_copy_swap_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:626: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(newdata, data, sizeof(_strided_cast_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:770: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(newdata, data, sizeof(_strided_datetime_cast_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:806:9: [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(dst, &dt, sizeof(dt)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:837:9: [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(dst, &dt, sizeof(dt)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:933: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(tmp_buffer, src, src_itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:958:9: [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(dst, &dt, sizeof(dt)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:1637: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(newdata, data, sizeof(_one_to_n_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:1839: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(newdata, data, sizeof(_n_to_n_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:2025: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(newdata, data, structsize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:2484: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(newdata, d, structsize); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:2929: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(newdata, d, sizeof(_masked_wrapper_transfer_data)); data/numpy-1.19.4/numpy/core/src/multiarray/dtype_transfer.c:3101: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(newdata, data, sizeof(_dst_memset_zero_data)); data/numpy-1.19.4/numpy/core/src/multiarray/flagsobject.c:528: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 buf[16]; data/numpy-1.19.4/numpy/core/src/multiarray/flagsobject.c:542:9: [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(buf, key, n); data/numpy-1.19.4/numpy/core/src/multiarray/flagsobject.c:653: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 buf[16]; data/numpy-1.19.4/numpy/core/src/multiarray/flagsobject.c:661:9: [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(buf, key, n); data/numpy-1.19.4/numpy/core/src/multiarray/getset.c:87: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(PyArray_DIMS(self), PyArray_DIMS(ret), nd*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/getset.c:88: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(PyArray_STRIDES(self), PyArray_STRIDES(ret), nd*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/getset.c:171:9: [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(PyArray_STRIDES(self), newstrides.ptr, sizeof(npy_intp)*newstrides.len); data/numpy-1.19.4/numpy/core/src/multiarray/getset.c:660: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(inter->shape, PyArray_DIMS(self), sizeof(npy_intp)*PyArray_NDIM(self)); data/numpy-1.19.4/numpy/core/src/multiarray/getset.c:661: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(inter->strides, PyArray_STRIDES(self), sizeof(npy_intp)*PyArray_NDIM(self)); data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:755:17: [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(new_data, old_data, chunk); data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1892:26: [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. binsearch((const char *)PyArray_DATA(ap1), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1893:26: [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. (const char *)PyArray_DATA(ap2), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1894:20: [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 *)PyArray_DATA(ret), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1904:37: [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. error = argbinsearch((const char *)PyArray_DATA(ap1), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1905:37: [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. (const char *)PyArray_DATA(ap2), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1906:37: [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. (const char *)PyArray_DATA(sorter), data/numpy-1.19.4/numpy/core/src/multiarray/item_selection.c:1907:31: [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 *)PyArray_DATA(ret), data/numpy-1.19.4/numpy/core/src/multiarray/iterators.c:1547:9: [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(ret, PyArray_DATA(fill), sizeof(PyObject*)); data/numpy-1.19.4/numpy/core/src/multiarray/mapping.c:789:21: [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 err_msg[174]; data/numpy-1.19.4/numpy/core/src/multiarray/mapping.c:2188: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 *baseptrs[2]; data/numpy-1.19.4/numpy/core/src/multiarray/methods.c:2007: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(PyArray_DIMS(self), dimensions, sizeof(npy_intp)*nd); data/numpy-1.19.4/numpy/core/src/multiarray/methods.c:2057:17: [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(PyArray_DATA(self), datastr, num); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:281:9: [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(dims, PyArray_DIMS(ap), nd*sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:394: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(shape, PyArray_SHAPE(arrays[0]), ndim * sizeof(shape[0])); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:1257: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(tmp, sw1, os); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:1258: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(sw1, sw2, os); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:1259: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(sw2, tmp, os); data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:2815: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 c[4]; data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:2934:17: [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(dst, xsrc, size); \ data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:2937:17: [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(dst, ysrc, size); \ data/numpy-1.19.4/numpy/core/src/multiarray/nditer_api.c:1357:9: [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_strides, NAD_STRIDES(axisdata0), nop*NPY_SIZEOF_INTP); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_api.c:1669:17: [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(ad_compress, axisdata, sizeof_axisdata); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_api.c:2593: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 stride0op[NPY_MAXARGS]; data/numpy-1.19.4/numpy/core/src/multiarray/nditer_constr.c:560: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(newiter, iter, size); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_constr.c:792: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 axes_dupcheck[NPY_MAXDIMS]; data/numpy-1.19.4/numpy/core/src/multiarray/nditer_constr.c:1511:9: [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(NAD_PTRS(axisdata), op_dataptr, NPY_SIZEOF_INTP*nop); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_constr.c:1522:9: [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(NAD_PTRS(axisdata), op_dataptr, NPY_SIZEOF_INTP*nop); data/numpy-1.19.4/numpy/core/src/multiarray/nditer_pywrap.c:44: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 readflags[NPY_MAXARGS]; data/numpy-1.19.4/numpy/core/src/multiarray/nditer_pywrap.c:45: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 writeflags[NPY_MAXARGS]; data/numpy-1.19.4/numpy/core/src/multiarray/nditer_pywrap.c:840: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 used_axes[NPY_MAXDIMS]; data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:212:9: [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(ctypeptr, newptr, typecode->elsize); data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:342: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(PyArray_DATA(r), memptr, PyArray_ITEMSIZE(r)); data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:602:9: [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(dt_data, &((PyDatetimeScalarObject *)sc)->obmeta, data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:753:9: [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(&(((PyDatetimeScalarObject *)obj)->obmeta), dt_data, data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:760: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(destptr, data, itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/scalarapi.c:797:17: [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(destptr, data, itemsize); data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h:5:31: [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. extern NPY_NO_EXPORT unsigned char data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h:7:29: [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. extern NPY_NO_EXPORT signed char data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h:9:29: [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. extern NPY_NO_EXPORT signed char data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h:11:29: [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. extern NPY_NO_EXPORT signed char data/numpy-1.19.4/numpy/core/src/multiarray/scalartypes.h:13:29: [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. extern NPY_NO_EXPORT signed char data/numpy-1.19.4/numpy/core/src/npysort/npysort_common.h:260: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(s1, s2, len); data/numpy-1.19.4/numpy/core/src/npysort/npysort_common.h:362: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(a, b, len); data/numpy-1.19.4/numpy/core/src/umath/extobj.c:73: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[100]; data/numpy-1.19.4/numpy/core/src/umath/reduction.c:59:9: [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(shape, arr_shape, ndim * sizeof(shape[0])); data/numpy-1.19.4/numpy/core/src/umath/reduction.c:339:9: [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(shape_orig, shape, ndim * sizeof(npy_intp)); data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:1286: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 *data[2]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:1315: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 *data[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:1428: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 *baseptrs[NPY_MAXARGS]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:2931: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(inner_strides, NpyIter_GetInnerStrideArray(iter), data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:3452: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 *dataptrs_copy[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:3850: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 *dataptr_copy[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:3920: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 *dataptr_copy[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:4227: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 *dataptr_copy[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:4306: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 *dataptr_copy[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:5792: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 *dataptr[3]; data/numpy-1.19.4/numpy/core/src/umath/ufunc_type_resolution.c:1462: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(n, data, sizeof(_ufunc_masker_data)); data/numpy-1.19.4/numpy/core/src/umath/umathmodule.c:144: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(str, fname, fname_len); data/numpy-1.19.4/numpy/core/src/umath/umathmodule.c:145: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(str+fname_len, " (vectorized)", 14); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:153:9: [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(p, notalloc, sizeof(notalloc)); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:181: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(p, def.doc, n); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:225: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(p, "scalar", n); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:351: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(fp->defs[i].dims.d,dims,fp->defs[i].rank*sizeof(npy_intp)); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:361:18: [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(fp->defs[i].data,PyArray_DATA(arr),s*PyArray_ITEMSIZE(arr)))==NULL) { data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:648: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 mess[200]; data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:661:13: [2] (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). Risk is low because the source is a constant string. strcpy(mess, "failed to create intent(cache|hide)|optional array" data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:664:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mess+strlen(mess),"%" NPY_INTP_FMT ",",dims[i]); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:707:13: [2] (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). Risk is low because the source is a constant string. strcpy(mess, "failed to initialize intent(cache) array"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:709:17: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(mess, " -- input must be in one segment"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:747:13: [2] (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). Risk is low because the source is a constant string. strcpy(mess, "failed to initialize intent(inout) array"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:749:17: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(mess, " -- input not contiguous"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:751:17: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(mess, " -- input not fortran contiguous"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:759:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mess+strlen(mess)," -- input '%c' not compatible to '%c'", data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:762:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mess+strlen(mess)," -- input not %d-aligned", F2PY_GET_ALIGNMENT(intent)); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:966:13: [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/numpy-1.19.4/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c:99: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 s[100]; data/numpy-1.19.4/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c:106:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s,"%p",PyArray_DATA(arr)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:930:7: [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 (c,p1,len*sizeof(cmplx)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:1704:7: [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 (c,p1,n*sizeof(double)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:2038: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 (tmp+2,c+1, (n-1)*sizeof(double)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:2067: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 (c+1, tmp+2, (n-1)*sizeof(double)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:2264: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((char *)(rptr+1), dptr, npts*sizeof(double)); data/numpy-1.19.4/numpy/fft/_pocketfft.c:2306:11: [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((char *)(rptr + 1), (dptr + 2), (npts - 1)*sizeof(double)); data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:1318:12: [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 side[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:7963: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:13846:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:15960:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:18391:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:25945: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:27913: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:27931:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:28253: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:28704: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:28725:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:29009: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:29307: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_c_lapack.c:29604: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:2664:12: [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 side[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:7481: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:17390:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:19629:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:21576:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:34885: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:34903:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:35216: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:35647: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:35667:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:35951: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:36248: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:36544: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_d_lapack.c:41663: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_lapack.c:481:12: [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 c1[1], c2[2], c3[3], c4[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_lapack.c:487:12: [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 subnam[6]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:2653:12: [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 side[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:7463: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:17322:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:19548:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:21497:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:34752: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:34763:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:35081: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:35511: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:35531:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:35815: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:36113: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:36409: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_s_lapack.c:41491: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:1320:12: [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 side[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:8014: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:13914:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:16049:12: [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 jbcmpz[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:18494:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:26062: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:28039: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:28050:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:28377: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:28828: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:28851:12: [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 transt[1]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:29136: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:29438: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/f2c_z_lapack.c:29739: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 ch__1[2]; data/numpy-1.19.4/numpy/linalg/lapack_lite/python_xerbla.c:26: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 buf[sizeof(format) + 6 + 4]; /* 6 for name, 4 for param. num. */ data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-test-data-gen.c:27:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("mt19937-testset-1.csv", "w"); data/numpy-1.19.4/numpy/random/src/mt19937/mt19937-test-data-gen.c:46:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("mt19937-testset-2.csv", "w"); data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.c:138:1: [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 *rk_strerror[RK_ERR_MAX] = {"no error", "random device unvavailable"}; data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.c:512:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rfile = fopen(RK_DEV_RANDOM, "rb"); data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.c:514:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rfile = fopen(RK_DEV_URANDOM, "rb"); data/numpy-1.19.4/numpy/random/src/mt19937/randomkit.h:106: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. extern char *rk_strerror[RK_ERR_MAX]; data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:35:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("pcg64-testset-1.csv", "w"); data/numpy-1.19.4/numpy/random/src/pcg64/pcg64-test-data-gen.c:60:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("pcg64-testset-2.csv", "w"); data/numpy-1.19.4/numpy/random/src/philox/philox-test-data-gen.c:42:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("philox-testset-1.csv", "w"); data/numpy-1.19.4/numpy/random/src/philox/philox-test-data-gen.c:69:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("philox-testset-2.csv", "w"); data/numpy-1.19.4/numpy/_build_utils/src/apple_sgemv_fix.c:94:41: [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 ( r == 0 && strncmp(str, "10.9", strlen("10.9")) == 0) { data/numpy-1.19.4/numpy/core/src/common/numpyos.c:155:26: [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 buf_len = strlen(buffer); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:164:51: [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). memmove(p + insert_count, p, buffer + strlen(buffer) - p + 1); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:185:36: [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 decimal_point_len = strlen(decimal_point); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:198:35: [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 rest_len = strlen(buffer + (decimal_point_len - 1)); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:213:25: [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 format_len = strlen(format); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:633:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); \ data/numpy-1.19.4/numpy/core/src/common/numpyos.c:657:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/numpy-1.19.4/numpy/core/src/common/numpyos.c:663:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/numpy-1.19.4/numpy/core/src/multiarray/arrayobject.c:1451:23: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. n_ops.equal); data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:953:18: [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). buf = malloc(strlen(s) + 1); data/numpy-1.19.4/numpy/core/src/multiarray/buffer.c:973:44: [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 = PyUString_FromStringAndSize(buf, strlen(buf)); data/numpy-1.19.4/numpy/core/src/multiarray/convert.c:140:17: [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). n3 = (sep ? strlen((const char *)sep) : 0); data/numpy-1.19.4/numpy/core/src/multiarray/convert.c:223:24: [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). n4 = (format ? strlen((const char *)format) : 0); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:125:24: [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). s = start = malloc(strlen(sep)+3); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:224:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(*fp); data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:3727:27: [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 ((sep == NULL) || (strlen(sep) == 0)) { data/numpy-1.19.4/numpy/core/src/multiarray/ctors.c:3908:33: [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). binary = ((sep == NULL) || (strlen(sep) == 0)); data/numpy-1.19.4/numpy/core/src/multiarray/descriptor.c:1688:39: [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 (strncmp(type, dep_tp, strlen(dep_tp)) == 0) { data/numpy-1.19.4/numpy/core/src/multiarray/multiarraymodule.c:2056:24: [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 (sep == NULL || strlen(sep) == 0) { data/numpy-1.19.4/numpy/core/src/multiarray/number.c:100:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SET(equal); data/numpy-1.19.4/numpy/core/src/multiarray/number.c:167:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GET(equal); data/numpy-1.19.4/numpy/core/src/multiarray/number.h:28:15: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. PyObject *equal; data/numpy-1.19.4/numpy/core/src/umath/ufunc_object.c:632: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(signature); data/numpy-1.19.4/numpy/core/src/umath/umathmodule.c:202:24: [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). newdocstr = malloc(strlen(docstr) + 1); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:167:17: [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 += strlen(def.doc); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:177:17: [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). n = strlen(def.doc); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:221:17: [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). n = strlen("scalar"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:664:30: [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). sprintf(mess+strlen(mess),"%" NPY_INTP_FMT ",",dims[i]); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:665:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(mess, ")"); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:711:30: [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). sprintf(mess+strlen(mess), data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:753:30: [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). sprintf(mess+strlen(mess), data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:759:30: [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). sprintf(mess+strlen(mess)," -- input '%c' not compatible to '%c'", data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:762: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). sprintf(mess+strlen(mess)," -- input not %d-aligned", F2PY_GET_ALIGNMENT(intent)); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:974: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). len = strlen(msg); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:978:19: [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(msg); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:981: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). len = strlen(msg); data/numpy-1.19.4/numpy/f2py/src/fortranobject.c:985:19: [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(msg); ANALYSIS SUMMARY: Hits = 302 Lines analyzed = 277819 in approximately 6.90 seconds (40268 lines/second) Physical Source Lines of Code (SLOC) = 166216 Hits@level = [0] 277 [1] 38 [2] 241 [3] 0 [4] 23 [5] 0 Hits@level+ = [0+] 579 [1+] 302 [2+] 264 [3+] 23 [4+] 23 [5+] 0 Hits/KSLOC@level+ = [0+] 3.48342 [1+] 1.81691 [2+] 1.58829 [3+] 0.138374 [4+] 0.138374 [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.