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/can-utils-2020.02.04/bcmserver.c
Examining data/can-utils-2020.02.04/canframelen.c
Examining data/can-utils-2020.02.04/canframelen.h
Examining data/can-utils-2020.02.04/include/linux/can.h
Examining data/can-utils-2020.02.04/include/linux/can/bcm.h
Examining data/can-utils-2020.02.04/include/linux/can/error.h
Examining data/can-utils-2020.02.04/include/linux/can/gw.h
Examining data/can-utils-2020.02.04/include/linux/can/isotp.h
Examining data/can-utils-2020.02.04/include/linux/can/j1939.h
Examining data/can-utils-2020.02.04/include/linux/can/netlink.h
Examining data/can-utils-2020.02.04/include/linux/can/raw.h
Examining data/can-utils-2020.02.04/include/linux/can/vxcan.h
Examining data/can-utils-2020.02.04/include/linux/errqueue.h
Examining data/can-utils-2020.02.04/include/linux/net_tstamp.h
Examining data/can-utils-2020.02.04/include/linux/netlink.h
Examining data/can-utils-2020.02.04/lib.c
Examining data/can-utils-2020.02.04/lib.h
Examining data/can-utils-2020.02.04/libj1939.c
Examining data/can-utils-2020.02.04/libj1939.h
Examining data/can-utils-2020.02.04/log2long.c
Examining data/can-utils-2020.02.04/terminal.h
Examining data/can-utils-2020.02.04/asc2log.c
Examining data/can-utils-2020.02.04/canbusload.c
Examining data/can-utils-2020.02.04/candump.c
Examining data/can-utils-2020.02.04/canfdtest.c
Examining data/can-utils-2020.02.04/cangen.c
Examining data/can-utils-2020.02.04/cangw.c
Examining data/can-utils-2020.02.04/canlogserver.c
Examining data/can-utils-2020.02.04/canplayer.c
Examining data/can-utils-2020.02.04/cansniffer.c
Examining data/can-utils-2020.02.04/isotpdump.c
Examining data/can-utils-2020.02.04/isotpperf.c
Examining data/can-utils-2020.02.04/isotprecv.c
Examining data/can-utils-2020.02.04/isotpsend.c
Examining data/can-utils-2020.02.04/isotpserver.c
Examining data/can-utils-2020.02.04/isotpsniffer.c
Examining data/can-utils-2020.02.04/isotptun.c
Examining data/can-utils-2020.02.04/j1939acd.c
Examining data/can-utils-2020.02.04/can-calc-bit-timing.c
Examining data/can-utils-2020.02.04/j1939spy.c
Examining data/can-utils-2020.02.04/j1939sr.c
Examining data/can-utils-2020.02.04/log2asc.c
Examining data/can-utils-2020.02.04/slcan_attach.c
Examining data/can-utils-2020.02.04/slcand.c
Examining data/can-utils-2020.02.04/testj1939.c
Examining data/can-utils-2020.02.04/j1939cat.c
Examining data/can-utils-2020.02.04/slcanpty.c
Examining data/can-utils-2020.02.04/cansend.c

FINAL RESULTS:

