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/npth-1.6/w32/npth.h
Examining data/npth-1.6/w32/npth.c
Examining data/npth-1.6/tests/t-fork.c
Examining data/npth-1.6/tests/t-mutex.c
Examining data/npth-1.6/tests/t-thread.c
Examining data/npth-1.6/tests/t-support.h
Examining data/npth-1.6/src/npth.h
Examining data/npth-1.6/src/npth.c
Examining data/npth-1.6/src/npth-sigev.c

FINAL RESULTS:

data/npth-1.6/src/npth.c:563:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  res = system(cmd);
data/npth-1.6/w32/npth.c:34:29:  [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 _npth_debug(x, ...) fprintf(stderr, __VA_ARGS__)
data/npth-1.6/w32/npth.c:426:3:  [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 (buf, thread->name);
data/npth-1.6/w32/npth.c:444:3:  [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 (thread->name, name);
data/npth-1.6/w32/npth.c:1669:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  res = system(cmd);
data/npth-1.6/w32/npth.c:166:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection (&sceptre);
data/npth-1.6/w32/npth.c:326:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection (&sceptre);
data/npth-1.6/w32/npth.c:194: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 name[THREAD_NAME_MAX + 1];
data/npth-1.6/src/npth.c:172:7:  [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 (BUSY_WAIT_INTERVAL * 1000);
data/npth-1.6/src/npth.c:539:9:  [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.
  res = usleep(usec);
data/npth-1.6/src/npth.c:684:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  res = read(fd, buf, nbytes);
data/npth-1.6/w32/npth.c:437:7:  [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 (strlen(name) > THREAD_NAME_MAX)
data/npth-1.6/w32/npth.c:1725:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  res = read(fd, buf, nbytes);

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 3983 in approximately 0.09 seconds (45367 lines/second)
Physical Source Lines of Code (SLOC) = 2513
Hits@level = [0]   4 [1]   5 [2]   1 [3]   2 [4]   5 [5]   0
Hits@level+ = [0+]  17 [1+]  13 [2+]   8 [3+]   7 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 6.76482 [1+] 5.1731 [2+] 3.18345 [3+] 2.78552 [4+] 1.98965 [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.