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/libinput-1.16.3/include/linux/freebsd/input-event-codes.h
Examining data/libinput-1.16.3/include/linux/freebsd/input.h
Examining data/libinput-1.16.3/include/linux/input.h
Examining data/libinput-1.16.3/include/linux/linux/input-event-codes.h
Examining data/libinput-1.16.3/include/linux/linux/input.h
Examining data/libinput-1.16.3/include/valgrind/valgrind.h
Examining data/libinput-1.16.3/src/builddir.h
Examining data/libinput-1.16.3/src/evdev-debounce.c
Examining data/libinput-1.16.3/src/evdev-fallback.c
Examining data/libinput-1.16.3/src/evdev-fallback.h
Examining data/libinput-1.16.3/src/evdev-middle-button.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad-buttons.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad-edge-scroll.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad-gestures.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad-tap.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad-thumb.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad.c
Examining data/libinput-1.16.3/src/evdev-mt-touchpad.h
Examining data/libinput-1.16.3/src/evdev-tablet-pad-leds.c
Examining data/libinput-1.16.3/src/evdev-tablet-pad.c
Examining data/libinput-1.16.3/src/evdev-tablet-pad.h
Examining data/libinput-1.16.3/src/evdev-tablet.c
Examining data/libinput-1.16.3/src/evdev-tablet.h
Examining data/libinput-1.16.3/src/evdev-totem.c
Examining data/libinput-1.16.3/src/evdev.c
Examining data/libinput-1.16.3/src/evdev.h
Examining data/libinput-1.16.3/src/filter-flat.c
Examining data/libinput-1.16.3/src/filter-low-dpi.c
Examining data/libinput-1.16.3/src/filter-mouse.c
Examining data/libinput-1.16.3/src/filter-private.h
Examining data/libinput-1.16.3/src/filter-tablet.c
Examining data/libinput-1.16.3/src/filter-touchpad-flat.c
Examining data/libinput-1.16.3/src/filter-touchpad-x230.c
Examining data/libinput-1.16.3/src/filter-touchpad.c
Examining data/libinput-1.16.3/src/filter-trackpoint.c
Examining data/libinput-1.16.3/src/filter.c
Examining data/libinput-1.16.3/src/filter.h
Examining data/libinput-1.16.3/src/libinput-private.h
Examining data/libinput-1.16.3/src/libinput-util.h
Examining data/libinput-1.16.3/src/libinput-versionsort.h
Examining data/libinput-1.16.3/src/libinput.c
Examining data/libinput-1.16.3/src/libinput.h
Examining data/libinput-1.16.3/src/path-seat.c
Examining data/libinput-1.16.3/src/quirks.c
Examining data/libinput-1.16.3/src/quirks.h
Examining data/libinput-1.16.3/src/timer.c
Examining data/libinput-1.16.3/src/timer.h
Examining data/libinput-1.16.3/src/udev-seat.c
Examining data/libinput-1.16.3/src/udev-seat.h
Examining data/libinput-1.16.3/src/util-bits.h
Examining data/libinput-1.16.3/src/util-input-event.h
Examining data/libinput-1.16.3/src/util-list.c
Examining data/libinput-1.16.3/src/util-list.h
Examining data/libinput-1.16.3/src/util-macros.h
Examining data/libinput-1.16.3/src/util-matrix.h
Examining data/libinput-1.16.3/src/util-prop-parsers.c
Examining data/libinput-1.16.3/src/util-prop-parsers.h
Examining data/libinput-1.16.3/src/util-ratelimit.c
Examining data/libinput-1.16.3/src/util-ratelimit.h
Examining data/libinput-1.16.3/src/util-strings.c
Examining data/libinput-1.16.3/src/util-strings.h
Examining data/libinput-1.16.3/src/util-time.h
Examining data/libinput-1.16.3/test/build-cxx.cc
Examining data/libinput-1.16.3/test/build-pedantic.c
Examining data/libinput-1.16.3/test/check-double-macros.h
Examining data/libinput-1.16.3/test/litest-device-absinfo-override.c
Examining data/libinput-1.16.3/test/litest-device-acer-hawaii-keyboard.c
Examining data/libinput-1.16.3/test/litest-device-acer-hawaii-touchpad.c
Examining data/libinput-1.16.3/test/litest-device-aiptek-tablet.c
Examining data/libinput-1.16.3/test/litest-device-alps-3fg.c
Examining data/libinput-1.16.3/test/litest-device-alps-dualpoint.c
Examining data/libinput-1.16.3/test/litest-device-alps-semi-mt.c
Examining data/libinput-1.16.3/test/litest-device-anker-mouse-kbd.c
Examining data/libinput-1.16.3/test/litest-device-apple-appletouch.c
Examining data/libinput-1.16.3/test/litest-device-apple-internal-keyboard.c
Examining data/libinput-1.16.3/test/litest-device-apple-magicmouse.c
Examining data/libinput-1.16.3/test/litest-device-asus-rog-gladius.c
Examining data/libinput-1.16.3/test/litest-device-atmel-hover.c
Examining data/libinput-1.16.3/test/litest-device-bcm5974.c
Examining data/libinput-1.16.3/test/litest-device-calibrated-touchscreen.c
Examining data/libinput-1.16.3/test/litest-device-cyborg-rat-5.c
Examining data/libinput-1.16.3/test/litest-device-dell-canvas-totem-touch.c
Examining data/libinput-1.16.3/test/litest-device-dell-canvas-totem.c
Examining data/libinput-1.16.3/test/litest-device-elan-tablet.c
Examining data/libinput-1.16.3/test/litest-device-elantech-touchpad.c
Examining data/libinput-1.16.3/test/litest-device-generic-singletouch.c
Examining data/libinput-1.16.3/test/litest-device-gpio-keys.c
Examining data/libinput-1.16.3/test/litest-device-hp-wmi-hotkeys.c
Examining data/libinput-1.16.3/test/litest-device-huion-pentablet.c
Examining data/libinput-1.16.3/test/litest-device-ignored-mouse.c
Examining data/libinput-1.16.3/test/litest-device-keyboard-all-codes.c
Examining data/libinput-1.16.3/test/litest-device-keyboard-razer-blackwidow.c
Examining data/libinput-1.16.3/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c
Examining data/libinput-1.16.3/test/litest-device-keyboard-razer-blade-stealth.c
Examining data/libinput-1.16.3/test/litest-device-keyboard.c
Examining data/libinput-1.16.3/test/litest-device-lid-switch-surface3.c
Examining data/libinput-1.16.3/test/litest-device-lid-switch.c
Examining data/libinput-1.16.3/test/litest-device-logitech-media-keyboard-elite.c
Examining data/libinput-1.16.3/test/litest-device-logitech-trackball.c
Examining data/libinput-1.16.3/test/litest-device-magic-trackpad.c
Examining data/libinput-1.16.3/test/litest-device-mouse-low-dpi.c
Examining data/libinput-1.16.3/test/litest-device-mouse-roccat.c
Examining data/libinput-1.16.3/test/litest-device-mouse-wheel-click-angle.c
Examining data/libinput-1.16.3/test/litest-device-mouse-wheel-click-count.c
Examining data/libinput-1.16.3/test/litest-device-mouse-wheel-tilt.c
Examining data/libinput-1.16.3/test/litest-device-mouse.c
Examining data/libinput-1.16.3/test/litest-device-ms-nano-transceiver-mouse.c
Examining data/libinput-1.16.3/test/litest-device-ms-surface-cover.c
Examining data/libinput-1.16.3/test/litest-device-nexus4-touch-screen.c
Examining data/libinput-1.16.3/test/litest-device-protocol-a-touch-screen.c
Examining data/libinput-1.16.3/test/litest-device-qemu-usb-tablet.c
Examining data/libinput-1.16.3/test/litest-device-sony-vaio-keys.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-hover.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-i2c.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-rmi4.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-st.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-t440.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-x1-carbon-3rd.c
Examining data/libinput-1.16.3/test/litest-device-synaptics-x220.c
Examining data/libinput-1.16.3/test/litest-device-tablet-mode-switch.c
Examining data/libinput-1.16.3/test/litest-device-thinkpad-extrabuttons.c
Examining data/libinput-1.16.3/test/litest-device-touch-screen.c
Examining data/libinput-1.16.3/test/litest-device-touchscreen-fuzz.c
Examining data/libinput-1.16.3/test/litest-device-touchscreen-invalid-range.c
Examining data/libinput-1.16.3/test/litest-device-touchscreen-mt-tool.c
Examining data/libinput-1.16.3/test/litest-device-trackpoint.c
Examining data/libinput-1.16.3/test/litest-device-uclogic-tablet.c
Examining data/libinput-1.16.3/test/litest-device-vmware-virtual-usb-mouse.c
Examining data/libinput-1.16.3/test/litest-device-wacom-bamboo-16fg-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-bamboo-2fg-finger.c
Examining data/libinput-1.16.3/test/litest-device-wacom-bamboo-2fg-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-bamboo-2fg-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-12wx-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-13hdt-finger.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-13hdt-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-13hdt-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-24hd-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-24hdt-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-pro-16-finger.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-pro-16-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-cintiq-pro-16-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-ekr.c
Examining data/libinput-1.16.3/test/litest-device-wacom-hid4800-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-intuos3-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-intuos5-finger.c
Examining data/libinput-1.16.3/test/litest-device-wacom-intuos5-pad.c
Examining data/libinput-1.16.3/test/litest-device-wacom-intuos5-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-isdv4-4200-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-isdv4-e6-finger.c
Examining data/libinput-1.16.3/test/litest-device-wacom-isdv4-e6-pen.c
Examining data/libinput-1.16.3/test/litest-device-wacom-mobilestudio-pro-pad.c
Examining data/libinput-1.16.3/test/litest-device-waltop-tablet.c
Examining data/libinput-1.16.3/test/litest-device-wheel-only.c
Examining data/libinput-1.16.3/test/litest-device-xen-virtual-pointer.c
Examining data/libinput-1.16.3/test/litest-device-yubikey.c
Examining data/libinput-1.16.3/test/litest-int.h
Examining data/libinput-1.16.3/test/litest-selftest.c
Examining data/libinput-1.16.3/test/litest.c
Examining data/libinput-1.16.3/test/litest.h
Examining data/libinput-1.16.3/test/test-builddir-lookup.c
Examining data/libinput-1.16.3/test/test-device.c
Examining data/libinput-1.16.3/test/test-gestures.c
Examining data/libinput-1.16.3/test/test-keyboard.c
Examining data/libinput-1.16.3/test/test-library-version.c
Examining data/libinput-1.16.3/test/test-log.c
Examining data/libinput-1.16.3/test/test-misc.c
Examining data/libinput-1.16.3/test/test-pad.c
Examining data/libinput-1.16.3/test/test-path.c
Examining data/libinput-1.16.3/test/test-pointer.c
Examining data/libinput-1.16.3/test/test-quirks.c
Examining data/libinput-1.16.3/test/test-switch.c
Examining data/libinput-1.16.3/test/test-tablet.c
Examining data/libinput-1.16.3/test/test-totem.c
Examining data/libinput-1.16.3/test/test-touch.c
Examining data/libinput-1.16.3/test/test-touchpad-buttons.c
Examining data/libinput-1.16.3/test/test-touchpad-tap.c
Examining data/libinput-1.16.3/test/test-touchpad.c
Examining data/libinput-1.16.3/test/test-trackball.c
Examining data/libinput-1.16.3/test/test-trackpoint.c
Examining data/libinput-1.16.3/test/test-udev.c
Examining data/libinput-1.16.3/test/test-util-includes.c
Examining data/libinput-1.16.3/test/test-utils.c
Examining data/libinput-1.16.3/tools/libinput-analyze.c
Examining data/libinput-1.16.3/tools/libinput-debug-events.c
Examining data/libinput-1.16.3/tools/libinput-debug-gui.c
Examining data/libinput-1.16.3/tools/libinput-debug-tablet.c
Examining data/libinput-1.16.3/tools/libinput-list-devices.c
Examining data/libinput-1.16.3/tools/libinput-measure.c
Examining data/libinput-1.16.3/tools/libinput-quirks.c
Examining data/libinput-1.16.3/tools/libinput-record.c
Examining data/libinput-1.16.3/tools/libinput-tool.c
Examining data/libinput-1.16.3/tools/ptraccel-debug.c
Examining data/libinput-1.16.3/tools/shared.c
Examining data/libinput-1.16.3/tools/shared.h
Examining data/libinput-1.16.3/udev/libinput-device-group.c
Examining data/libinput-1.16.3/udev/libinput-fuzz-extract.c
Examining data/libinput-1.16.3/udev/libinput-fuzz-to-zero.c
Examining data/libinput-1.16.3/udev/test-libinput-fuzz-extract.c