data/can-utils-2020.02.04/asc2log.c:235:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			    (sscanf(buf, "base %s timestamps %s", tmp1, tmp2) == 2)) {
data/can-utils-2020.02.04/asc2log.c:269:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			if (sscanf(buf, "%ld.%s %d ", &tv.tv_sec, tmp2, &i) == 3){
data/can-utils-2020.02.04/asc2log.c:290:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			if (sscanf(buf, "%ld.%ld %d %s %*s %c %d %x %x %x %x %x %x %x %x",
data/can-utils-2020.02.04/asc2log.c:303:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			if (sscanf(buf, "%ld.%ld %d %s %*s %c %d %d %d %d %d %d %d %d %d",
data/can-utils-2020.02.04/asc2log.c:330:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "%ld.%ld %d %s",
data/can-utils-2020.02.04/bcmserver.c:245:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(rxmsg, "< %s %03X %d ", ifr.ifr_name,
data/can-utils-2020.02.04/bcmserver.c:293:12:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
			items = sscanf(buf, format,
data/can-utils-2020.02.04/candump.c:207:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(devname[i], ifr.ifr_name);
data/can-utils-2020.02.04/cangen.c:305:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ifr.ifr_name, argv[optind]);
data/can-utils-2020.02.04/canlogserver.c:146:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(devname[i], ifr.ifr_name);
data/can-utils-2020.02.04/canlogserver.c:357:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(ifr.ifr_name, argv[optind+i]);
data/can-utils-2020.02.04/canlogserver.c:413:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(temp, "(%ld.%06ld) %*s ",
data/can-utils-2020.02.04/canplayer.c:210:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(asgn[i].txif, txname);
data/can-utils-2020.02.04/canplayer.c:216:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(asgn[i].rxif, rxname);
data/can-utils-2020.02.04/canplayer.c:219:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ifr.ifr_name, txname);
data/can-utils-2020.02.04/canplayer.c:361:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(buf, argv[optind+i]);
data/can-utils-2020.02.04/canplayer.c:398:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "(%ld.%ld) %s %s", &log_tv.tv_sec, &log_tv.tv_usec,
data/can-utils-2020.02.04/canplayer.c:477:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
				if (sscanf(buf, "(%ld.%ld) %s %s", &log_tv.tv_sec, &log_tv.tv_usec,
data/can-utils-2020.02.04/cansniffer.c:297:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ifr.ifr_name, argv[optind]);
data/can-utils-2020.02.04/isotptun.c:89: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, ap);
data/can-utils-2020.02.04/isotptun.c:95:29:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
static syslog_t syslogger = syslog;
data/can-utils-2020.02.04/lib.c:404:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf+offset, "%*s", dlen*(8-len)+13, "ERRORFRAME");
data/can-utils-2020.02.04/lib.c:408:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf+offset, "%*s", j, "`");
data/can-utils-2020.02.04/lib.c:418:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf+offset, "%*s", j, "'");
data/can-utils-2020.02.04/libj1939.c:182:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			str += sprintf(str, "%s:", ifname);
data/can-utils-2020.02.04/log2asc.c:142:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "(%ld.%ld) %s %s", &tv.tv_sec, &tv.tv_usec,
data/can-utils-2020.02.04/log2long.c:62:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "%s %s %s", timestamp, device, ascframe) != 3)
data/can-utils-2020.02.04/slcan_attach.c:162:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "C\rS%s\r", speed);
data/can-utils-2020.02.04/slcan_attach.c:170:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "C\rs%s\r", btr);
data/can-utils-2020.02.04/slcand.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, ap);
data/can-utils-2020.02.04/slcand.c:71:29:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
static syslog_t syslogger = syslog;
data/can-utils-2020.02.04/slcand.c:332:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "C\rS%s\r", speed);
data/can-utils-2020.02.04/slcand.c:340:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "C\rs%s\r", btr);
data/can-utils-2020.02.04/asc2log.c:193:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "I:O:v?")) != -1) {
data/can-utils-2020.02.04/can-calc-bit-timing.c:640:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "b:c:lqs:?")) != -1) {
data/can-utils-2020.02.04/canbusload.c:253:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "rtbcieh?")) != -1) {
data/can-utils-2020.02.04/candump.c:258:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "t:HciaSs:lDdxLn:r:heT:?")) != -1) {
data/can-utils-2020.02.04/canfdtest.c:327:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "gl:v?")) != -1) {
data/can-utils-2020.02.04/cangen.c:174:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(now.tv_usec);
data/can-utils-2020.02.04/cangen.c:180:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "ig:ebfmI:L:D:xp:n:vRh?")) != -1) {
data/can-utils-2020.02.04/cangen.c:380:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			frame.can_id = random();
data/can-utils-2020.02.04/cangen.c:394:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
				frame.len = can_dlc2len(random() & 0xF);
data/can-utils-2020.02.04/cangen.c:396:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
				frame.len = random() & 0xF;
data/can-utils-2020.02.04/cangen.c:407:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			rnd = random();
data/can-utils-2020.02.04/cangen.c:409:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			rnd = random();
data/can-utils-2020.02.04/cangen.c:492:8:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			i = random();
data/can-utils-2020.02.04/cangw.c:723:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "ADFLs:d:Xteiu:l:f:c:p:x:m:M:?")) != -1) {
data/can-utils-2020.02.04/canlogserver.c:210:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "m:v:i:e:p:?")) != -1) {
data/can-utils-2020.02.04/canplayer.c:257:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "I:l:tg:s:xv?")) != -1) {
data/can-utils-2020.02.04/cansniffer.c:208:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "m:v:r:t:h:l:qbBcf?")) != -1) {
data/can-utils-2020.02.04/isotpdump.c:223:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "s:d:ax:X:ct:u?")) != -1) {
data/can-utils-2020.02.04/isotpperf.c:121:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "s:d:x:X:?")) != -1) {
data/can-utils-2020.02.04/isotprecv.c:99:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "s:d:x:p:P:b:m:w:f:lL:?")) != -1) {
data/can-utils-2020.02.04/isotpsend.c:96:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "s:d:x:p:P:t:f:D:L:?")) != -1) {
data/can-utils-2020.02.04/isotpserver.c:165:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "l:s:d:x:p:P:b:m:w:t:L:v?")) != -1) {
data/can-utils-2020.02.04/isotpsniffer.c:200:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "s:d:x:X:h:ct:f:L:?")) != -1) {
data/can-utils-2020.02.04/isotptun.c:154:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "s:d:n:x:p:P:t:b:m:whL:vD?")) != -1) {
data/can-utils-2020.02.04/j1939acd.c:62:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc, argv, optstring, longopts, longindex) \
data/can-utils-2020.02.04/j1939acd.c:63:2:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	getopt((argc), (argv), (optstring))
data/can-utils-2020.02.04/j1939acd.c:475:16:  [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 ((opt = getopt_long(argc, argv, optstring, long_opts, NULL)) != -1)
data/can-utils-2020.02.04/j1939cat.c:589:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, optstring)) != -1)
data/can-utils-2020.02.04/j1939spy.c:54:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc, argv, optstring, longopts, longindex) \
data/can-utils-2020.02.04/j1939spy.c:55:2:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	getopt((argc), (argv), (optstring))
data/can-utils-2020.02.04/j1939spy.c:109:16:  [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 ((opt = getopt_long(argc, argv, optstring, long_opts, NULL)) != -1)
data/can-utils-2020.02.04/j1939sr.c:57:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc, argv, optstring, longopts, longindex) \
data/can-utils-2020.02.04/j1939sr.c:58:2:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	getopt((argc), (argv), (optstring))
data/can-utils-2020.02.04/j1939sr.c:101:16:  [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 ((opt = getopt_long(argc, argv, optstring, long_opts, NULL)) != -1)
data/can-utils-2020.02.04/log2asc.c:82:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "I:O:4n?")) != -1) {
data/can-utils-2020.02.04/slcan_attach.c:98:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "ldwocfs:b:n:?")) != -1) {
data/can-utils-2020.02.04/slcand.c:207:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "ocfls:S:t:b:?hF")) != -1) {
data/can-utils-2020.02.04/testj1939.c:101:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, optstring)) != -1)
data/can-utils-2020.02.04/asc2log.c:129: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 ctmp[10];
data/can-utils-2020.02.04/asc2log.c:174: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[100], tmp1[100], tmp2[100];
data/can-utils-2020.02.04/asc2log.c:196:13:  [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).
			infile = fopen(optarg, "r");
