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/logswan-2.1.8/compat/compat.h
Examining data/logswan-2.1.8/compat/pledge.c
Examining data/logswan-2.1.8/compat/pledge.h
Examining data/logswan-2.1.8/compat/strtonum.c
Examining data/logswan-2.1.8/compat/strtonum.h
Examining data/logswan-2.1.8/deps/MurmurHash3/MurmurHash3.c
Examining data/logswan-2.1.8/deps/MurmurHash3/MurmurHash3.h
Examining data/logswan-2.1.8/deps/hll/hll.c
Examining data/logswan-2.1.8/deps/hll/hll.h
Examining data/logswan-2.1.8/src/config.c
Examining data/logswan-2.1.8/src/config.h
Examining data/logswan-2.1.8/src/continents.c
Examining data/logswan-2.1.8/src/continents.h
Examining data/logswan-2.1.8/src/countries.c
Examining data/logswan-2.1.8/src/countries.h
Examining data/logswan-2.1.8/src/logswan.c
Examining data/logswan-2.1.8/src/output.c
Examining data/logswan-2.1.8/src/output.h
Examining data/logswan-2.1.8/src/parse.c
Examining data/logswan-2.1.8/src/parse.h
Examining data/logswan-2.1.8/src/seccomp.h

FINAL RESULTS:

data/logswan-2.1.8/src/logswan.c:112:23:  [3] (buffer) getopt:
  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 ((getoptFlag = getopt(argc, argv, "d:ghv")) != -1) {
data/logswan-2.1.8/deps/hll/hll.c:139: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(hll->registers, registers, size);
data/logswan-2.1.8/src/logswan.c:49:1:  [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 lineBuffer[LINE_LENGTH_MAX];
data/logswan-2.1.8/src/logswan.c:160:19:  [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).
		if (!(logFile = fopen(intputFile, "r"))) {
data/logswan-2.1.8/src/output.h:40: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 timeStamp[20];
data/logswan-2.1.8/src/seccomp.h:68:24:  [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).
	LOGSWAN_SYSCALL_ALLOW(open),
data/logswan-2.1.8/src/logswan.c:202:48:  [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).
			hll_add(&uniqueIPv4, parsedLine.remoteHost, strlen(parsedLine.remoteHost));
data/logswan-2.1.8/src/logswan.c:210:48:  [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).
			hll_add(&uniqueIPv6, parsedLine.remoteHost, strlen(parsedLine.remoteHost));
data/logswan-2.1.8/src/seccomp.h:78:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	LOGSWAN_SYSCALL_ALLOW(read),

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 1688 in approximately 0.04 seconds (37875 lines/second)
Physical Source Lines of Code (SLOC) = 1296
Hits@level = [0]   4 [1]   3 [2]   5 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  13 [1+]   9 [2+]   6 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 10.0309 [1+] 6.94444 [2+] 4.62963 [3+] 0.771605 [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.