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/numexpr-2.7.1/bench/poly.c
Examining data/numexpr-2.7.1/numexpr/complex_functions.hpp
Examining data/numexpr-2.7.1/numexpr/functions.hpp
Examining data/numexpr-2.7.1/numexpr/interp_body.cpp
Examining data/numexpr-2.7.1/numexpr/interpreter.cpp
Examining data/numexpr-2.7.1/numexpr/interpreter.hpp
Examining data/numexpr-2.7.1/numexpr/missing_posix_functions.hpp
Examining data/numexpr-2.7.1/numexpr/module.cpp
Examining data/numexpr-2.7.1/numexpr/module.hpp
Examining data/numexpr-2.7.1/numexpr/msvc_function_stubs.hpp
Examining data/numexpr-2.7.1/numexpr/numexpr_config.hpp
Examining data/numexpr-2.7.1/numexpr/numexpr_object.cpp
Examining data/numexpr-2.7.1/numexpr/numexpr_object.hpp
Examining data/numexpr-2.7.1/numexpr/opcodes.hpp
Examining data/numexpr-2.7.1/numexpr/str-two-way.hpp
Examining data/numexpr-2.7.1/numexpr/win32/pthread.c
Examining data/numexpr-2.7.1/numexpr/win32/pthread.h
Examining data/numexpr-2.7.1/numexpr/win32/stdint.h

FINAL RESULTS:

data/numexpr-2.7.1/numexpr/module.cpp:415:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *max_thread_str = getenv("NUMEXPR_MAX_THREADS");
data/numexpr-2.7.1/numexpr/win32/pthread.c:86:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&cond->waiters_lock);
data/numexpr-2.7.1/numexpr/win32/pthread.c:114:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiters_lock);
data/numexpr-2.7.1/numexpr/win32/pthread.c:135:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiters_lock);
data/numexpr-2.7.1/numexpr/win32/pthread.c:158:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(mutex);
data/numexpr-2.7.1/numexpr/win32/pthread.c:172:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiters_lock);
data/numexpr-2.7.1/numexpr/win32/pthread.c:193:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiters_lock);
data/numexpr-2.7.1/numexpr/win32/pthread.h:49:33:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#define pthread_mutex_init(a,b) InitializeCriticalSection((a))
data/numexpr-2.7.1/numexpr/win32/pthread.h:51:28:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define pthread_mutex_lock EnterCriticalSection
data/numexpr-2.7.1/numexpr/interp_body.cpp:125: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(mem, iter_dataptr, (1+params.n_inputs)*sizeof(char*));
data/numexpr-2.7.1/numexpr/interp_body.cpp:132: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(memsteps, iter_strides, (1+params.n_inputs)*sizeof(npy_intp));
data/numexpr-2.7.1/numexpr/interp_body.cpp:161: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.
        #define b_dest ((char *)dest)[j]
data/numexpr-2.7.1/numexpr/interp_body.cpp:202:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_SS: VEC_ARG1(memcpy(s_dest, s1, ss1));
data/numexpr-2.7.1/numexpr/interp_body.cpp:206:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_II: VEC_ARG1(memcpy(&i_dest, s1, sizeof(int)));
data/numexpr-2.7.1/numexpr/interp_body.cpp:207:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_LL: VEC_ARG1(memcpy(&l_dest, s1, sizeof(long long)));
data/numexpr-2.7.1/numexpr/interp_body.cpp:208:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_FF: VEC_ARG1(memcpy(&f_dest, s1, sizeof(float)));
data/numexpr-2.7.1/numexpr/interp_body.cpp:209:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_DD: VEC_ARG1(memcpy(&d_dest, s1, sizeof(double)));
data/numexpr-2.7.1/numexpr/interp_body.cpp:210:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        case OP_COPY_CC: VEC_ARG1(memcpy(&cr_dest, s1, sizeof(double)*2));
data/numexpr-2.7.1/numexpr/interp_body.cpp:483: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(iter_dataptr[0], params.out_buffer, params.memsizes[0] * BLOCK_SIZE);
data/numexpr-2.7.1/numexpr/interpreter.cpp:355:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    int axis = ((unsigned char *)PyBytes_AS_STRING(program))[end-1];
data/numexpr-2.7.1/numexpr/interpreter.cpp:764: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(th_params.memsteps[i], th_params.memsteps[0],
data/numexpr-2.7.1/numexpr/module.cpp:98: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(mem, params.mem, memsize);
data/numexpr-2.7.1/numexpr/module.cpp:305: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[198];
data/numexpr-2.7.1/numexpr/numexpr_object.cpp:295: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(smem + j, value, size);

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 5279 in approximately 0.15 seconds (34804 lines/second)
Physical Source Lines of Code (SLOC) = 3904
Hits@level = [0]   8 [1]   0 [2]  15 [3]   9 [4]   0 [5]   0
Hits@level+ = [0+]  32 [1+]  24 [2+]  24 [3+]   9 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 8.19672 [1+] 6.14754 [2+] 6.14754 [3+] 2.30533 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.