data/can-utils-2020.02.04/asc2log.c:204: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).
			outfile = fopen(optarg, "w");
data/can-utils-2020.02.04/bcmserver.c:153: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[MAXLEN];
data/can-utils-2020.02.04/bcmserver.c:154: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 format[FORMATSZ];
data/can-utils-2020.02.04/bcmserver.c:155: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 rxmsg[50];
data/can-utils-2020.02.04/bcmserver.c:249: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(rxmsg + strlen(rxmsg), "%02X ",
data/can-utils-2020.02.04/bcmserver.c:253:4:  [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(rxmsg, ">\0");
data/can-utils-2020.02.04/can-calc-bit-timing.c:643:22:  [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).
			bitrate_nominal = atoi(optarg);
data/can-utils-2020.02.04/canbusload.c:75: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 devname[IFNAMSIZ+1];
data/can-utils-2020.02.04/canbusload.c:339:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		stat[i].bitrate = atoi(nptr+1); /* bitrate is placed behind the '@' */
data/can-utils-2020.02.04/candump.c:98:7:  [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 col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
data/can-utils-2020.02.04/candump.c:101: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.
static char *cmdlinename[MAXSOCK];
data/can-utils-2020.02.04/candump.c:104: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.
static char devname[MAXIFNAMES][IFNAMSIZ+1];
data/can-utils-2020.02.04/candump.c:110:7:  [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 anichar[MAXANI] = {'|', '/', '-', '\\'};
data/can-utils-2020.02.04/candump.c:111:7:  [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 extra_m_info[4][4] = {"- -", "B -", "- E", "B E"};
data/can-utils-2020.02.04/candump.c:238: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 ctrlmsg[CMSG_SPACE(sizeof(struct timeval) + 3*sizeof(struct timespec) + sizeof(__u32))];
data/can-utils-2020.02.04/candump.c:295:13:  [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).
			silent = atoi(optarg);
data/can-utils-2020.02.04/candump.c:323:12:  [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).
			count = atoi(optarg);
data/can-utils-2020.02.04/candump.c:331:18:  [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).
			rcvbuf_size = atoi(optarg);
data/can-utils-2020.02.04/candump.c:575: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 fname[83]; /* suggested by -Wformat-overflow= */
data/can-utils-2020.02.04/candump.c:584: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(fname, "candump-%04d-%02d-%02d_%02d%02d%02d.log",
data/can-utils-2020.02.04/candump.c:597:13:  [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).
		logfile = fopen(fname, "w");
data/can-utils-2020.02.04/candump.c:681:7:  [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(&dropcnt[i], CMSG_DATA(cmsg), sizeof(__u32));
data/can-utils-2020.02.04/candump.c:705: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 buf[CL_CFSZ]; /* max length */
data/can-utils-2020.02.04/candump.c:715: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 buf[CL_CFSZ]; /* max length */
data/can-utils-2020.02.04/candump.c:744: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 timestring[25];
data/can-utils-2020.02.04/canfdtest.c:334:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			test_loops = atoi(optarg);;
data/can-utils-2020.02.04/canframelen.c:184:3:  [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(&bitmap[5], &frame->data, frame->can_dlc);
data/can-utils-2020.02.04/canframelen.c:199:3:  [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(&bitmap[3], &frame->data, frame->can_dlc);
data/can-utils-2020.02.04/canframelen.c:208: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(bitmap + end / 8, &crc_be, 2);
data/can-utils-2020.02.04/cangen.c:157: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 fixdata[CANFD_MAX_DLEN];
data/can-utils-2020.02.04/cangen.c:227:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				frame.len = atoi(optarg) & 0xFF; /* is cut to 8 / 64 later */
data/can-utils-2020.02.04/cangen.c:262:12:  [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).
			count = atoi(optarg);
data/can-utils-2020.02.04/cangen.c:408:4:  [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(&frame.data[0], &rnd, 4);
data/can-utils-2020.02.04/cangen.c:410:4:  [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(&frame.data[4], &rnd, 4);
data/can-utils-2020.02.04/cangen.c:414:5:  [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(&frame.data[8], &frame.data[0], 8);
data/can-utils-2020.02.04/cangen.c:415:5:  [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(&frame.data[16], &frame.data[0], 16);
data/can-utils-2020.02.04/cangen.c:416:5:  [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(&frame.data[32], &frame.data[0], 32);
data/can-utils-2020.02.04/cangen.c:421:4:  [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(frame.data, fixdata, CANFD_MAX_DLEN);
data/can-utils-2020.02.04/cangw.c:99: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(RTA_DATA(rta), data, alen);
data/can-utils-2020.02.04/cangw.c:119: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 (&mod, data, CGW_MODATTR_LEN);
data/can-utils-2020.02.04/cangw.c:145: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 (&mod, data, CGW_FDMODATTR_LEN);
data/can-utils-2020.02.04/cangw.c:335: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 hexdata[(CAN_MAX_DLEN * 2) + 1] = {0};
data/can-utils-2020.02.04/cangw.c:403: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 hexdata[(CANFD_MAX_DLEN * 2) + 1] = {0};
data/can-utils-2020.02.04/cangw.c:475: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 ifname[IF_NAMESIZE]; /* interface name for if_indextoname() */
data/can-utils-2020.02.04/cangw.c:693: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[1500];
data/can-utils-2020.02.04/cangw.c:696: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 rxbuf[8192]; /* netlink receive buffer */
data/can-utils-2020.02.04/cangw.c:711: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 crc8tab[513] = {0};
data/can-utils-2020.02.04/canlogserver.c:80: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.
static char devname[MAXDEV][IFNAMSIZ+1];
data/can-utils-2020.02.04/canlogserver.c:197: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 temp[BUFSZ];
data/can-utils-2020.02.04/canlogserver.c:245: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).
			port = atoi(optarg);
data/can-utils-2020.02.04/canplayer.c:69: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 txif[IFNAMSIZ];
data/can-utils-2020.02.04/canplayer.c:71: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 rxif[IFNAMSIZ];
data/can-utils-2020.02.04/canplayer.c:238: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.
	static char buf[BUFSZ], device[BUFSZ], ascframe[BUFSZ];
data/can-utils-2020.02.04/canplayer.c:260:13:  [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).
			infile = fopen(optarg, "r");
data/can-utils-2020.02.04/canplayer.c:271:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				if (!(loops = atoi(optarg))) {
data/can-utils-2020.02.04/cansniffer.c:397: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 cmd [20] = {0};
data/can-utils-2020.02.04/cansniffer.c:543: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 startline[80];
data/can-utils-2020.02.04/cansniffer.c:684: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 fname[30] = SETFNAME;
data/can-utils-2020.02.04/cansniffer.c:686: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[8]= {0};
data/can-utils-2020.02.04/cansniffer.c:689: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(fname,  O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
data/can-utils-2020.02.04/cansniffer.c:694: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(buf, "<%03X>%c.", i, (is_set(i, ENABLE))?'1':'0');
data/can-utils-2020.02.04/cansniffer.c:698: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(buf, "%02X", sniftab[i].notch.data[j]);
data/can-utils-2020.02.04/cansniffer.c:715: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 fname[30] = SETFNAME;
data/can-utils-2020.02.04/cansniffer.c:716: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[25] = {0};
data/can-utils-2020.02.04/cansniffer.c:720: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(fname, O_RDONLY);
data/can-utils-2020.02.04/include/linux/can/netlink.h:48: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[16];		/* Name of the CAN controller hardware */
data/can-utils-2020.02.04/isotpdump.c:65:7:  [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 fc_info [4][9] = { "CTS", "WT", "OVFLW", "reserved" };
data/can-utils-2020.02.04/isotpdump.c:364: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 timestring[25];
data/can-utils-2020.02.04/isotprecv.c:94: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 msg[BUFSIZE];
data/can-utils-2020.02.04/isotpsend.c:89: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 buf[BUFSIZE];
data/can-utils-2020.02.04/isotpserver.c:158: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 msg[MAX_PDU_LENGTH + 1];   /* isotp socket message buffer (4095 + test_for_too_long_byte)*/
data/can-utils-2020.02.04/isotpserver.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 rxmsg[MAX_PDU_LENGTH * 2 + 4]; /* isotp->tcp ASCII message buffer (4095*2 + < > \n null) */
data/can-utils-2020.02.04/isotpserver.c:160: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 txmsg[MAX_PDU_LENGTH * 2 + 3]; /* tcp->isotp ASCII message buffer (4095*2 + < > null) */
data/can-utils-2020.02.04/isotpserver.c:377: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(rxmsg + 1 + 2*i, "%02X", msg[i]);
data/can-utils-2020.02.04/isotpserver.c:380:4:  [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(rxmsg, ">\n");
data/can-utils-2020.02.04/isotpsniffer.c:110: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 timestring[25];
data/can-utils-2020.02.04/isotpsniffer.c:183: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 if_name[IFNAMSIZ];
data/can-utils-2020.02.04/isotpsniffer.c:197: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[4096];
data/can-utils-2020.02.04/isotpsniffer.c:225: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).
			format = (atoi(optarg) & (FORMAT_ASCII | FORMAT_HEX));
data/can-utils-2020.02.04/isotpsniffer.c:240: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).
			head = atoi(optarg);
data/can-utils-2020.02.04/isotptun.c:147: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[BUF_LEN];
data/can-utils-2020.02.04/isotptun.c:148: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.
	static char name[sizeof(ifr.ifr_name)] = DEFAULT_NAME;
data/can-utils-2020.02.04/isotptun.c:324: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).
	if ((t = open("/dev/net/tun", O_RDWR)) < 0) {
data/can-utils-2020.02.04/j1939acd.c:248: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(dat, &name, 8);
data/can-utils-2020.02.04/j1939acd.c:418: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(s.cachefile, "w");
data/can-utils-2020.02.04/j1939acd.c:439: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(s.cachefile, "r");
data/can-utils-2020.02.04/j1939acd.c:637:4:  [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(&cmd_name, dat, 8);
data/can-utils-2020.02.04/j1939cat.c:269: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 control[100];
data/can-utils-2020.02.04/j1939cat.c:592:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		priv->infile = open(optarg, O_RDONLY);
data/can-utils-2020.02.04/j1939spy.c:82: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.
static char ctrlmsg[
data/can-utils-2020.02.04/j1939spy.c:248:6:  [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(&dst_name, CMSG_DATA(cmsg), cmsg->cmsg_len - CMSG_LEN(0));
data/can-utils-2020.02.04/lib.c:241: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[CL_CFSZ]; /* max length */
data/can-utils-2020.02.04/lib.c:301: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[CL_LONGCFSZ];
data/can-utils-2020.02.04/lib.c:346: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(buf+offset+5, " remote request");
data/can-utils-2020.02.04/libj1939.c:133: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 tmp[IFNAMSIZ];
data/can-utils-2020.02.04/libj1939.c:173: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.
	static char buf[128];
data/can-utils-2020.02.04/libj1939.c:180:11:  [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.
			str += sprintf(str, "#%i:", can->can_ifindex);
data/can-utils-2020.02.04/libj1939.c:185:10:  [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.
		str += sprintf(str, "%016llx", (unsigned long long)can->can_addr.j1939.name);
data/can-utils-2020.02.04/libj1939.c:187:11:  [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.
			str += sprintf(str, ".%02x", can->can_addr.j1939.addr);
data/can-utils-2020.02.04/libj1939.c:189:10:  [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.
		str += sprintf(str, "%02x", can->can_addr.j1939.addr);
data/can-utils-2020.02.04/libj1939.c:193:10:  [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.
		str += sprintf(str, ",%05x", can->can_addr.j1939.pgn);
data/can-utils-2020.02.04/log2asc.c:74: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.
	static char buf[BUFSZ], device[BUFSZ], ascframe[BUFSZ], id[10];
data/can-utils-2020.02.04/log2asc.c:85:13:  [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).
			infile = fopen(optarg, "r");
data/can-utils-2020.02.04/log2asc.c:93: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).
			outfile = fopen(optarg, "w");
data/can-utils-2020.02.04/log2asc.c:185: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(id, "%X%c", cf.can_id & CAN_EFF_MASK,
data/can-utils-2020.02.04/log2long.c:57: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[BUFSZ], timestamp[BUFSZ], device[BUFSZ], ascframe[BUFSZ];
data/can-utils-2020.02.04/slcan_attach.c:92: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[20];
data/can-utils-2020.02.04/slcan_attach.c:154:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open (tty, O_WRONLY | O_NOCTTY)) < 0) {
data/can-utils-2020.02.04/slcan_attach.c:178: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(buf, "F\r");
data/can-utils-2020.02.04/slcan_attach.c:186: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(buf, "L\r");
data/can-utils-2020.02.04/slcan_attach.c:192: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(buf, "O\r");
data/can-utils-2020.02.04/slcan_attach.c:249: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(buf, "C\r");
data/can-utils-2020.02.04/slcand.c:97: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.
static char ttypath[TTYPATH_LENGTH];
data/can-utils-2020.02.04/slcand.c:184: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[20];
data/can-utils-2020.02.04/slcand.c:287: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(ttypath, O_RDWR | O_NONBLOCK | O_NOCTTY);
data/can-utils-2020.02.04/slcand.c:348: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(buf, "F\r");
data/can-utils-2020.02.04/slcand.c:356: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(buf, "L\r");
data/can-utils-2020.02.04/slcand.c:362: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(buf, "O\r");
data/can-utils-2020.02.04/slcand.c:433: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(buf, "C\r");
data/can-utils-2020.02.04/slcanpty.c:69: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.
	static char buf[200];
data/can-utils-2020.02.04/slcanpty.c:70: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 replybuf[10]; /* for answers to received commands */
data/can-utils-2020.02.04/slcanpty.c:181: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(replybuf, "V1013\r");
data/can-utils-2020.02.04/slcanpty.c:188: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(replybuf, "v1014\r");
data/can-utils-2020.02.04/slcanpty.c:196: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(replybuf, "N4242\r");
data/can-utils-2020.02.04/slcanpty.c:204: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(replybuf, "F00\r");
data/can-utils-2020.02.04/slcanpty.c:341: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[SLC_MTU];
data/can-utils-2020.02.04/slcanpty.c:359: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(buf, "%c%08X%d", cmd,
data/can-utils-2020.02.04/slcanpty.c:363: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(buf, "%c%03X%d", cmd | 0x20,
data/can-utils-2020.02.04/slcanpty.c:370: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(&buf[ptr + 2*i], "%02X",
data/can-utils-2020.02.04/slcanpty.c:379: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(&buf[ptr + 2*frame.can_dlc], "%04lX",
data/can-utils-2020.02.04/slcanpty.c:449:6:  [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).
	p = open(argv[1], O_RDWR);
data/can-utils-2020.02.04/asc2log.c:86: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).
	if (idstring[strlen(idstring)-1] == 'x') {
data/can-utils-2020.02.04/asc2log.c:88: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).
		idstring[strlen(idstring)-1] = 0;
data/can-utils-2020.02.04/asc2log.c:134:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if (sscanf(date, "%9s %d %9s %9s %d", ctmp, &itmp, ctmp, ctmp, &itmp) == 5) {
data/can-utils-2020.02.04/asc2log.c:148:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (sscanf(date, "%9s %d %9s %d", ctmp, &itmp, ctmp, &itmp) != 4)
data/can-utils-2020.02.04/asc2log.c:270: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).
				dplace = strlen(tmp2);
data/can-utils-2020.02.04/asc2log.c:334:37:  [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(tmp1, "ErrorFrame", strlen("ErrorFrame"))) {
data/can-utils-2020.02.04/bcmserver.c:184: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(100000);
data/can-utils-2020.02.04/bcmserver.c:249: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).
				sprintf(rxmsg + strlen(rxmsg), "%02X ",
data/can-utils-2020.02.04/bcmserver.c:255: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).
			send(sa, rxmsg, strlen(rxmsg) + 1, 0);
data/can-utils-2020.02.04/bcmserver.c:264:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(sa, buf+idx, 1) < 1)
data/can-utils-2020.02.04/canbusload.c:302: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).
		nbytes = strlen(ptr);
data/can-utils-2020.02.04/canbusload.c:332:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(stat[i].devname, ptr, nbytes);
data/can-utils-2020.02.04/canbusload.c:334:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.ifr_name, ptr, nbytes);
data/can-utils-2020.02.04/canbusload.c:346: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).
		nbytes = strlen(nptr+1);
data/can-utils-2020.02.04/canbusload.c:392:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				nbytes = read(s[i], &frame, sizeof(frame));
data/can-utils-2020.02.04/candump.c:204: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 (max_devname_len < strlen(ifr.ifr_name))
data/can-utils-2020.02.04/candump.c:205: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).
		max_devname_len = strlen(ifr.ifr_name);
data/can-utils-2020.02.04/candump.c:401: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).
			nbytes = strlen(ptr); /* no ',' found => no filter definitions */
data/can-utils-2020.02.04/candump.c:414:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.ifr_name, ptr, nbytes);
data/can-utils-2020.02.04/cangen.c:293: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(argv[optind]) >= IFNAMSIZ) {
data/can-utils-2020.02.04/cangw.c:316: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).
		    strlen(ptr) == strlen(":00112233445566778899AABBCCDDEEFF") &&
data/can-utils-2020.02.04/cangw.c:316: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).
		    strlen(ptr) == strlen(":00112233445566778899AABBCCDDEEFF") &&
data/can-utils-2020.02.04/cangw.c:385:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if (sscanf(++ptr, "%x.%hhx.%16s", &can_id,
data/can-utils-2020.02.04/cangw.c:391: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(hexdata) != (CAN_MAX_DLEN * 2))
data/can-utils-2020.02.04/cangw.c:457:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if (sscanf(++ptr, "%x.%hhx.%hhx.%128s", &can_id,
data/can-utils-2020.02.04/cangw.c:464: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(hexdata) != (CANFD_MAX_DLEN * 2))
data/can-utils-2020.02.04/cangw.c:807:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			if ((sscanf(optarg, "%hhd:%hhd:%hhd:%hhx:%hhx:%512s",
data/can-utils-2020.02.04/cangw.c:811: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).
			    (strlen(crc8tab) == 512) &&
data/can-utils-2020.02.04/canlogserver.c:143: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 (max_devname_len < strlen(ifr.ifr_name))
data/can-utils-2020.02.04/canlogserver.c:144: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).
		max_devname_len = strlen(ifr.ifr_name);
data/can-utils-2020.02.04/canlogserver.c:285: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(100000);
data/can-utils-2020.02.04/canlogserver.c:344: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).
		j = strlen(argv[optind+i]);
data/can-utils-2020.02.04/canlogserver.c:415: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).
				sprint_canframe(temp+strlen(temp), &frame, 0, maxdlen); 
data/can-utils-2020.02.04/canlogserver.c:416:5:  [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(temp, "\n");
data/can-utils-2020.02.04/canlogserver.c:418: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).
				if (write(accsocket, temp, strlen(temp)) < 0) {
data/can-utils-2020.02.04/canplayer.c:206: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(txname) >= IFNAMSIZ) {
data/can-utils-2020.02.04/canplayer.c:212: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(rxname) >= IFNAMSIZ) {
data/can-utils-2020.02.04/canplayer.c:356: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(argv[optind+i]) >= BUFSZ) {
data/can-utils-2020.02.04/canplayer.c:387: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(buf) >= BUFSZ-2) {
data/can-utils-2020.02.04/canplayer.c:418: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).
				if (strlen(device) >= IFNAMSIZ) {
data/can-utils-2020.02.04/canplayer.c:466: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).
					if (strlen(buf) >= BUFSZ-2) {
data/can-utils-2020.02.04/cansend.c:112:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, argv[1], IFNAMSIZ - 1);
data/can-utils-2020.02.04/cansniffer.c:282: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(argv[optind]) >= IFNAMSIZ) {
data/can-utils-2020.02.04/cansniffer.c:402:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(0, cmd, 19) > strlen("+123456\n"))
data/can-utils-2020.02.04/cansniffer.c:402: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).
	if (read(0, cmd, 19) > strlen("+123456\n"))
data/can-utils-2020.02.04/cansniffer.c:405: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(cmd) > 0)
data/can-utils-2020.02.04/cansniffer.c:406: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).
		cmd[strlen(cmd)-1] = 0; /* chop off trailing newline */
data/can-utils-2020.02.04/cansniffer.c:413: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(&cmd[1]) > 3) {
data/can-utils-2020.02.04/cansniffer.c:503:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((nbytes = read(fd, &bmsg, sizeof(bmsg))) < 0) {
data/can-utils-2020.02.04/cansniffer.c:546:40:  [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).
		printf("%s%*s",STARTLINESTR, 79-(int)strlen(STARTLINESTR), startline);
data/can-utils-2020.02.04/cansniffer.c:688: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(fname, name, 29 - strlen(fname)); 
data/can-utils-2020.02.04/cansniffer.c:688: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).
	strncat(fname, name, 29 - strlen(fname)); 
data/can-utils-2020.02.04/cansniffer.c:719: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(fname, name, 29 - strlen(fname)); 
data/can-utils-2020.02.04/cansniffer.c:719: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).
	strncat(fname, name, 29 - strlen(fname)); 
data/can-utils-2020.02.04/cansniffer.c:727:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(fd, &buf, 24) == 24) {
data/can-utils-2020.02.04/isotpdump.c:227: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(optarg) > 7)
data/can-utils-2020.02.04/isotpdump.c:233: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(optarg) > 7)
data/can-utils-2020.02.04/isotpdump.c:333:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nbytes = read(s, &frame, sizeof(frame));
data/can-utils-2020.02.04/isotpperf.c:125: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(optarg) > 7)
data/can-utils-2020.02.04/isotpperf.c:131: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(optarg) > 7)
data/can-utils-2020.02.04/isotpperf.c:220:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nbytes = read(s, &frame, sizeof(frame));
data/can-utils-2020.02.04/isotprecv.c:103: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).
		    if (strlen(optarg) > 7)
data/can-utils-2020.02.04/isotprecv.c:109: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).
		    if (strlen(optarg) > 7)
data/can-utils-2020.02.04/isotprecv.c:245:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    nbytes = read(s, msg, BUFSIZE);
data/can-utils-2020.02.04/isotpsend.c:100: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).
		    if (strlen(optarg) > 7)
data/can-utils-2020.02.04/isotpsend.c:106: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).
		    if (strlen(optarg) > 7)
data/can-utils-2020.02.04/isotpserver.c:173: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(optarg) > 7)
data/can-utils-2020.02.04/isotpserver.c:179: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(optarg) > 7)
data/can-utils-2020.02.04/isotpserver.c:304: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(100000);
data/can-utils-2020.02.04/isotpserver.c:367:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nbytes = read(sc, &msg, MAX_PDU_LENGTH + 1);
data/can-utils-2020.02.04/isotpserver.c:385: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).
			send(sa, rxmsg, strlen(rxmsg), 0);
data/can-utils-2020.02.04/isotpserver.c:391:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(sa, txmsg+idx, 1) < 1) {
data/can-utils-2020.02.04/isotpserver.c:418: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(txmsg) < 4 || strlen(txmsg) % 2)
data/can-utils-2020.02.04/isotpserver.c:418: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).
			if (strlen(txmsg) < 4 || strlen(txmsg) % 2)
