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/r-cran-reticulate-1.18+dfsg/src/tinythread.h
Examining data/r-cran-reticulate-1.18+dfsg/src/event_loop.cpp
Examining data/r-cran-reticulate-1.18+dfsg/src/readline.cpp
Examining data/r-cran-reticulate-1.18+dfsg/src/libpython.h
Examining data/r-cran-reticulate-1.18+dfsg/src/python.cpp
Examining data/r-cran-reticulate-1.18+dfsg/src/event_loop.h
Examining data/r-cran-reticulate-1.18+dfsg/src/reticulate_types.h
Examining data/r-cran-reticulate-1.18+dfsg/src/output.cpp
Examining data/r-cran-reticulate-1.18+dfsg/src/libpython.cpp
Examining data/r-cran-reticulate-1.18+dfsg/src/RcppExports.cpp

FINAL RESULTS:

data/r-cran-reticulate-1.18+dfsg/src/libpython.cpp:60:21:  [3] (misc) LoadLibraryEx:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  *ppLib = (void*)::LoadLibraryEx(libPath.c_str(), NULL, 0);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:171:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&mHandle);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:194:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(&mHandle);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:260:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&mHandle);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:286:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(&mHandle);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:427:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(&mWaitersCountLock);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:756:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(&mWaitersCountLock);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:777:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&mWaitersCountLock);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:793:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&mWaitersCountLock);
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:807:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&mWaitersCountLock);
data/r-cran-reticulate-1.18+dfsg/src/python.cpp:1676:11:  [2] (buffer) wchar_t:
  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 wchar_t *argv[1] = {s_python_v3.c_str()};
data/r-cran-reticulate-1.18+dfsg/src/python.cpp:1698:11:  [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 *argv[1] = {s_python.c_str()};
data/r-cran-reticulate-1.18+dfsg/src/python.cpp:1718:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int tracems = ::atoi(tracems_env.c_str());
data/r-cran-reticulate-1.18+dfsg/src/readline.cpp:11: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 buffer[READLINE_BUFFER_SIZE];
data/r-cran-reticulate-1.18+dfsg/src/readline.cpp:16: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).
  std::string result(buffer, buffer + strlen(buffer));
data/r-cran-reticulate-1.18+dfsg/src/tinythread.h:706:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(int(double(aTime.count()) * (1000000.0 * _Period::_as_double()) + 0.5));

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 5646 in approximately 0.12 seconds (46282 lines/second)
Physical Source Lines of Code (SLOC) = 3858
Hits@level = [0]   0 [1]   2 [2]   4 [3]  10 [4]   0 [5]   0
Hits@level+ = [0+]  16 [1+]  16 [2+]  14 [3+]  10 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.14723 [1+] 4.14723 [2+] 3.62882 [3+] 2.59202 [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.