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/sigrok-cli-0.7.1/options.c
Examining data/sigrok-cli-0.7.1/session.c
Examining data/sigrok-cli-0.7.1/parsers.c
Examining data/sigrok-cli-0.7.1/anykey.c
Examining data/sigrok-cli-0.7.1/input.c
Examining data/sigrok-cli-0.7.1/main.c
Examining data/sigrok-cli-0.7.1/decode.c
Examining data/sigrok-cli-0.7.1/device.c
Examining data/sigrok-cli-0.7.1/show.c
Examining data/sigrok-cli-0.7.1/sigrok-cli.h

FINAL RESULTS:

data/sigrok-cli-0.7.1/session.c:426:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if (sscanf(value, "%"PRIu64"-%"PRIu64, &low, &high) != 2) {
data/sigrok-cli-0.7.1/show.c:526:5:  [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.
				printf("      %"PRIu64, uint64[i]);
data/sigrok-cli-0.7.1/show.c:589:5:  [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.
				printf("%"PRIu64"-%"PRIu64, low, high);
data/sigrok-cli-0.7.1/show.c:711:7:  [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.
						printf("/%" PRIu64, mqflags & mask);
data/sigrok-cli-0.7.1/anykey.c:74: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(&term_orig, &term, sizeof(struct termios));
data/sigrok-cli-0.7.1/input.c:77:26:  [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).
		if (!is_stdin && (fd = open(opt_input_file, O_RDONLY)) < 0)
data/sigrok-cli-0.7.1/input.c:88:10:  [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).
				fd = open(opt_input_file, O_RDONLY);
data/sigrok-cli-0.7.1/input.c:99:10:  [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).
				fd = open(opt_input_file, O_RDONLY);
data/sigrok-cli-0.7.1/parsers.c:49: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 **tokens, **range, **names, *eptr, str[8];
data/sigrok-cli-0.7.1/input.c:104:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if ((len = read(fd, buf->str, CHUNK_SIZE)) < 1)
data/sigrok-cli-0.7.1/input.c:119:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len = read(fd, buf->str, CHUNK_SIZE);
data/sigrok-cli-0.7.1/session.c:377:17:  [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 ((!value || strlen(value) == 0) &&

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 3725 in approximately 0.10 seconds (37911 lines/second)
Physical Source Lines of Code (SLOC) = 2984
Hits@level = [0] 178 [1]   3 [2]   5 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+] 190 [1+]  12 [2+]   9 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 63.6729 [1+] 4.02145 [2+] 3.01609 [3+] 1.34048 [4+] 1.34048 [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.