FINAL RESULTS:

data/libinput-1.16.3/src/builddir.h:47:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	nread = readlink("/proc/self/exe", execdir, sizeof(execdir) - 1);
data/libinput-1.16.3/test/litest.c:1380:23:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	litest_assert_int_ne(chmod(file->path, 0644), -1);
data/libinput-1.16.3/test/litest.c:1548:24:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		litest_assert_int_ne(chmod(tmpdir, 0755), -1);
data/libinput-1.16.3/src/evdev-mt-touchpad.c:1920:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(&buf[strlen(buf)],
data/libinput-1.16.3/src/libinput-util.h:63:2:  [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(__VA_ARGS__); \
data/libinput-1.16.3/src/libinput.c:261:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/libinput-1.16.3/src/libinput.h:38:26:  [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.
	__attribute__ ((format (printf, _format, _args)))
data/libinput-1.16.3/src/util-strings.c:150:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, *s);
data/libinput-1.16.3/src/util-strings.c:153:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(str, joiner);
data/libinput-1.16.3/src/util-strings.h:98:25:  [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.
__attribute__ ((format (printf, 2, 3)))
data/libinput-1.16.3/test/litest.c:108:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define litest_log(...) fprintf(stderr, __VA_ARGS__)
data/libinput-1.16.3/test/litest.c:109:37:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define litest_vlog(format_, args_) vfprintf(stderr, format_, args_)
data/libinput-1.16.3/test/litest.c:141:3:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execlp("gstack", "gstack", pid, NULL);
data/libinput-1.16.3/test/litest.c:329:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	ret = system(command);
data/libinput-1.16.3/test/litest.c:714:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/libinput-1.16.3/test/litest.c:716:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, ANSI_NORMAL);
data/libinput-1.16.3/test/litest.c:930:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/libinput-1.16.3/test/litest.c:4496:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access("/dev/uinput", F_OK) == -1 &&
data/libinput-1.16.3/test/litest.c:4497:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	    access("/dev/input/uinput", F_OK) == -1) {
data/libinput-1.16.3/test/test-quirks.c:40:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/libinput-1.16.3/tools/libinput-debug-events.c:54:40:  [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.
#define printq(...) ({ if (!be_quiet)  printf(__VA_ARGS__); })
data/libinput-1.16.3/tools/libinput-debug-gui.c:184:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, args);
data/libinput-1.16.3/tools/libinput-debug-tablet.c:86:6:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	n = vprintf(format, args);
data/libinput-1.16.3/tools/libinput-debug-tablet.c:481:3:  [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(ANSI_LEFT, 1000);
data/libinput-1.16.3/tools/libinput-debug-tablet.c:482:3:  [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(ANSI_UP, lines_printed);
data/libinput-1.16.3/tools/libinput-quirks.c:70:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(out, buf, args);
data/libinput-1.16.3/tools/shared.c:60:4:  [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(ANSI_RED);
data/libinput-1.16.3/tools/shared.c:62:4:  [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(ANSI_HIGHLIGHT);
data/libinput-1.16.3/tools/shared.c:65:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/libinput-1.16.3/tools/shared.c:68:3:  [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(ANSI_NORMAL);
data/libinput-1.16.3/tools/shared.c:560:7:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	rc = execvp(executable, argv);
data/libinput-1.16.3/src/evdev-tablet.c:2441:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
data/libinput-1.16.3/src/libinput.c:1809:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	data_path = getenv("LIBINPUT_QUIRKS_DIR");
data/libinput-1.16.3/src/libinput.c:1976:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!getenv("LIBINPUT_RUNNING_TEST_SUITE") &&
data/libinput-1.16.3/src/quirks.c:357:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
data/libinput-1.16.3/src/quirks.c:394:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
data/libinput-1.16.3/test/litest.c:1011:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	data_path = getenv("LIBINPUT_QUIRKS_DIR");
data/libinput-1.16.3/test/litest.c:1253:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("LITEST_VERBOSE"))
data/libinput-1.16.3/test/litest.c:4325:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((jobs_env = getenv("LITEST_JOBS"))) {
data/libinput-1.16.3/test/litest.c:4336: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.
		c = getopt_long(argc, argv, "j:", opts, &option_index);
data/libinput-1.16.3/test/litest.c:4518:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    getenv("CK_FORK") == NULL &&
data/libinput-1.16.3/tools/libinput-analyze.c:49: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.
		c = getopt_long(argc, argv, "+h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-debug-events.c:1001: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.
		c = getopt_long(argc, argv, "h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-debug-gui.c:812:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
data/libinput-1.16.3/tools/libinput-debug-gui.c:1555: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.
		c = getopt_long(argc, argv, "h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-debug-tablet.c:537: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.
		c = getopt_long(argc, argv, "h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-measure.c:49: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.
		c = getopt_long(argc, argv, "+h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-quirks.c:116: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.
		c = getopt_long(argc, argv, "h", opts, &option_index);
data/libinput-1.16.3/tools/libinput-record.c:2475: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.
		c = getopt_long(argc, argv, "ho:", opts, &option_index);
data/libinput-1.16.3/tools/libinput-tool.c:84: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.
		c = getopt_long(argc, argv, "+h", opts, &option_index);
data/libinput-1.16.3/tools/ptraccel-debug.c:256: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.
		c = getopt_long(argc, argv, "",
data/libinput-1.16.3/tools/shared.c:518:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *path = getenv("PATH");
data/libinput-1.16.3/src/builddir.h:38: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 execdir[PATH_MAX] = {0};
data/libinput-1.16.3/src/evdev-debounce.c:566: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 timer_name[64];
data/libinput-1.16.3/src/evdev-fallback.c:1680: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 timer_name[64];
data/libinput-1.16.3/src/evdev-fallback.h:224: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(dispatch->last_hw_key_mask,
data/libinput-1.16.3/src/evdev-middle-button.c:703: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad-buttons.c:967: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad-edge-scroll.c:310: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad-gestures.c:868: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad-tap.c:1206: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad.c:1913: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[1024] = {0};
data/libinput-1.16.3/src/evdev-mt-touchpad.c:3341: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 timer_name[64];
data/libinput-1.16.3/src/evdev-mt-touchpad.c:3388: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 timer_name[64];
data/libinput-1.16.3/src/evdev-tablet-pad-leds.c:76: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[4] = {0};
data/libinput-1.16.3/src/evdev-tablet-pad-leds.c:116: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 path[PATH_MAX];
data/libinput-1.16.3/src/evdev-tablet-pad-leds.c:282: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 syspath[PATH_MAX];
data/libinput-1.16.3/src/evdev-tablet-pad.c:472: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(&pad->prev_button_state,
data/libinput-1.16.3/src/evdev-tablet-pad.h:47: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 bits[NCHARS(KEY_CNT)];
data/libinput-1.16.3/src/evdev-tablet.c:704: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 tmp[sizeof(tablet->changed_axes)] = {0};
data/libinput-1.16.3/src/evdev-tablet.c:1984: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(&tablet->prev_button_state,
data/libinput-1.16.3/src/evdev-tablet.h:53: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 bits[NCHARS(KEY_CNT)];
data/libinput-1.16.3/src/evdev-tablet.h: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 changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
data/libinput-1.16.3/src/evdev-tablet.h:69: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 axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
data/libinput-1.16.3/src/evdev-totem.c:40: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 changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
data/libinput-1.16.3/src/evdev-totem.c:268: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 tmp[sizeof(slot->changed_axes)] = {0};
data/libinput-1.16.3/src/evdev.c:791: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 timer_name[64];
data/libinput-1.16.3/src/evdev.c:2126: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 fmt[strlen(format) + strlen(prefix) + 1];
data/libinput-1.16.3/src/evdev.c:2408: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[32];
data/libinput-1.16.3/src/evdev.h:763: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[1024];
data/libinput-1.16.3/src/evdev.h:792: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[1024];
data/libinput-1.16.3/src/libinput-private.h:376: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 axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
data/libinput-1.16.3/src/libinput-private.h:377: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 buttons[NCHARS(KEY_MAX) + 1];
data/libinput-1.16.3/src/libinput.c:207: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 changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
data/libinput-1.16.3/src/quirks.c:389: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 compatible[1024];
data/libinput-1.16.3/src/quirks.c:397:7:  [2] (misc) fopen:
  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).
	fp = fopen(syspath, "r");
data/libinput-1.16.3/src/quirks.c:822: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 line[512];
data/libinput-1.16.3/src/quirks.c:833:7:  [2] (misc) fopen:
  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).
	fp = fopen(path, "r");
data/libinput-1.16.3/src/quirks.c:1001: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 path[PATH_MAX];
data/libinput-1.16.3/src/util-matrix.h:128: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(dest, &m, sizeof(m));
data/libinput-1.16.3/src/util-prop-parsers.c:177:34:  [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.
parse_calibration_property(const char *prop, float calibration_out[6])
data/libinput-1.16.3/src/util-prop-parsers.c:202: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(calibration_out, calibration, sizeof(calibration));
data/libinput-1.16.3/src/util-prop-parsers.c:383:4:  [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 stype[13] = {0}; /* EV_FF_STATUS + '\0' */
data/libinput-1.16.3/src/util-prop-parsers.c:396: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(events, evs, ncodes * sizeof *events);
data/libinput-1.16.3/src/util-prop-parsers.h:37:39:  [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.
bool parse_calibration_property(const char *prop, float calibration[6]);
data/libinput-1.16.3/test/litest.c:134: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 pid[8];
data/libinput-1.16.3/test/litest.c:139: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(pid, "%d", parent);
data/libinput-1.16.3/test/litest.c:146: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[1024];
data/libinput-1.16.3/test/litest.c:822: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(path, flags);
data/libinput-1.16.3/test/litest.c:1102:4:  [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 tname[256];
data/libinput-1.16.3/test/litest.c:1173: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 buf[1024] = {0};
data/libinput-1.16.3/test/litest.c:1374:9:  [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).
		out = open(file->path, O_CREAT|O_WRONLY, 0644);
data/libinput-1.16.3/test/litest.c:1388: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).
		in = open(src, O_RDONLY);
data/libinput-1.16.3/test/litest.c:1451: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 path[PATH_MAX];
data/libinput-1.16.3/test/litest.c:1462: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(path, O_CREAT|O_WRONLY, 0644);
data/libinput-1.16.3/test/litest.c:1495: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 dest[PATH_MAX];
data/libinput-1.16.3/test/litest.c:1496: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 src[PATH_MAX];
data/libinput-1.16.3/test/litest.c:1687: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(path, O_RDWR|O_NONBLOCK);
data/libinput-1.16.3/test/litest.c:1916: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 path[PATH_MAX];
data/libinput-1.16.3/test/litest.c:3269: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[512];
data/libinput-1.16.3/test/litest.c:3321: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(devnode, O_RDONLY);
data/libinput-1.16.3/test/litest.c:3362: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 path[PATH_MAX];
data/libinput-1.16.3/test/litest.c:4387: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).
			jobs = atoi(optarg);
data/libinput-1.16.3/test/litest.h:1164: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[40960];
data/libinput-1.16.3/test/test-keyboard.c:42: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_name[255];
data/libinput-1.16.3/test/test-keyboard.c:46: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_name, "litest Generic keyboard (%d)", i);
data/libinput-1.16.3/test/test-misc.c:39:11:  [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).
	int fd = open(path, flags);
data/libinput-1.16.3/test/test-misc.c:565: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 *strs[3];
data/libinput-1.16.3/test/test-misc.c:617: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(path, O_RDWR | O_NONBLOCK | O_CLOEXEC);
data/libinput-1.16.3/test/test-path.c:50: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(path, flags);
data/libinput-1.16.3/test/test-path.c:71:11:  [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).
	int fd = open(path, flags);
data/libinput-1.16.3/test/test-path.c:168:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(path);
data/libinput-1.16.3/test/test-pointer.c:785: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_name[255];
data/libinput-1.16.3/test/test-pointer.c:789: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_name, "litest Generic mouse (%d)", i);
data/libinput-1.16.3/test/test-quirks.c:53: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 dirname[PATH_MAX] = "/tmp/litest-quirk-test-XXXXXX";
data/libinput-1.16.3/test/test-quirks.c:65:8:  [2] (misc) fopen:
  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).
		fp = fopen(filename, "w+");
data/libinput-1.16.3/test/test-quirks.c:920: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[512];
data/libinput-1.16.3/test/test-switch.c:737: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(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/test/test-switch.c:786: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(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/test/test-switch.c:865: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(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/test/test-touch.c:542: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(path, flags);
data/libinput-1.16.3/test/test-udev.c:39: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(path, flags);
data/libinput-1.16.3/test/test-udev.c:137: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 seatname[258];
data/libinput-1.16.3/test/test-utils.c:50: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 write_bitfield[ARRAY_LENGTH(read_bitfield)] = {0};
data/libinput-1.16.3/test/test-utils.c:942:9:  [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 *results[10];
data/libinput-1.16.3/test/test-utils.c:1032: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 *strv[10];
data/libinput-1.16.3/tools/libinput-debug-events.c:970: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 *seat_or_devices[60] = {NULL};
data/libinput-1.16.3/tools/libinput-debug-gui.c:477: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 number[3];
data/libinput-1.16.3/tools/libinput-debug-gui.c:968: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_node, O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/tools/libinput-debug-gui.c:1526: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 *seat_or_device[2] = {"seat0", NULL};
data/libinput-1.16.3/tools/libinput-debug-tablet.c:94: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] = {0};
data/libinput-1.16.3/tools/libinput-debug-tablet.c:112: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 empty[termwidth];
data/libinput-1.16.3/tools/libinput-debug-tablet.c:263: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).
		int fd = open(devnode, O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/tools/libinput-debug-tablet.c:514: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 *seat_or_device[2] = {"seat0", NULL};
data/libinput-1.16.3/tools/libinput-list-devices.c:379: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 *seat[2] = {"seat0", NULL};
data/libinput-1.16.3/tools/libinput-quirks.c:46: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] = {0};
data/libinput-1.16.3/tools/libinput-record.c:60: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 msg[256];
data/libinput-1.16.3/tools/libinput-record.c:76: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 comment[200];
data/libinput-1.16.3/tools/libinput-record.c:158: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 fmt[1024];
data/libinput-1.16.3/tools/libinput-record.c:212: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 desc[1024];
data/libinput-1.16.3/tools/libinput-record.c:902: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 caps[10] = {0};
data/libinput-1.16.3/tools/libinput-record.c:1022: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 btn_buffer[30] = {0};
data/libinput-1.16.3/tools/libinput-record.c:1433: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 dmistr[2048] = "unknown";
data/libinput-1.16.3/tools/libinput-record.c:1439:14:  [2] (misc) fopen:
  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).
	osrelease = fopen("/etc/os-release", "r");
data/libinput-1.16.3/tools/libinput-record.c:1441:15:  [2] (misc) fopen:
  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).
		osrelease = fopen("/usr/lib/os-release", "r");
data/libinput-1.16.3/tools/libinput-record.c:1444: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 osrstr[256] = "unknown";
data/libinput-1.16.3/tools/libinput-record.c:1470:8:  [2] (misc) fopen:
  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).
	dmi = fopen("/sys/class/dmi/id/modalias", "r");
data/libinput-1.16.3/tools/libinput-record.c:1475:4:  [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(dmistr, "unknown");
data/libinput-1.16.3/tools/libinput-record.c:1726: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 syspath[PATH_MAX];
data/libinput-1.16.3/tools/libinput-record.c:1727: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 buf[1024];
data/libinput-1.16.3/tools/libinput-record.c:1748: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(syspath, O_RDONLY);
data/libinput-1.16.3/tools/libinput-record.c:1967: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 path[PATH_MAX];
data/libinput-1.16.3/tools/libinput-record.c:1974: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(path, O_RDONLY);
data/libinput-1.16.3/tools/libinput-record.c:2052: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[PATH_MAX];
data/libinput-1.16.3/tools/libinput-record.c:2059: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 suffix[64];
data/libinput-1.16.3/tools/libinput-record.c:2084: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).
		out_fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666);
data/libinput-1.16.3/tools/libinput-record.c:2304: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(d->devnode, O_RDONLY|O_NONBLOCK);
data/libinput-1.16.3/tools/libinput-record.c:2341:11:  [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).
	int fd = open(path, flags);
data/libinput-1.16.3/tools/ptraccel-debug.c:281: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).
			nevents = atoi(optarg);
data/libinput-1.16.3/tools/ptraccel-debug.c:347: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 buf[12];
data/libinput-1.16.3/tools/shared.c:251:11:  [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).
	int fd = open(path, flags);
data/libinput-1.16.3/tools/shared.c:519: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 new_path[PATH_MAX];
data/libinput-1.16.3/tools/shared.c:535: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 *argv[64] = {NULL};
data/libinput-1.16.3/tools/shared.c:536: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 executable[128];
data/libinput-1.16.3/tools/shared.c:609: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/libinput-1.16.3/tools/shared.h:95: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 match[256];
data/libinput-1.16.3/tools/shared.h:111: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 disable_pattern[64];
data/libinput-1.16.3/udev/libinput-device-group.c:161: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 group[1024];
data/libinput-1.16.3/udev/libinput-fuzz-extract.c:59: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(devnode, O_RDONLY);
data/libinput-1.16.3/udev/libinput-fuzz-extract.c:99: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/libinput-1.16.3/udev/libinput-fuzz-to-zero.c:52: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(devnode, O_RDWR);
data/libinput-1.16.3/src/evdev-mt-touchpad.c:1920: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).
		sprintf(&buf[strlen(buf)],
data/libinput-1.16.3/src/evdev-tablet-pad-leds.c:86:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(led->brightness_fd, buf, sizeof(buf) - 1);
data/libinput-1.16.3/src/evdev.c:2042:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(fd, &ev, sz) == (int)sz) {
data/libinput-1.16.3/src/evdev.c:2126:11:  [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).
	char fmt[strlen(format) + strlen(prefix) + 1];
data/libinput-1.16.3/src/evdev.c:2126:28:  [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).
	char fmt[strlen(format) + strlen(prefix) + 1];
data/libinput-1.16.3/src/path-seat.c:369:6:  [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 (strlen(path) > PATH_MAX) {
data/libinput-1.16.3/src/quirks.c:450:47:  [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).
	       strspn(value, "0123456789xABCDEF") == strlen(value) &&
data/libinput-1.16.3/src/quirks.c:476:9:  [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).
	assert(strlen(value) >= 1);
data/libinput-1.16.3/src/quirks.c:791:6:  [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 (strlen(key) == 0 || strlen(value) == 0)
data/libinput-1.16.3/src/quirks.c:791:26:  [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 (strlen(key) == 0 || strlen(value) == 0)
data/libinput-1.16.3/src/quirks.c:867:7:  [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 (strlen(line) == 0)
data/libinput-1.16.3/src/quirks.c:872: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).
		switch (line[strlen(line) - 1]) {
data/libinput-1.16.3/src/quirks.c:894:13:  [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 (line[strlen(line) - 1] != ']') {
data/libinput-1.16.3/src/quirks.c:1163:9:  [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).
	slen = strlen(m->name);
data/libinput-1.16.3/src/timer.c:170:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(libinput->timer.fd, &discard, sizeof(discard));
data/libinput-1.16.3/src/udev-seat.c:425:6:  [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 (strlen(seat_id) > 256) {
data/libinput-1.16.3/src/util-prop-parsers.c:386:8:  [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).
			    strlen(s) != (size_t)consumed ||
data/libinput-1.16.3/src/util-prop-parsers.c:429:6:  [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 (strlen(prop) > 24)
data/libinput-1.16.3/src/util-strings.c:138:11:  [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).
		slen += strlen(*s);
data/libinput-1.16.3/src/util-strings.c:142:9:  [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).
	assert(strlen(joiner) < 1000);
data/libinput-1.16.3/src/util-strings.c:146:24:  [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).
	slen += (count - 1) * strlen(joiner);
data/libinput-1.16.3/src/util-strings.h:182: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 slen = strlen(str);
data/libinput-1.16.3/src/util-strings.h:349: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 slen = strlen(str);
data/libinput-1.16.3/src/util-strings.h:350: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 suffixlen = strlen(suffix);
data/libinput-1.16.3/src/util-strings.h:363: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 prefixlen = strlen(prefix);
data/libinput-1.16.3/src/util-strings.h:365:45:  [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).
	return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false;
data/libinput-1.16.3/src/util-time.h:39: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(ms * 1000);
data/libinput-1.16.3/test/litest.c:158:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((nread = read(pipefd[0], buf, sizeof(buf) - 1)) > 0) {
data/libinput-1.16.3/test/litest.c:826:27:  [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 (strneq(path, prefix, strlen(prefix))) {
data/libinput-1.16.3/test/litest.c:1176:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((rc = read(pipes[f], buf, sizeof(buf) - 1)) > 0) {
data/libinput-1.16.3/test/litest.c:1370:5:  [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).
				strlen(file->path) -
data/libinput-1.16.3/test/litest.c:1383:12:  [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).
		length = strlen(header);
data/libinput-1.16.3/test/litest.c:1397:36:  [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 written = write(out, src, strlen(src));
data/libinput-1.16.3/test/litest.c:1398:33:  [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).
		litest_assert_int_eq(written, strlen(src));
data/libinput-1.16.3/test/litest.h:1165:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int n = read(fd, buf, 40960);
data/libinput-1.16.3/test/test-path.c:167:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(002);
data/libinput-1.16.3/test/test-path.c:495:19:  [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).
	ck_assert_int_gt(strlen(sysname), 1);
data/libinput-1.16.3/test/test-quirks.c:63:34:  [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).
		litest_assert_int_eq(rc, (int)(strlen(dirname) + 16));
data/libinput-1.16.3/test/test-udev.c:490:20:  [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).
		ck_assert_int_gt(strlen(sysname), 1);
data/libinput-1.16.3/tools/libinput-record.c:165:9:  [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).
	assert(strlen(format) > 1);
data/libinput-1.16.3/tools/libinput-record.c:1447:11:  [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).
			osrstr[strlen(osrstr) - 1] = '\0'; /* linebreak */
data/libinput-1.16.3/tools/libinput-record.c:1473:11:  [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).
			dmistr[strlen(dmistr) - 1] = '\0'; /* linebreak */
data/libinput-1.16.3/tools/libinput-record.c:1737:6:  [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).
	    strlen(dev->devnode) > strlen(prefix) + 2)
data/libinput-1.16.3/tools/libinput-record.c:1737:29:  [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).
	    strlen(dev->devnode) > strlen(prefix) + 2)
data/libinput-1.16.3/tools/libinput-record.c:1740:23:  [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).
	node = &dev->devnode[strlen(prefix)];
data/libinput-1.16.3/tools/libinput-record.c:1754:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((len = read(fd, buf, sizeof(buf))) > 0) {
data/libinput-1.16.3/tools/shared.c:386:6:  [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 (strlen(options->match) > 0 &&

ANALYSIS SUMMARY:

Hits = 228
Lines analyzed = 112475 in approximately 2.66 seconds (42264 lines/second)
Physical Source Lines of Code (SLOC) = 82098
Hits@level = [0] 261 [1]  47 [2] 129 [3]  21 [4]  28 [5]   3
Hits@level+ = [0+] 489 [1+] 228 [2+] 181 [3+]  52 [4+]  31 [5+]   3
Hits/KSLOC@level+ = [0+] 5.9563 [1+] 2.77717 [2+] 2.20468 [3+] 0.633389 [4+] 0.377598 [5+] 0.0365417
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.