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/libndp-1.6/utils/ndptool.c
Examining data/libndp-1.6/libndp/list.h
Examining data/libndp-1.6/libndp/ndp_private.h
Examining data/libndp-1.6/libndp/libndp.c
Examining data/libndp-1.6/include/ndp.h

FINAL RESULTS:

data/libndp-1.6/libndp/libndp.c:59:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/libndp-1.6/libndp/ndp_private.h:54:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static inline void __attribute__((always_inline, format(printf, 2, 3)))
data/libndp-1.6/utils/ndptool.c:44:25:  [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 pr_err(args...) fprintf(stderr, ##args)
data/libndp-1.6/utils/ndptool.c:48:4:  [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.
			fprintf(stdout, ##args);	\
data/libndp-1.6/libndp/libndp.c:1994:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	env = getenv("NDP_LOG");
data/libndp-1.6/utils/ndptool.c:399:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "hvt:i:U",
data/libndp-1.6/libndp/libndp.c:143:11:  [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.
	unsigned char cbuf[2 * CMSG_SPACE(sizeof(struct in6_pktinfo))];
data/libndp-1.6/libndp/libndp.c:222:9:  [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.
	static char buf[INET6_ADDRSTRLEN];
data/libndp-1.6/libndp/libndp.c:312:11:  [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.
	unsigned char			buf[NDP_MSG_BUFLEN];
data/libndp-1.6/libndp/libndp.c:332: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 strabbr[NDP_STRABBR_SIZE];
data/libndp-1.6/libndp/libndp.c:1528: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(&prefix, &ri->nd_opt_ri_prefix, (ri->nd_opt_ri_len - 1) << 3);
data/libndp-1.6/libndp/libndp.c:1679:9:  [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.
	static char buf[256];
data/libndp-1.6/libndp/libndp.c:1705:4:  [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(buf + buf_len, ptr, dom_len);
data/libndp-1.6/libndp/ndp_private.h:95: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		nd_opt_ri_prefix[0];
data/libndp-1.6/libndp/ndp_private.h:103: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		nd_opt_rdnss_addresses[0];
data/libndp-1.6/libndp/ndp_private.h:111: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		nd_opt_dnssl_domains[0];
data/libndp-1.6/utils/ndptool.c:147:9:  [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.
	static char buf[INET6_ADDRSTRLEN];
data/libndp-1.6/utils/ndptool.c:189: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 ifname[IF_NAMESIZE];
data/libndp-1.6/utils/ndptool.c:463: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(cmd_name, "monitor", strlen(cmd_name))) {
data/libndp-1.6/utils/ndptool.c:465:40:  [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).
	} else if (!strncmp(cmd_name, "send", strlen(cmd_name))) {

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 2965 in approximately 0.09 seconds (32361 lines/second)
Physical Source Lines of Code (SLOC) = 1842
Hits@level = [0]   3 [1]   2 [2]  12 [3]   2 [4]   4 [5]   0
Hits@level+ = [0+]  23 [1+]  20 [2+]  18 [3+]   6 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 12.4864 [1+] 10.8578 [2+] 9.77199 [3+] 3.25733 [4+] 2.17155 [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.