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/dropwatch-1.5.3/src/dwdump.c
Examining data/dropwatch-1.5.3/src/lookup.c
Examining data/dropwatch-1.5.3/src/lookup.h
Examining data/dropwatch-1.5.3/src/lookup_bfd.c
Examining data/dropwatch-1.5.3/src/lookup_kas.c
Examining data/dropwatch-1.5.3/src/main.c
Examining data/dropwatch-1.5.3/src/net_dropmon.h

FINAL RESULTS:

data/dropwatch-1.5.3/src/lookup_bfd.c:39:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
data/dropwatch-1.5.3/src/dwdump.c:685: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, optstring,
data/dropwatch-1.5.3/src/main.c:1099:7:  [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.
		c = getopt_long(argc, argv, "l:", options, &optind);
data/dropwatch-1.5.3/src/dwdump.c:78: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 addr[8];
data/dropwatch-1.5.3/src/dwdump.c:434: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(dwdump->pcap_buf + sizeof(struct linux_sll), buf, pkt_len);
data/dropwatch-1.5.3/src/dwdump.c:466: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(dwdump->pcap_buf, &sll, sizeof(sll));
data/dropwatch-1.5.3/src/dwdump.c:692:32:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			dwdump->options.trunc_len = atol(optarg);
data/dropwatch-1.5.3/src/dwdump.c:703:32:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			dwdump->options.queue_len = atol(optarg);
data/dropwatch-1.5.3/src/dwdump.c:715:28:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			dwdump->options.rxbuf = atol(optarg);
data/dropwatch-1.5.3/src/lookup_kas.c:79:7:  [2] (misc) fopen:
  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).
	pf = fopen("/proc/kallsyms", "r");
data/dropwatch-1.5.3/src/main.c:418:3:  [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(&location, alert->points[i].pc, sizeof(void *));
data/dropwatch-1.5.3/src/lookup_bfd.c:38:18:  [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).
	dbibuf = malloc(strlen("/usr/lib/debug/lib/modules") + strlen(uts.release) + 1);
data/dropwatch-1.5.3/src/lookup_bfd.c:38:57:  [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).
	dbibuf = malloc(strlen("/usr/lib/debug/lib/modules") + strlen(uts.release) + 1);
data/dropwatch-1.5.3/src/main.c:527:8:  [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).
		tstr[strlen(tstr) - 1] = 0;

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 2418 in approximately 0.09 seconds (25755 lines/second)
Physical Source Lines of Code (SLOC) = 1855
Hits@level = [0] 124 [1]   3 [2]   8 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+] 138 [1+]  14 [2+]  11 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 74.3935 [1+] 7.54717 [2+] 5.92992 [3+] 1.61725 [4+] 0.539084 [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.