data/can-utils-2020.02.04/isotpserver.c:424: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).
			nbytes = (strlen(txmsg)-2)/2;
data/can-utils-2020.02.04/isotpsniffer.c:204: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(optarg) > 7)
data/can-utils-2020.02.04/isotpsniffer.c:210: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(optarg) > 7)
data/can-utils-2020.02.04/isotpsniffer.c:294:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(if_name, argv[optind], IFNAMSIZ - 1);
data/can-utils-2020.02.04/isotpsniffer.c:354:4:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			getchar();
data/can-utils-2020.02.04/isotpsniffer.c:360:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nbytes = read(s, buffer, 4096);
data/can-utils-2020.02.04/isotpsniffer.c:375:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nbytes = read(t, buffer, 4096);
data/can-utils-2020.02.04/isotptun.c:158: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(optarg) > 7)
data/can-utils-2020.02.04/isotptun.c:164: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(optarg) > 7)
data/can-utils-2020.02.04/isotptun.c:169: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(optarg) > sizeof(name) - 1) {
data/can-utils-2020.02.04/isotptun.c:175:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name, optarg, sizeof(name) - 1);
data/can-utils-2020.02.04/isotptun.c:334:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
data/can-utils-2020.02.04/isotptun.c:368:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nbytes = read(s, buffer, BUF_LEN);
data/can-utils-2020.02.04/isotptun.c:386:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nbytes = read(t, buffer, BUF_LEN);
data/can-utils-2020.02.04/j1939cat.c:403:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		num_read = read(in_fd, buf, to_read);
data/can-utils-2020.02.04/j1939sr.c:189:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(pfd[0].fd, buf, s.pkt_len);
data/can-utils-2020.02.04/j1939sr.c:202:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(pfd[1].fd, buf, s.pkt_len);
data/can-utils-2020.02.04/lib.c:128: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).
	int len = strlen(arg);
