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/aseqjoy-0.0.2/aseqjoy.c

FINAL RESULTS:

data/aseqjoy-0.0.2/aseqjoy.c:68:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(port_name , "%s Output", client_name);
data/aseqjoy-0.0.2/aseqjoy.c:211:9:  [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.
		int i=getopt(argc, argv, "vhrd:0:1:2:3:");
data/aseqjoy-0.0.2/aseqjoy.c:61: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 client_name[32];
data/aseqjoy-0.0.2/aseqjoy.c:62: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 port_name[48];
data/aseqjoy-0.0.2/aseqjoy.c:67:2:  [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(client_name, "Joystick%i", joystick_no);
data/aseqjoy-0.0.2/aseqjoy.c:96: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 device[256];
data/aseqjoy-0.0.2/aseqjoy.c:97: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 name[NAME_LENGTH] = "Unknown";	
data/aseqjoy-0.0.2/aseqjoy.c:99:2:  [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(device, "/dev/js%i", joystick_no);
data/aseqjoy-0.0.2/aseqjoy.c:101:16:  [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 ((joy_fd = open(device, O_RDONLY)) < 0) {
data/aseqjoy-0.0.2/aseqjoy.c:103: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(device, "/dev/input/js%i", joystick_no);
data/aseqjoy-0.0.2/aseqjoy.c:105:17:  [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 ((joy_fd = open(device, O_RDONLY)) < 0) {	
data/aseqjoy-0.0.2/aseqjoy.c:227:20:  [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).
				controllers[0]=atoi(optarg);
data/aseqjoy-0.0.2/aseqjoy.c:231:20:  [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).
				controllers[1]=atoi(optarg);
data/aseqjoy-0.0.2/aseqjoy.c:235:20:  [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).
				controllers[2]=atoi(optarg);
data/aseqjoy-0.0.2/aseqjoy.c:239:20:  [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).
				controllers[3]=atoi(optarg);
data/aseqjoy-0.0.2/aseqjoy.c:251:17:  [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).
				joystick_no=atoi(optarg);
data/aseqjoy-0.0.2/aseqjoy.c:146:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(joy_fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 262 in approximately 0.03 seconds (9261 lines/second)
Physical Source Lines of Code (SLOC) = 183
Hits@level = [0]   9 [1]   1 [2]  14 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]  26 [1+]  17 [2+]  16 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 142.077 [1+] 92.8962 [2+] 87.4317 [3+] 10.929 [4+] 5.46448 [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.