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/jpathwatch-0.95/jpathwatch-native/src/Windows_OVERLAPPED.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows_tls.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_LinuxPathWatchService.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows_OVERLAPPED.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows_ByteBuffer.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Unix.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/JArgument.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Windows_ByteBuffer.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Windows.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Windows_OVERLAPPED.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Unix_timespec.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/JArgument.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Windows_SECURITY_ATTRIBUTES.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/nativelib.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Unix_DIR.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_WindowsPathWatchService_WatchRecord.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Unix_timespec.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_NativePathWatchService.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_BSD.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/windows_include.hpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/nativelib.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/Unix_timespec.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/WindowsPathWatchService.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_WindowsPathWatchService_Command.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/BSD.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_BSD_kevent_IntStringMapping.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_WindowsPathWatchService_OVERLAPPED.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Unix_stat.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_BSD_kevent.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Linux.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/Unix.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Unix.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Linux.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows_ByteBuffer.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Unix_dirent.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/BSD_kevent.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_UnixPathWatchService.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_WindowsPathWatchService.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/Windows_tls.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/BSD_kevent.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/LinuxPathWatchService.cpp
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_Windows_SECURITY_DESCRIPTOR.h
Examining data/jpathwatch-0.95/jpathwatch-native/src/name_pachler_nio_file_impl_WindowsPathWatchService_ByteBuffer.h

FINAL RESULTS:

data/jpathwatch-0.95/jpathwatch-native/src/Unix.cpp:159: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 defineName[128] = {0};
data/jpathwatch-0.95/jpathwatch-native/src/Unix.cpp:188: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 msg[256] = {};
data/jpathwatch-0.95/jpathwatch-native/src/Unix.cpp:267:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int result = open(pathname, flags, mode);
data/jpathwatch-0.95/jpathwatch-native/src/Windows.cpp:252: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 messageBuffer[FORMAT_MESSAGE_MAX_WIDTH_MASK] = {};
data/jpathwatch-0.95/jpathwatch-native/src/Unix.cpp:417:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	jint result = read(fd, bufferp, nbytes);
data/jpathwatch-0.95/jpathwatch-native/src/Windows.cpp:75:13:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            wcsncpy(lpFileName, reinterpret_cast<const wchar_t*>(s), sLength);

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 4011 in approximately 0.20 seconds (20174 lines/second)
Physical Source Lines of Code (SLOC) = 2131
Hits@level = [0]   4 [1]   2 [2]   4 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  10 [1+]   6 [2+]   4 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.69263 [1+] 2.81558 [2+] 1.87705 [3+]   0 [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.