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/xf86-input-wacom-0.34.99.1/include/Xwacom.h
Examining data/xf86-input-wacom-0.34.99.1/include/isdv4.h
Examining data/xf86-input-wacom-0.34.99.1/include/wacom-properties.h
Examining data/xf86-input-wacom-0.34.99.1/include/wacom-util.h
Examining data/xf86-input-wacom-0.34.99.1/src/wcmCommon.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmFilter.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmFilter.h
Examining data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmTouchFilter.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmTouchFilter.h
Examining data/xf86-input-wacom-0.34.99.1/src/wcmUSB.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c
Examining data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c
Examining data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c
Examining data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.h
Examining data/xf86-input-wacom-0.34.99.1/src/xf86WacomDefs.h
Examining data/xf86-input-wacom-0.34.99.1/test/fake-symbols.c
Examining data/xf86-input-wacom-0.34.99.1/test/fake-symbols.h
Examining data/xf86-input-wacom-0.34.99.1/test/wacom-tests.c
Examining data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-debugger.c
Examining data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-inputattach.c
Examining data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c
Examining data/xf86-input-wacom-0.34.99.1/tools/tools-shared.h
Examining data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c

FINAL RESULTS:

data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c:486:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf(fname, DEV_INPUT_EVENT, i);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.h:39:20:  [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.
	do { if (verbose) printf("... " __VA_ARGS__); } while(0)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:44:15:  [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.
	if (verbose) fprintf(stderr, "... " __VA_ARGS__)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:666:85:  [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.
static void print_value(param_t *param, const char *msg, ...) __attribute__((format(printf, 2, 3)));
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:679:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:687:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:692:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:700:99:  [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.
static void print_button_value(param_t *param, int n, const char *msg, ...) __attribute__((format(printf, 3, 4)));
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:711:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:717:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:722:4:  [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(msg, va_args);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2031:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(str, "%c%s ", press_str,
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2035: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(buff, str);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2700:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
						sprintf(&str[strlen(str)], "%s", val ?  "off" : "on");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2702:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
						sprintf(&str[strlen(str)], "%s", val ?  "on" : "off");
data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-debugger.c:77:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "+hvVb:", options, &optidx)) != -1) {
data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-inputattach.c:144:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "h", options, &optidx)) != -1) {
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2805:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "+hvVd:sx", options, &optidx)) != -1) {
data/xf86-input-wacom-0.34.99.1/src/wcmCommon.c:44: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(v, valuators, nvals * sizeof(int));
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:375: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 baseA[len], subA[len], toolA[len];
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:376: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 baseB[len], subB[len], toolB[len];
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:467: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 id[BUFFER_SIZE];
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:342: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 data[BUFFER_SIZE];
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:590: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 buffer[10];
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:1003:9:  [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).
	file = fopen(sysfs_path, "r");
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:1053: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[15] = {0};
data/xf86-input-wacom-0.34.99.1/src/wcmUSB.c:363: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 *usbnames[ARRAY_SIZE(WacomModelDesc)] = {0};
data/xf86-input-wacom-0.34.99.1/src/wcmUSB.c:386: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(usbnames[i], "usb:%04x:%04x", m->vendor_id, m->model_id);
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:693: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 type[strlen(tok) + 1];
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:694: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 name[strlen(tok) + 1];
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:1009: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 b[12];
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:1010: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(b, "Button%d", i+1);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:132:54:  [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.
static void wcmResetAction(InputInfoPtr pInfo, const char *name, int index,
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:138: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(action[index], *new_action, sizeof(*new_action));
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:148: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[64];
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:150:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name, "Wacom button action %d", button);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:159: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[64];
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:161:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name, "Wacom strip action %d", index);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:171: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[64];
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:173:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name, "Wacom wheel action %d", index);
data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c:320: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 butmap[WCM_MAX_BUTTONS+1];
data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c:442:15:  [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).
	SYSCALL(fd = open(fname, O_RDONLY));
data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c:483: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 fname[64];
data/xf86-input-wacom-0.34.99.1/src/xf86WacomDefs.h:466: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 buffer[BUFFER_SIZE]; /* data read from device */
data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-debugger.c:86: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).
				baudrate = atoi(optarg);