data/can-utils-2020.02.04/lib.c:163: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).
	len = strlen(cs);
data/can-utils-2020.02.04/lib.c:416:4:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			sprintf(buf+offset, "`");
data/can-utils-2020.02.04/lib.c:426:4:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			sprintf(buf+offset, "'");
data/can-utils-2020.02.04/libj1939.c:100: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(str))
data/can-utils-2020.02.04/libj1939.c:104: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 (str && strlen(str))
data/can-utils-2020.02.04/libj1939.c:108: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 (str && strlen(str))
data/can-utils-2020.02.04/libj1939.c:112: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 (str && strlen(str))
data/can-utils-2020.02.04/libj1939.c:136:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(tmp, str, pstr - str);
data/can-utils-2020.02.04/libj1939.c:143: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).
				*endp = (char *)&str[strlen(str)];
data/can-utils-2020.02.04/libj1939.c:191:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		str += sprintf(str, "-");
data/can-utils-2020.02.04/log2asc.c:133: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(buf) >= BUFSZ-2) {
data/can-utils-2020.02.04/slcan_attach.c:126: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(speed) > 1)
data/can-utils-2020.02.04/slcan_attach.c:132: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(btr) > 6)
data/can-utils-2020.02.04/slcan_attach.c:138: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(name) > sizeof(ifr.ifr_newname) - 1)
data/can-utils-2020.02.04/slcan_attach.c:163: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcan_attach.c:171: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcan_attach.c:179: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcan_attach.c:187: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcan_attach.c:193: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcan_attach.c:224:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (ifr.ifr_newname, name, sizeof(ifr.ifr_newname) - 1);
data/can-utils-2020.02.04/slcan_attach.c:238:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getchar();
data/can-utils-2020.02.04/slcan_attach.c:250: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).
			if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:223: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(speed) > 1)
