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/joystick-1.7.0/utils/jscal.c
Examining data/joystick-1.7.0/utils/scancodes.h
Examining data/joystick-1.7.0/utils/ffmvforce.c
Examining data/joystick-1.7.0/utils/fftest.c
Examining data/joystick-1.7.0/utils/inputattach.c
Examining data/joystick-1.7.0/utils/evdev-joystick.c
Examining data/joystick-1.7.0/utils/axbtnmap.c
Examining data/joystick-1.7.0/utils/ffcfstress.c
Examining data/joystick-1.7.0/utils/axbtnmap.h
Examining data/joystick-1.7.0/utils/jstest.c
Examining data/joystick-1.7.0/utils/ffset.c
Examining data/joystick-1.7.0/utils/bitmaskros.h
Examining data/joystick-1.7.0/utils/serio-ids.h
Examining data/joystick-1.7.0/utils/gencodes.c

FINAL RESULTS:

data/joystick-1.7.0/utils/evdev-joystick.c:325:9:  [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.
    c = getopt_long(argc, argv, "h:l:s:e:d:m:M:f:a:", long_options, &option_index);
data/joystick-1.7.0/utils/jscal.c:690:7:  [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.
		t = getopt_long(argc, argv, "chpqu:s:vVt", long_options, &option_index);
data/joystick-1.7.0/utils/evdev-joystick.c:157:12:  [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((fd = open(evdev, O_RDONLY)) < 0)
data/joystick-1.7.0/utils/evdev-joystick.c:201:13:  [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 ((fd = open(evdev, O_RDONLY)) < 0)
data/joystick-1.7.0/utils/evdev-joystick.c:362:16:  [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).
        flat = atoi(optarg);
data/joystick-1.7.0/utils/evdev-joystick.c:367:15:  [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).
        min = atoi(optarg);
data/joystick-1.7.0/utils/evdev-joystick.c:372:15:  [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).
        max = atoi(optarg);
data/joystick-1.7.0/utils/evdev-joystick.c:377:16:  [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).
        fuzz = atoi(optarg);
data/joystick-1.7.0/utils/evdev-joystick.c:382:21:  [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).
        axisindex = atoi(optarg);
data/joystick-1.7.0/utils/ffcfstress.c:89:25:  [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).
			        axis_index = atoi(argv[++i]); 
data/joystick-1.7.0/utils/ffcfstress.c:131: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 key_bits[1 + KEY_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/ffcfstress.c:132: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 abs_bits[1 + ABS_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/ffcfstress.c:133: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 ff_bits[1 + FF_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/ffcfstress.c:139:18:  [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).
	device_handle = open(device_name,O_RDWR|O_NONBLOCK);
data/joystick-1.7.0/utils/ffmvforce.c:178: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).
	ff_fd = open(dev_name, O_RDWR);
data/joystick-1.7.0/utils/ffset.c:56:11:  [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).
			gain = atoi(argv[i]);
data/joystick-1.7.0/utils/ffset.c:63: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).
			autocenter = atoi(argv[i]);
data/joystick-1.7.0/utils/ffset.c:75:7:  [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(device_file_name, O_RDWR);
data/joystick-1.7.0/utils/fftest.c:58: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 relFeatures[1 + REL_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/fftest.c:59: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 absFeatures[1 + ABS_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/fftest.c:60: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 ffFeatures[1 + FF_MAX/8/sizeof(unsigned char)];
data/joystick-1.7.0/utils/fftest.c:79:7:  [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(device_file_name, O_RDWR);
data/joystick-1.7.0/utils/inputattach.c:186: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 r[64];
data/joystick-1.7.0/utils/inputattach.c:283: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 response[35] = {
data/joystick-1.7.0/utils/inputattach.c:302: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 c[10];
data/joystick-1.7.0/utils/inputattach.c:359: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 cmd[6] = {0xF1, 0x00, 0x00, 0x00, 0x00, 0x0E};
data/joystick-1.7.0/utils/inputattach.c:360: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[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
data/joystick-1.7.0/utils/inputattach.c:408: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 cmd[2], data;
data/joystick-1.7.0/utils/inputattach.c:544: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 c[10];
data/joystick-1.7.0/utils/inputattach.c:579: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 buf[256];
data/joystick-1.7.0/utils/inputattach.c:704: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 packet_alive_query[3] = { 0x0a, 0x01, 'A' };
data/joystick-1.7.0/utils/inputattach.c:705: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 packet_fw_ver[3] = { 0x0a, 0x01, 'D' };
data/joystick-1.7.0/utils/inputattach.c:706: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 packet_ctrl_type[3] = { 0x0a, 0x01, 'E' };
data/joystick-1.7.0/utils/inputattach.c:707: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 response[128];
data/joystick-1.7.0/utils/inputattach.c:758: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 response[128];
data/joystick-1.7.0/utils/inputattach.c:790: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 cmd[10] = { 'U', 'i', 0, 0, 0, 0, 0, 0, 0, 0 };
data/joystick-1.7.0/utils/inputattach.c:791: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 resp[20];
data/joystick-1.7.0/utils/inputattach.c:1012:8:  [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.
	const char *device[MAX_DEVS] = { NULL, NULL, NULL, NULL };
data/joystick-1.7.0/utils/inputattach.c:1081: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).
			baud[argidx] = atoi(argv[++i]);
data/joystick-1.7.0/utils/inputattach.c:1153:8:  [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(device[i], O_RDWR | O_NOCTTY | O_NONBLOCK);
data/joystick-1.7.0/utils/jscal.c:729:12:  [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 ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
data/joystick-1.7.0/utils/jstest.c:53: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 *axis_names[ABS_MAX + 1] = {
data/joystick-1.7.0/utils/jstest.c:61: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 *button_names[KEY_MAX - BTN_MISC + 1] = {
data/joystick-1.7.0/utils/jstest.c:98: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/joystick-1.7.0/utils/jstest.c:116:12:  [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 ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
data/joystick-1.7.0/utils/evdev-joystick.c:102:16:  [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).
  size_t len = strlen("event-joystick");
data/joystick-1.7.0/utils/evdev-joystick.c:106:21:  [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).
    size_t devlen = strlen(dp->d_name);
data/joystick-1.7.0/utils/ffcfstress.c:290:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(device_handle,&event,sizeof(event))==sizeof(event)) {
data/joystick-1.7.0/utils/ffcfstress.c:357: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((unsigned long)(1000000.0/update_rate));
data/joystick-1.7.0/utils/inputattach.c:67:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, c, 1) != 1)
data/joystick-1.7.0/utils/inputattach.c:386:2:  [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 * 1000); /* 100 ms */
data/joystick-1.7.0/utils/inputattach.c:429:2:  [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(15 * 1000); /* 15 ms */	
data/joystick-1.7.0/utils/inputattach.c:583:2:  [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(400000);
data/joystick-1.7.0/utils/inputattach.c:590:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(fd, buf, sizeof(buf)) == sizeof(buf));
data/joystick-1.7.0/utils/inputattach.c:634:2:  [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(250 * 1000);
data/joystick-1.7.0/utils/inputattach.c:637:2:  [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(75 * 1000);
data/joystick-1.7.0/utils/inputattach.c:642:2:  [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(250 * 1000);
data/joystick-1.7.0/utils/inputattach.c:645:2:  [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(75 * 1000);
data/joystick-1.7.0/utils/inputattach.c:650:2:  [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(250 * 1000);
data/joystick-1.7.0/utils/inputattach.c:653:2:  [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(75 * 1000);
data/joystick-1.7.0/utils/inputattach.c:656:2:  [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(30 * 1000);
data/joystick-1.7.0/utils/inputattach.c:1235:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		i = read(fd, NULL, 0);
data/joystick-1.7.0/utils/jscal.c:105:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(d, &ev, sizeof(struct js_event)) == sizeof(struct js_event))
data/joystick-1.7.0/utils/jscal.c:115:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(0, &buf, 1);
data/joystick-1.7.0/utils/jscal.c:643:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(fd, &ev, sizeof(struct js_event)) == sizeof(struct js_event)) {
data/joystick-1.7.0/utils/jstest.c:169:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(fd, &js, JS_RETURN) != JS_RETURN) {
data/joystick-1.7.0/utils/jstest.c:179:4:  [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/joystick-1.7.0/utils/jstest.c:198:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {
data/joystick-1.7.0/utils/jstest.c:240:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {
data/joystick-1.7.0/utils/jstest.c:264:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while (read(fd, &js, sizeof(struct js_event)) == sizeof(struct js_event))  {
data/joystick-1.7.0/utils/jstest.c:274:4:  [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/joystick-1.7.0/utils/jstest.c:298:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {

ANALYSIS SUMMARY:

Hits = 72
Lines analyzed = 4849 in approximately 0.22 seconds (22418 lines/second)
Physical Source Lines of Code (SLOC) = 3528
Hits@level = [0] 314 [1]  27 [2]  43 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+] 386 [1+]  72 [2+]  45 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 109.41 [1+] 20.4082 [2+] 12.7551 [3+] 0.566893 [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.