data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-inputattach.c:154:30:  [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).
				baudrate = (unsigned int)atoi(optarg);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:56: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_NOCTTY);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:138: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 buffer[10];
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:268: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 buffer[ISDV4_PKGLEN_TPCCTL];
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:340: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 buffer[10];
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:409: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 buffer[256];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:778:8:  [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).
		id = atoi(name);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1350: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 *nargv[1];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1356: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(nargv[0], "button +%d", n);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1961: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 buff[1024] = {0};
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1998: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 str[32] = {0};
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2009:6:  [2] (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). Risk is low because the
  source is a constant string.
					strcat(buff, "key ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2015:6:  [2] (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). Risk is low because the
  source is a constant string.
					strcat(buff, "button ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2019:5:  [2] (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). Risk is low because the
  source is a constant string.
				strcat(buff, "modetoggle ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2022:5:  [2] (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). Risk is low because the
  source is a constant string.
				strcat(buff, "displaytoggle ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2034: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(str, "%c%d ", press_str, detail);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2142:12:  [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 map[nmap];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2588:14:  [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 map[nmap];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2593:6:  [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 tmparg[16];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2598:6:  [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(tmparg, "%d", i);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2659: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 str[100] = {0};
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2704:6:  [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(&str[strlen(str)], "%d", val);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2715:5:  [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(&str[strlen(str)], "%ld", ldata[param->prop_offset + i]);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2902: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 buff[5];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2924: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(buff, "%c", i);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2933: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 buff[5];
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2939: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(buff, "%c", i);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2946: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(buff, "%c", i);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2954: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(buff, "%c", i);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2960: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(buff, "%c", i);
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:331:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(subdevice, b+1, len-1);
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:338:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(tool, a+1, len-1);
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:340:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(basename, name, len-1);
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:386: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(subA) != 0 && strlen(subB) != 0)
data/xf86-input-wacom-0.34.99.1/src/wcmConfig.c:386: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).
		if (strlen(subA) != 0 && strlen(subB) != 0)
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:271:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(id, "ISDV4", id_len);
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:591:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (read(pInfo->fd, buffer, sizeof(buffer)) > 0)
data/xf86-input-wacom-0.34.99.1/src/wcmISDV4.c:846: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).
		len = xf86WriteSerial(pInfo->fd, request, strlen(request));
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:90: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).
	if (!lsource || !strlen(lsource)) goto ret;
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:171: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).
				else if (!dsource || !strlen(dsource)) /* an user defined type */
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:430: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(ser->name) > 0)
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:693:14:  [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 type[strlen(tok) + 1];
data/xf86-input-wacom-0.34.99.1/src/wcmValidateDevice.c:694:14:  [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 name[strlen(tok) + 1];
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:136: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).
	handler[index] = MakeAtom(name, strlen(name), TRUE);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:221: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).
	atom = MakeAtom(name, strlen(name), TRUE);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:238: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).
	prop_devnode = MakeAtom(XI_PROP_DEVICE_NODE, strlen(XI_PROP_DEVICE_NODE), TRUE);
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:240:22:  [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).
				PropModeReplace, strlen(common->device_path),
data/xf86-input-wacom-0.34.99.1/src/wcmXCommand.c:309:41:  [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).
	values[0] = MakeAtom(pInfo->type_name, strlen(pInfo->type_name), TRUE);
data/xf86-input-wacom-0.34.99.1/src/xf86Wacom.c:500:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100*1000);
data/xf86-input-wacom-0.34.99.1/tools/isdv4-serial-inputattach.c:210:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = (int)read(fd, NULL, 0); /* warning fix only, ignore error */
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:120:32:  [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).
		l = write(fd, &command[len], strlen(command) - len);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:130: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).
	} while (errno == EAGAIN && len < strlen(command));
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:132:18:  [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 !(len == strlen(command));
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:144: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(250000);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:150:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (read(fd, buffer, sizeof(buffer)) > 0)
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:220:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int l = read(fd, &buffer[len], min_len);
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:348:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, buffer, sizeof(buffer)) < 1 && errno != EAGAIN)
data/xf86-input-wacom-0.34.99.1/tools/tools-shared.c:422:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		r = read(fd, &buffer[dlen], sizeof(buffer) - dlen);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:532:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(name, d->name, strlen(d->name)) == 0)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:764: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).
	int		len = strlen(name);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1092: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(btn) > 1)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1214: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(key) > 1)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1235: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).
			if (strlen(key) > 1)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1705: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(value) != strlen(prefix) + 1 ||
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1705: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).
		if (strlen(value) != strlen(prefix) + 1 ||
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1706: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).
		    strncasecmp(value, prefix, strlen(prefix)) != 0)
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:1709:25:  [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_value = value[strlen(prefix)] - '0';
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2700: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).
						sprintf(&str[strlen(str)], "%s", val ?  "off" : "on");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2702: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).
						sprintf(&str[strlen(str)], "%s", val ?  "on" : "off");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2704: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).
					sprintf(&str[strlen(str)], "%d", val);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2707:6:  [1] (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). Risk is low because the
  source is a constant character.
					strcat(str, " ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2715:18:  [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(&str[strlen(str)], "%ld", ldata[param->prop_offset + i]);
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2718:6:  [1] (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). Risk is low because the
  source is a constant character.
					strcat(str, " ");
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2736:15:  [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(buf)+1;
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2767:10:  [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).
		len -= strlen(buf) + 1;
data/xf86-input-wacom-0.34.99.1/tools/xsetwacom.c:2768:10:  [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).
		buf += strlen(buf) + 1;

ANALYSIS SUMMARY:

Hits = 121
Lines analyzed = 16011 in approximately 0.45 seconds (35786 lines/second)
Physical Source Lines of Code (SLOC) = 11131
Hits@level = [0] 138 [1]  46 [2]  57 [3]   3 [4]  15 [5]   0
Hits@level+ = [0+] 259 [1+] 121 [2+]  75 [3+]  18 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 23.2683 [1+] 10.8705 [2+] 6.73794 [3+] 1.61711 [4+] 1.34759 [5+]   0
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.