data/can-utils-2020.02.04/slcand.c:249: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(btr) > 6)
data/can-utils-2020.02.04/slcand.c:275: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).
	if (name && (strlen(name) > sizeof(ifr.ifr_newname) - 1))
data/can-utils-2020.02.04/slcand.c:333: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:341: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:349: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:357: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:363: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcand.c:392:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy (ifr.ifr_newname, name, sizeof(ifr.ifr_newname) - 1);
data/can-utils-2020.02.04/slcand.c:434: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).
		if (write(fd, buf, strlen(buf)) <= 0) {
data/can-utils-2020.02.04/slcanpty.c:76:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nbytes = read(pty, &buf[rxoffset], sizeof(buf)-rxoffset-1);
data/can-utils-2020.02.04/slcanpty.c:182: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).
		tmp = strlen(replybuf);
data/can-utils-2020.02.04/slcanpty.c:189: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).
		tmp = strlen(replybuf);
data/can-utils-2020.02.04/slcanpty.c:197: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).
		tmp = strlen(replybuf);
data/can-utils-2020.02.04/slcanpty.c:205: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).
		tmp = strlen(replybuf);
data/can-utils-2020.02.04/slcanpty.c:346:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nbytes = read(socket, &frame, sizeof(frame));
data/can-utils-2020.02.04/slcanpty.c:367: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).
	ptr = strlen(buf);
data/can-utils-2020.02.04/slcanpty.c:383:2:  [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(buf, "\r"); /* add terminating character */
data/can-utils-2020.02.04/slcanpty.c:384: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).
	nbytes = write(pty, buf, strlen(buf));
data/can-utils-2020.02.04/slcanpty.c:410:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (ret > 0 && getchar() == EOF)

ANALYSIS SUMMARY:

Hits = 339
Lines analyzed = 16015 in approximately 0.53 seconds (30183 lines/second)
Physical Source Lines of Code (SLOC) = 10924
Hits@level = [0] 889 [1] 134 [2] 134 [3]  38 [4]  33 [5]   0
Hits@level+ = [0+] 1228 [1+] 339 [2+] 205 [3+]  71 [4+]  33 [5+]   0
Hits/KSLOC@level+ = [0+] 112.413 [1+] 31.0326 [2+] 18.766 [3+] 6.49945 [4+] 3.02087 [5+]   0
Dot directories skipped = 2 (--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.