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-stdio-1.4/jack-stdout.c
Examining data/jack-stdio-1.4/jack-stdin.c

FINAL RESULTS:

data/jack-stdio-1.4/jack-stdin.c:367:14:  [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 ((c = getopt_long(argc, argv, optstring, long_options, NULL)) != -1) {
data/jack-stdio-1.4/jack-stdout.c:358:14:  [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 ((c = getopt_long(argc, argv, optstring, long_options, NULL)) != -1) {
data/jack-stdio-1.4/jack-stdin.c:216:5:  [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 bytes[4];
data/jack-stdio-1.4/jack-stdin.c:274:3:  [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 name[64];
data/jack-stdio-1.4/jack-stdin.c:276:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(name, "input%d", i+1);
data/jack-stdio-1.4/jack-stdin.c:380:28:  [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).
				thread_info.duration = atoi(optarg);
data/jack-stdio-1.4/jack-stdin.c:402:9:  [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).
				if (atoi(optarg) == 24)
data/jack-stdio-1.4/jack-stdin.c:404:14:  [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).
				else if (atoi(optarg) == 8)
data/jack-stdio-1.4/jack-stdin.c:406:14:  [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).
				else if (atoi(optarg) == 32)
data/jack-stdio-1.4/jack-stdin.c:408:14:  [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).
				else if (atoi(optarg) != 16) {
data/jack-stdio-1.4/jack-stdin.c:420:27:  [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).
				thread_info.rb_size = atoi(optarg);
data/jack-stdio-1.4/jack-stdin.c:441: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).
		thread_info.readfd = open(infn, O_RDONLY) ;
data/jack-stdio-1.4/jack-stdout.c:229:5:  [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 bytes[4];
data/jack-stdio-1.4/jack-stdout.c:273:3:  [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 name[64];
data/jack-stdio-1.4/jack-stdout.c:275:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(name, "input%d", i+1);
data/jack-stdio-1.4/jack-stdout.c:367:28:  [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).
				thread_info.duration = atoi(optarg);
data/jack-stdio-1.4/jack-stdout.c:384:9:  [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).
				if (atoi(optarg) == 24)
data/jack-stdio-1.4/jack-stdout.c:386:14:  [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).
				else if (atoi(optarg) == 8)
data/jack-stdio-1.4/jack-stdout.c:388:14:  [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).
				else if (atoi(optarg) == 32)
data/jack-stdio-1.4/jack-stdout.c:390:14:  [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).
				else if (atoi(optarg) != 16) {
data/jack-stdio-1.4/jack-stdout.c:402:27:  [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).
				thread_info.rb_size = atoi(optarg);
data/jack-stdio-1.4/jack-stdin.c:128:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			int rv = read(info->readfd, framebuf+roff, bytes_per_frame-roff);
data/jack-stdio-1.4/jack-stdin.c:148: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(10000);
data/jack-stdio-1.4/jack-stdin.c:389:44:  [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(optarg, "floating-point", strlen(optarg)))
data/jack-stdio-1.4/jack-stdin.c:391:51:  [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(optarg, "unsigned-integer", strlen(optarg)))
data/jack-stdio-1.4/jack-stdin.c:393:49:  [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(optarg, "signed-integer", strlen(optarg)))
data/jack-stdio-1.4/jack-stdout.c:371:44:  [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(optarg, "floating-point", strlen(optarg)))
data/jack-stdio-1.4/jack-stdout.c:373:51:  [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(optarg, "unsigned-integer", strlen(optarg)))
data/jack-stdio-1.4/jack-stdout.c:375:49:  [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(optarg, "signed-integer", strlen(optarg)))

ANALYSIS SUMMARY:

Hits = 29
Lines analyzed = 1011 in approximately 0.05 seconds (20832 lines/second)
Physical Source Lines of Code (SLOC) = 740
Hits@level = [0]  39 [1]   8 [2]  19 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  68 [1+]  29 [2+]  21 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 91.8919 [1+] 39.1892 [2+] 28.3784 [3+] 2.7027 [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.