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/smcroute-2.4.2/src/mrdisc.c
Examining data/smcroute-2.4.2/src/ifvc.h
Examining data/smcroute-2.4.2/src/cap.c
Examining data/smcroute-2.4.2/src/mcgroup.c
Examining data/smcroute-2.4.2/src/timer.c
Examining data/smcroute-2.4.2/src/script.c
Examining data/smcroute-2.4.2/src/ifvc.c
Examining data/smcroute-2.4.2/src/inet.c
Examining data/smcroute-2.4.2/src/smcrouted.c
Examining data/smcroute-2.4.2/src/socket.h
Examining data/smcroute-2.4.2/src/log.c
Examining data/smcroute-2.4.2/src/log.h
Examining data/smcroute-2.4.2/src/mrdisc.h
Examining data/smcroute-2.4.2/src/cap.h
Examining data/smcroute-2.4.2/src/pidfile.c
Examining data/smcroute-2.4.2/src/socket.c
Examining data/smcroute-2.4.2/src/mroute.h
Examining data/smcroute-2.4.2/src/ip_mroute.h
Examining data/smcroute-2.4.2/src/ipc.h
Examining data/smcroute-2.4.2/src/conf.h
Examining data/smcroute-2.4.2/src/mroute.c
Examining data/smcroute-2.4.2/src/queue.h
Examining data/smcroute-2.4.2/src/inet.h
Examining data/smcroute-2.4.2/src/smcroutectl.c
Examining data/smcroute-2.4.2/src/util.h
Examining data/smcroute-2.4.2/src/mcgroup.h
Examining data/smcroute-2.4.2/src/script.h
Examining data/smcroute-2.4.2/src/msg.h
Examining data/smcroute-2.4.2/src/timer.h
Examining data/smcroute-2.4.2/src/ipc.c
Examining data/smcroute-2.4.2/src/conf.c
Examining data/smcroute-2.4.2/src/msg.c
Examining data/smcroute-2.4.2/lib/utimensat.c
Examining data/smcroute-2.4.2/lib/strlcpy.c

FINAL RESULTS:

data/smcroute-2.4.2/src/pidfile.c:110:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (chown(pidfile_path, uid, gid))
data/smcroute-2.4.2/src/conf.c:380:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(file, R_OK)) {
data/smcroute-2.4.2/src/log.c:69:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(log_message, sizeof(log_message), fmt, args);
data/smcroute-2.4.2/src/mroute.c:1212:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(buf, stats);
data/smcroute-2.4.2/src/mroute.c:1226:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(buf, tmp);
data/smcroute-2.4.2/src/pidfile.c:71:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (!access(pidfile_path, R_OK) && pid == pidfile_pid) {
data/smcroute-2.4.2/src/script.c:62:16:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (script && access(script, X_OK)) {
data/smcroute-2.4.2/src/script.c:110:9:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		_exit(execv(argv[0], argv));
data/smcroute-2.4.2/src/smcroutectl.c:123:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, ESC "7" ESC "[r" ESC "[999;999H" ESC "[6n");
data/smcroute-2.4.2/src/smcroutectl.c:128:7:  [4] (buffer) scanf:
  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.
		if (scanf(ESC "[%d;%dR", &row, &col) == 2)
data/smcroute-2.4.2/src/smcroutectl.c:132:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, ESC "8");
data/smcroute-2.4.2/src/smcroutectl.c:362:14:  [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 ((c = getopt(argc, argv, "dhI:tv")) != EOF) {
data/smcroute-2.4.2/src/smcrouted.c:339:14:  [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 ((c = getopt(argc, argv, "c:d:e:f:hI:l:m:nNp:P:st:v")) != EOF) {
data/smcroute-2.4.2/lib/utimensat.c:28:32:  [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.
int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
data/smcroute-2.4.2/src/conf.c:220: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).
			mroute.len = atoi(ptr);
data/smcroute-2.4.2/src/conf.c:283: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(file, "r");
data/smcroute-2.4.2/src/conf.c:305:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char *dest[32];
data/smcroute-2.4.2/src/conf.c:349:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
					int num = atoi(token);
data/smcroute-2.4.2/src/ifvc.h:12: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[IFNAMSIZ + 1];
data/smcroute-2.4.2/src/inet.c:46: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 ra[4] = { IPOPT_RA, 0x04, 0x00, 0x00 };
data/smcroute-2.4.2/src/inet.c:138:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1530];
data/smcroute-2.4.2/src/ipc.c:47: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[MX_CMDPKT_SZ];
data/smcroute-2.4.2/src/ipc.c:197: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(msg, buf, sizeof(struct ipc_msg));
data/smcroute-2.4.2/src/log.c:30:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char log_message[128];
data/smcroute-2.4.2/src/log.c:50:9:  [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).
	return atoi(level);
data/smcroute-2.4.2/src/log.h:8: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.
extern char log_message[128];
data/smcroute-2.4.2/src/mcgroup.c:293: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 buf[INET6_ADDRSTRLEN];
data/smcroute-2.4.2/src/mcgroup.c:359:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/smcroute-2.4.2/src/mcgroup.c:360: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 sg[INET_ADDRSTRLEN * 2 + 5];
data/smcroute-2.4.2/src/mcgroup.c:365:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char src[INET_ADDRSTRLEN] = "*";
data/smcroute-2.4.2/src/mcgroup.c:366: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 grp[INET_ADDRSTRLEN];
data/smcroute-2.4.2/src/mrdisc.c:40: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[IFNAMSIZ + 1];
data/smcroute-2.4.2/src/mroute.c:117: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 tmp[128];
data/smcroute-2.4.2/src/mroute.c:138: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 origin[INET_ADDRSTRLEN], group[INET_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:399: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 origin[INET_ADDRSTRLEN], group[INET_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:417: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(mc.mfcc_ttls, route->ttl, NELEMS(mc.mfcc_ttls) * sizeof(mc.mfcc_ttls[0]));
data/smcroute-2.4.2/src/mroute.c:438: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 origin[INET_ADDRSTRLEN], group[INET_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:525: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(route->ttl, entry->ttl, NELEMS(route->ttl) * sizeof(route->ttl[0]));
data/smcroute-2.4.2/src/mroute.c:551: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(new_entry, route, sizeof(struct mroute4));
data/smcroute-2.4.2/src/mroute.c:733: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(entry, route, sizeof(struct mroute4));
data/smcroute-2.4.2/src/mroute.c:847: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(file, O_WRONLY);
data/smcroute-2.4.2/src/mroute.c:869: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 tmp[128];
data/smcroute-2.4.2/src/mroute.c:1076: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 origin[INET6_ADDRSTRLEN], group[INET6_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:1117: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 origin[INET6_ADDRSTRLEN], group[INET6_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:1192: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 src[INET_ADDRSTRLEN] = "*";
data/smcroute-2.4.2/src/mroute.c:1193: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 grp[INET_ADDRSTRLEN];
data/smcroute-2.4.2/src/mroute.c:1194: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 sg[INET_ADDRSTRLEN * 2 + 5];
data/smcroute-2.4.2/src/mroute.c:1195: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[MAX_MC_VIFS * 17 + 80];
data/smcroute-2.4.2/src/mroute.c:1207: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 stats[25];
data/smcroute-2.4.2/src/mroute.c:1216: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[22];
data/smcroute-2.4.2/src/msg.c:107:10:  [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).
		return atoi(ptr);
data/smcroute-2.4.2/src/msg.h:45:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char    *argv[0]; 	/* 'count' * '\0' terminated strings + '\0' */
data/smcroute-2.4.2/src/pidfile.c:90:11:  [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).
	if ((f = fopen(pidfile_path, "w")) == NULL) {
data/smcroute-2.4.2/src/script.c:90: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 source[INET6_ADDRSTRLEN], group[INET6_ADDRSTRLEN];
data/smcroute-2.4.2/src/smcroutectl.c:101:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		ptr = memcpy(ptr, argv[i], len) + len;
data/smcroute-2.4.2/src/smcroutectl.c:113: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[42];
data/smcroute-2.4.2/src/smcroutectl.c:141:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[90];
data/smcroute-2.4.2/src/smcroutectl.c:202: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[MX_CMDPKT_SZ + 1];
data/smcroute-2.4.2/src/smcrouted.c:250: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.
        char pidfn[80];
data/smcroute-2.4.2/src/smcrouted.c:342:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			cache_tmo = atoi(optarg);
data/smcroute-2.4.2/src/smcrouted.c:346:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			startup_delay = atoi(optarg);
data/smcroute-2.4.2/src/smcrouted.c:376:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			interval = atoi(optarg);
data/smcroute-2.4.2/src/smcrouted.c:411:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			table_id = atoi(optarg);
data/smcroute-2.4.2/src/util.h:23:32:  [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.
int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags);
data/smcroute-2.4.2/src/conf.c:78: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(keyword);
data/smcroute-2.4.2/src/ifvc.c:185: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).
		match_len = strlen(ifname) - 1;
data/smcroute-2.4.2/src/ifvc.c:208: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).
	return (ifname && ifname[0] && ifname[strlen(ifname) - 1] == '+');
data/smcroute-2.4.2/src/inet.c:144:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	num = read(sd, buf, sizeof(buf));
data/smcroute-2.4.2/src/ipc.c:63: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).
		ipc_send(sd, log_message, strlen(log_message) + 1);
data/smcroute-2.4.2/src/ipc.c:96: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(LOCALSTATEDIR) + strlen(ident) + 11 >= sizeof(sun.sun_path)) {
data/smcroute-2.4.2/src/ipc.c:96:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(LOCALSTATEDIR) + strlen(ident) + 11 >= sizeof(sun.sun_path)) {
data/smcroute-2.4.2/src/ipc.c:116:49:  [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 = offsetof(struct sockaddr_un, sun_path) + strlen(sun.sun_path);
data/smcroute-2.4.2/src/ipc.c:209: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).
				ptr += strlen(ptr) + 1;
data/smcroute-2.4.2/src/log.c:44: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).
		size_t len = MIN(strlen(prioritynames[i].c_name), strlen(level));
data/smcroute-2.4.2/src/log.c:44:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = MIN(strlen(prioritynames[i].c_name), strlen(level));
data/smcroute-2.4.2/src/mcgroup.c:378: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 (ipc_send(sd, buf, strlen(buf)) < 0) {
data/smcroute-2.4.2/src/mroute.c:123:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	result = read(sd, tmp, sizeof(tmp));
data/smcroute-2.4.2/src/mroute.c:872:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	result = read(sd, tmp, sizeof(tmp));
data/smcroute-2.4.2/src/mroute.c:1228: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, "\n");
data/smcroute-2.4.2/src/mroute.c:1230: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 (ipc_send(sd, buf, strlen(buf)) < 0) {
data/smcroute-2.4.2/src/smcroutectl.c:82:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len += strlen(argv[i]) + 1;
data/smcroute-2.4.2/src/smcroutectl.c:100: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).
		len = strlen(argv[i]) + 1;
data/smcroute-2.4.2/src/smcroutectl.c:156: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).
	len = get_width() - (int)strlen(line) + 4;
data/smcroute-2.4.2/src/smcroutectl.c:179:49:  [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 = offsetof(struct sockaddr_un, sun_path) + strlen(sa.sun_path);
data/smcroute-2.4.2/src/smcroutectl.c:222:5:  [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/smcroute-2.4.2/src/smcroutectl.c:249:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(sd, buf, sizeof(buf) - 1);
data/smcroute-2.4.2/src/smcroutectl.c:267:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				len = read(sd, buf, sizeof(buf) - 1);
data/smcroute-2.4.2/src/smcroutectl.c:401: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).
			len = MIN(strlen(nm), strlen(arg));
data/smcroute-2.4.2/src/smcroutectl.c:401: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).
			len = MIN(strlen(nm), strlen(arg));
data/smcroute-2.4.2/src/smcrouted.c:230:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = strlen(SYSCONFDIR) + strlen(ident) + 7;
data/smcroute-2.4.2/src/smcrouted.c:230: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).
		size_t len = strlen(SYSCONFDIR) + strlen(ident) + 7;
data/smcroute-2.4.2/src/timer.c:108:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(sd, &dummy, 1) < 0)

ANALYSIS SUMMARY:

Hits = 92
Lines analyzed = 6618 in approximately 0.18 seconds (36429 lines/second)
Physical Source Lines of Code (SLOC) = 4195
Hits@level = [0]  30 [1]  28 [2]  51 [3]   2 [4]  10 [5]   1
Hits@level+ = [0+] 122 [1+]  92 [2+]  64 [3+]  13 [4+]  11 [5+]   1
Hits/KSLOC@level+ = [0+] 29.0822 [1+] 21.9309 [2+] 15.2563 [3+] 3.09893 [4+] 2.62217 [5+] 0.238379
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.