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/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.h
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/jsc-perf.cpp
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/perf-counters.cpp
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/portability.h
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/thread-local.cpp
Examining data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/thread-local.h

FINAL RESULTS:

data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/thread-local.h:43:20:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
# error How do you access thread-local storage on this machine?
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:406: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(sevents_buf, sevents.data(), sevents.size());
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:90:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int64_t read() {
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:114:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      auto ret = ::read(m_fd, values, sizeof(*values) * 3);
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:136:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      auto ret = ::read(m_fd, reset_values, sizeof(reset_values));
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:226:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return m_instructionCounter->read();
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:234:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return m_loadCounter->read();
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:242:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return m_storeCounter->read();
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:302: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).
    if (!strncmp(event, t[i].name, strlen(t[i].name))) {
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:303:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      *match_len = strlen(t[i].name);
data/node-react-17.0.1+dfsg+~cs102.92.74/scripts/perf-counters/src/hardware-counter.cpp:447:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    f(m_counters[i]->m_desc, m_counters[i]->read(), data);

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 1875 in approximately 0.65 seconds (2899 lines/second)
Physical Source Lines of Code (SLOC) = 1326
Hits@level = [0]   8 [1]   9 [2]   1 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  19 [1+]  11 [2+]   2 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 14.3288 [1+] 8.29563 [2+] 1.5083 [3+] 0.754148 [4+] 0.754148 [5+]   0
Dot directories skipped = 5 (--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.