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-rcppparallel-5.0.2+dfsg/src/options.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/src/init.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/fast_mutex.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/TBB.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/RVector.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/Common.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/TinyThread.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/Backend.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/Timer.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/RMatrix.h
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/tests/cpp/innerproduct.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/tests/cpp/sum.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/tests/cpp/distance.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/tests/cpp/transform.cpp
Examining data/r-cran-rcppparallel-5.0.2+dfsg/inst/skeleton/vector-sum.cpp

FINAL RESULTS:

data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/Backend.h:52:40:  [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.
   const char* requestedBackend = std::getenv("RCPP_PARALLEL_BACKEND");
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/TinyThread.h:73:25:  [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* numThreads = ::getenv("RCPP_PARALLEL_NUM_THREADS");
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/fast_mutex.h:97:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&mHandle);
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/fast_mutex.h:137: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:169:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&mHandle);
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:192: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:258:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&mHandle);
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:284: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:425: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:755:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(&mWaitersCountLock);
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:776: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:792: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-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:806: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-rcppparallel-5.0.2+dfsg/inst/include/RcppParallel/TinyThread.h:75:29:  [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 parsedThreads = ::atoi(numThreads);
data/r-cran-rcppparallel-5.0.2+dfsg/inst/include/tthread/tinythread.h:705: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 = 15
Lines analyzed = 2660 in approximately 0.06 seconds (45365 lines/second)
Physical Source Lines of Code (SLOC) = 1680
Hits@level = [0]   0 [1]   1 [2]   1 [3]  13 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]  15 [2+]  14 [3+]  13 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 8.92857 [1+] 8.92857 [2+] 8.33333 [3+] 7.7381 [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.