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/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c
Examining data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.h

FINAL RESULTS:

data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:253:17:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	int chmodRes = chmod(su.sun_path, 0666);
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:143:2:  [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(su.sun_path, socketFile);
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:199:2:  [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(su.sun_path, socketFile);
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:313:2:  [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(su.sun_path, socketFile);
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:129:5:  [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(socketFile) >= 104) {
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:141:66:  [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).
	su.sun_len = (unsigned char)(sizeof(su) - sizeof(su.sun_path) + strlen(su.sun_path));
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:146:35:  [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).
	socklen_t suLength = (socklen_t)(strlen(su.sun_path) + sizeof(su.sun_family)
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:173:5:  [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(socketFile) >= 104) {
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:196:66:  [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).
	su.sun_len = (unsigned char)(sizeof(su) - sizeof(su.sun_path) + strlen(su.sun_path));
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:202:35:  [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).
	socklen_t suLength = (socklen_t)(strlen(su.sun_path) + sizeof(su.sun_family)
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:294:5:  [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(socketFile) >= 104) {
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:310:66:  [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).
	su.sun_len = (unsigned char)(sizeof(su) - sizeof(su.sun_path) + strlen(su.sun_path));
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:316:35:  [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).
	socklen_t suLength = (socklen_t)(strlen(su.sun_path) + sizeof(su.sun_family)
data/junixsocket-2.0.4/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.c:358:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t count = read(handle, &(buf[offset]), (size_t)length);

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 905 in approximately 0.09 seconds (10174 lines/second)
Physical Source Lines of Code (SLOC) = 564
Hits@level = [0]   3 [1]  10 [2]   0 [3]   0 [4]   3 [5]   1
Hits@level+ = [0+]  17 [1+]  14 [2+]   4 [3+]   4 [4+]   4 [5+]   1
Hits/KSLOC@level+ = [0+] 30.1418 [1+] 24.8227 [2+] 7.0922 [3+] 7.0922 [4+] 7.0922 [5+] 1.77305
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.