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/jack-keyboard-2.7.2/src/pianokeyboard.c
Examining data/jack-keyboard-2.7.2/src/pianokeyboard.h
Examining data/jack-keyboard-2.7.2/src/jack-keyboard.c

FINAL RESULTS:

data/jack-keyboard-2.7.2/src/jack-keyboard.c:1859:15:  [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 ((ch = getopt(argc, argv, "CGKTVa:nktur:c:b:p:l:f")) != -1) {
data/jack-keyboard-2.7.2/src/jack-keyboard.c:193: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	data[3];
data/jack-keyboard-2.7.2/src/jack-keyboard.c:312: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(ev->data, event.buffer, ev->len);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:461: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(buffer, ev.data, ev.len);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:594: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 title[256];
data/jack-keyboard-2.7.2/src/jack-keyboard.c:1907:22:  [2] (integer) atoi:
  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).
			initial_channel = atoi(optarg);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:1919:19:  [2] (integer) atoi:
  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).
			initial_bank = atoi(optarg);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:1933:22:  [2] (integer) atoi:
  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).
			initial_program = atoi(optarg);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:336:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read, events, i;
data/jack-keyboard-2.7.2/src/jack-keyboard.c:360:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read) {
data/jack-keyboard-2.7.2/src/jack-keyboard.c:395:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read, t, bytes_remaining;
data/jack-keyboard-2.7.2/src/jack-keyboard.c:421:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read != sizeof(ev)) {
data/jack-keyboard-2.7.2/src/jack-keyboard.c:423:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			jack_ringbuffer_read_advance(ringbuffer, read);
data/jack-keyboard-2.7.2/src/jack-keyboard.c:563: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).
			    !strncmp(available[i], my_name, strlen(PACKAGE_NAME))))
data/jack-keyboard-2.7.2/src/jack-keyboard.c:675:50:  [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(port, jack_port_name(input_port), strlen(PACKAGE_NAME)))
data/jack-keyboard-2.7.2/src/jack-keyboard.c:1271:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 2933 in approximately 0.08 seconds (35838 lines/second)
Physical Source Lines of Code (SLOC) = 2099
Hits@level = [0]  15 [1]   8 [2]   7 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  31 [1+]  16 [2+]   8 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 14.7689 [1+] 7.62268 [2+] 3.81134 [3+] 0.476417 [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.