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/libsocketcan-0.0.11/include/can_netlink.h
Examining data/libsocketcan-0.0.11/include/libsocketcan.h
Examining data/libsocketcan-0.0.11/src/libsocketcan.c

FINAL RESULTS:

data/libsocketcan-0.0.11/src/libsocketcan.c:46:9:  [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 fprintf(...)
data/libsocketcan-0.0.11/include/can_netlink.h:47:2:  [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[16];		/* Name of the CAN controller hardware */
data/libsocketcan-0.0.11/src/libsocketcan.c:78:2:  [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 buf[1024];
data/libsocketcan-0.0.11/src/libsocketcan.c:125:2:  [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(RTA_DATA(rta), &data, 4);
data/libsocketcan-0.0.11/src/libsocketcan.c:147:2:  [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(RTA_DATA(rta), data, alen);
data/libsocketcan-0.0.11/src/libsocketcan.c:182:2:  [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 buf[16384];
data/libsocketcan-0.0.11/src/libsocketcan.c:357:2:  [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 cbuf[64];
data/libsocketcan-0.0.11/src/libsocketcan.c:358:2:  [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 nlbuf[1024 * 8];
data/libsocketcan-0.0.11/src/libsocketcan.c:418:16:  [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.
			if (strcmp((char *)RTA_DATA(tb[IFLA_IFNAME]), name) == 0)
data/libsocketcan-0.0.11/src/libsocketcan.c:427:6:  [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(res, RTA_DATA(tb[IFLA_STATS64]), sizeof(struct rtnl_link_stats64));
data/libsocketcan-0.0.11/src/libsocketcan.c:443:6:  [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(res, RTA_DATA(linkinfo[IFLA_INFO_XSTATS]),
data/libsocketcan-0.0.11/src/libsocketcan.c:482:6:  [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(res,
data/libsocketcan-0.0.11/src/libsocketcan.c:492:6:  [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(res,
data/libsocketcan-0.0.11/src/libsocketcan.c:502:6:  [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(res,
data/libsocketcan-0.0.11/src/libsocketcan.c:513:6:  [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(res,
data/libsocketcan-0.0.11/src/libsocketcan.c:523:6:  [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(res,
data/libsocketcan-0.0.11/src/libsocketcan.c:633:6:  [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).
			  strlen(type));

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 1402 in approximately 0.06 seconds (25135 lines/second)
Physical Source Lines of Code (SLOC) = 665
Hits@level = [0]  28 [1]   1 [2]  15 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  45 [1+]  17 [2+]  16 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 67.6692 [1+] 25.5639 [2+] 24.0602 [3+] 1.50376 [4+] 1.50376 [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.