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/pimd-2.3.2/callout.c
Examining data/pimd-2.3.2/config.c
Examining data/pimd-2.3.2/debug.c
Examining data/pimd-2.3.2/debug.h
Examining data/pimd-2.3.2/defs.h
Examining data/pimd-2.3.2/dvmrp.h
Examining data/pimd-2.3.2/dvmrp_proto.c
Examining data/pimd-2.3.2/igmp.c
Examining data/pimd-2.3.2/igmp_proto.c
Examining data/pimd-2.3.2/igmpv2.h
Examining data/pimd-2.3.2/igmpv3.h
Examining data/pimd-2.3.2/include/freebsd/netinet/in.h
Examining data/pimd-2.3.2/include/freebsd/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/freebsd2/netinet/in.h
Examining data/pimd-2.3.2/include/freebsd2/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/linux/netinet/in-glibc-2.0.h
Examining data/pimd-2.3.2/include/linux/netinet/in-glibc-2.1.h
Examining data/pimd-2.3.2/include/linux/netinet/in-my.h
Examining data/pimd-2.3.2/include/linux/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/linux/netinet/mroute.h
Examining data/pimd-2.3.2/include/netbsd/netinet/in.h
Examining data/pimd-2.3.2/include/netbsd/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/netinet/pim.h
Examining data/pimd-2.3.2/include/netinet/pim_var.h
Examining data/pimd-2.3.2/include/openbsd/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/sunos-cc/netinet/igmp.h
Examining data/pimd-2.3.2/include/sunos-cc/netinet/in.h
Examining data/pimd-2.3.2/include/sunos-cc/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/sunos-cc/sys/sockio.h
Examining data/pimd-2.3.2/include/sunos-gcc/netinet/igmp.h
Examining data/pimd-2.3.2/include/sunos-gcc/netinet/in.h
Examining data/pimd-2.3.2/include/sunos-gcc/netinet/ip_mroute.h
Examining data/pimd-2.3.2/include/sunos-gcc/sys/sockio.h
Examining data/pimd-2.3.2/inet.c
Examining data/pimd-2.3.2/kern.c
Examining data/pimd-2.3.2/libite/chomp.c
Examining data/pimd-2.3.2/libite/conio.h
Examining data/pimd-2.3.2/libite/copyfile.c
Examining data/pimd-2.3.2/libite/dir.c
Examining data/pimd-2.3.2/libite/fexist.c
Examining data/pimd-2.3.2/libite/fisdir.c
Examining data/pimd-2.3.2/libite/fmode.c
Examining data/pimd-2.3.2/libite/fsendfile.c
Examining data/pimd-2.3.2/libite/ifconfig.c
Examining data/pimd-2.3.2/libite/lfile.c
Examining data/pimd-2.3.2/libite/lite.h
Examining data/pimd-2.3.2/libite/makepath.c
Examining data/pimd-2.3.2/libite/pidfile.c
Examining data/pimd-2.3.2/libite/pidfilefn.c
Examining data/pimd-2.3.2/libite/progress.c
Examining data/pimd-2.3.2/libite/queue.h
Examining data/pimd-2.3.2/libite/rsync.c
Examining data/pimd-2.3.2/libite/strlcat.c
Examining data/pimd-2.3.2/libite/strlcpy.c
Examining data/pimd-2.3.2/libite/strtonum.c
Examining data/pimd-2.3.2/libite/tempfile.c
Examining data/pimd-2.3.2/libite/tree.c
Examining data/pimd-2.3.2/libite/tree.h
Examining data/pimd-2.3.2/main.c
Examining data/pimd-2.3.2/mrt.c
Examining data/pimd-2.3.2/mrt.h
Examining data/pimd-2.3.2/netlink.c
Examining data/pimd-2.3.2/pathnames.h
Examining data/pimd-2.3.2/pim.c
Examining data/pimd-2.3.2/pim_proto.c
Examining data/pimd-2.3.2/pimd.h
Examining data/pimd-2.3.2/route.c
Examining data/pimd-2.3.2/routesock.c
Examining data/pimd-2.3.2/rp.c
Examining data/pimd-2.3.2/rsrr.c
Examining data/pimd-2.3.2/rsrr.h
Examining data/pimd-2.3.2/rsrr_var.h
Examining data/pimd-2.3.2/timer.c
Examining data/pimd-2.3.2/trace.c
Examining data/pimd-2.3.2/trace.h
Examining data/pimd-2.3.2/vif.c
Examining data/pimd-2.3.2/vif.h

FINAL RESULTS:

data/pimd-2.3.2/libite/copyfile.c:134:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
		size = readlink(src, buffer, BUFSIZ);
data/pimd-2.3.2/libite/dir.c:174:14:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			int len = readlink(STARTUP_CONFIG, file, sizeof(file));
data/pimd-2.3.2/libite/tree.c:95:17:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
						if (-1 == readlink(buf, &s[3], sizeof(s) - 3))
data/pimd-2.3.2/debug.c:415:5:  [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(msg, sizeof(msg), format, ap);
data/pimd-2.3.2/libite/copyfile.c:56:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "%s%s%s", *dst, slash ? "" : "/", ptr);
data/pimd-2.3.2/libite/dir.c:191:4:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			system("ls -l *" DIR_TYPE_CONFIG);
data/pimd-2.3.2/libite/dir.c:195:4:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			system("ls -l *" DIR_TYPE_IMAGE);
data/pimd-2.3.2/libite/dir.c:199:4:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			system("ls -l *");
data/pimd-2.3.2/libite/fexist.c:41:12:  [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 (-1 == access(file, F_OK))
data/pimd-2.3.2/libite/fsendfile.c:101: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(files[i + 1], F_OK))
data/pimd-2.3.2/libite/makepath.c:66:6:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (system(tmp))
data/pimd-2.3.2/libite/pidfilefn.c:169:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(cmd);
data/pimd-2.3.2/libite/pidfilefn.c:172:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(cmd);
data/pimd-2.3.2/libite/rsync.c:217:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system("rm -rf " BASE);
data/pimd-2.3.2/libite/rsync.c:236:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		system(cmd);
data/pimd-2.3.2/libite/rsync.c:240:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		system(cmd);
data/pimd-2.3.2/libite/tempfile.c:26:36:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#warning O_TMPFILE missing on your system, tempfile() may not work!
data/pimd-2.3.2/libite/tempfile.c:65:25:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	FILE *fp = tempfile(); system("ls -lrt "
data/pimd-2.3.2/main.c:237:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	    if (-1 == system(buf)) {
data/pimd-2.3.2/defs.h:263:43:  [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.
#define RANDOM()                (uint32_t)random()
data/pimd-2.3.2/main.c:194:4:  [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(seed);
data/pimd-2.3.2/main.c:323:18:  [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 ((ch = getopt_long(argc, argv, "c:d::fhlNvqrt:s:", long_options, NULL)) != EOF) {
data/pimd-2.3.2/config.c:1417:5:  [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[LINE_BUFSIZ], *s = buf;
data/pimd-2.3.2/config.c:1431:5:  [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 linebuf[LINE_BUFSIZ];
data/pimd-2.3.2/config.c:1455:10:  [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(config_file, "r");
data/pimd-2.3.2/debug.c:63:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char unknown[60];
data/pimd-2.3.2/debug.c:271:10:  [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(dumpfilename, "w");
data/pimd-2.3.2/debug.c:287:10:  [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(cachefilename, "w");
data/pimd-2.3.2/debug.c:398: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).
    return atoi(level);
data/pimd-2.3.2/debug.c:409:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char msg[211];
data/pimd-2.3.2/debug.c:475:5:  [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[80] = "";
data/pimd-2.3.2/debug.c:476:5:  [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[10];
data/pimd-2.3.2/debug.c:504:5:  [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 oifs[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/debug.c:505:5:  [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 joined_oifs[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/debug.c:506:5:  [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 pruned_oifs[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/debug.c:507:5:  [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 leaves_oifs[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/debug.c:508:5:  [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 asserted_oifs[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/debug.c:509:5:  [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 incoming_iif[(sizeof(vifbitmap_t)<<3)+1];
data/pimd-2.3.2/defs.h:383: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		s1[MAX_INET_BUF_LEN];
data/pimd-2.3.2/defs.h:384: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		s2[MAX_INET_BUF_LEN];
data/pimd-2.3.2/defs.h:385: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		s3[MAX_INET_BUF_LEN];
data/pimd-2.3.2/defs.h:386: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		s4[MAX_INET_BUF_LEN];
data/pimd-2.3.2/igmp.c:319:5:  [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[20], dest[20];
data/pimd-2.3.2/igmp_proto.c:567:5:  [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_str[200];
data/pimd-2.3.2/igmp_proto.c:619: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_str[200];
data/pimd-2.3.2/include/freebsd/netinet/in.h:100: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	sin_zero[8];
data/pimd-2.3.2/include/freebsd2/netinet/in.h:185: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	sin_zero[8];
data/pimd-2.3.2/include/freebsd2/netinet/in.h: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	ip_opts[40];		/* actually variable in size */
data/pimd-2.3.2/include/linux/netinet/in-glibc-2.0.h:161: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 sin_zero[sizeof(struct sockaddr) -
data/pimd-2.3.2/include/linux/netinet/in-glibc-2.0.h:208:5:  [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 ip_opts[40];		/* Actually variable in size.  */
data/pimd-2.3.2/include/linux/netinet/in-glibc-2.1.h:194: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 sin_zero[sizeof (struct sockaddr) -
data/pimd-2.3.2/include/linux/netinet/mroute.h:81: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 mfcc_ttls[MAXVIFS];	/* Where it is going	*/
data/pimd-2.3.2/include/sunos-cc/netinet/in.h: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	sin_zero[8];
data/pimd-2.3.2/include/sunos-gcc/netinet/in.h: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	sin_zero[8];
data/pimd-2.3.2/inet.c:20: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 s1[MAX_INET_BUF_LEN];		/* buffers to hold the string representations  */
data/pimd-2.3.2/inet.c:21: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 s2[MAX_INET_BUF_LEN];		/* of IP addresses, to be passed to inet_fmt() */
data/pimd-2.3.2/inet.c:22: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 s3[MAX_INET_BUF_LEN];
data/pimd-2.3.2/inet.c:23: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 s4[MAX_INET_BUF_LEN];
data/pimd-2.3.2/inet.c:199:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char domain[MAXHOSTNAMELEN + 1];
data/pimd-2.3.2/inet.c:274:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char line[MAXHOSTNAMELEN + 4];
data/pimd-2.3.2/kern.c:268:5:  [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 router_alert[4];	/* Router Alert IP Option	    */
data/pimd-2.3.2/kern.c:438:5:  [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           input[IFNAMSIZ], output[MAXVIFS * (IFNAMSIZ + 2)] = "";
data/pimd-2.3.2/libite/copyfile.c:156: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).
	in = open(src, O_RDONLY);
data/pimd-2.3.2/libite/copyfile.c:162:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	out = open(dst, O_WRONLY | O_CREAT | O_TRUNC, fmode(src));
data/pimd-2.3.2/libite/copyfile.c:280:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		src = fopen(files[i], "r");
data/pimd-2.3.2/libite/copyfile.c:281:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		dst = fopen(files[i + 1], "w");
data/pimd-2.3.2/libite/dir.c:171:10:  [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 file[80];
data/pimd-2.3.2/libite/fsendfile.c:95:23:  [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).
                src = fopen(files[i], "r");
data/pimd-2.3.2/libite/fsendfile.c:96:23:  [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).
                dst = fopen(files[i + 1], "w");
data/pimd-2.3.2/libite/lfile.c:26: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/pimd-2.3.2/libite/lfile.c:50: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).
		lf->fp   = fopen(file, "r");
data/pimd-2.3.2/libite/lfile.c:159: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(token);
data/pimd-2.3.2/libite/makepath.c:62: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[256];
data/pimd-2.3.2/libite/pidfile.c:69: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/pimd-2.3.2/libite/pidfilefn.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/pimd-2.3.2/libite/pidfilefn.c:50: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(pidfile, "r");
data/pimd-2.3.2/libite/pidfilefn.c:128: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 PIDFILE[42];
data/pimd-2.3.2/libite/pidfilefn.c:146:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[80];
data/pimd-2.3.2/libite/rsync.c:56: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 source[256];
data/pimd-2.3.2/libite/rsync.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 dest[256];
data/pimd-2.3.2/libite/rsync.c:93: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 dst2[256];
data/pimd-2.3.2/libite/rsync.c:223: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[256];
data/pimd-2.3.2/libite/rsync.c:247: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 cmd[128];
data/pimd-2.3.2/libite/tempfile.c:50:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(_PATH_TMP, O_TMPFILE | O_RDWR | O_EXCL | O_CLOEXEC, S_IRUSR | S_IWUSR);
data/pimd-2.3.2/libite/tempfile.c:57:51:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
#warning Too old kernel, reverting to wrap unsafe tmpfile() ...
data/pimd-2.3.2/libite/tempfile.c:58:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	return tmpfile();
data/pimd-2.3.2/libite/tree.c:76:5:  [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/pimd-2.3.2/libite/tree.c:77:5:  [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 dir[80];
data/pimd-2.3.2/main.c:49: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 versionstring[100];
data/pimd-2.3.2/main.c:184:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   fd = open("/dev/urandom", O_RDONLY);
data/pimd-2.3.2/main.c:210:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(path, "r");
data/pimd-2.3.2/main.c:227:5:  [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];
data/pimd-2.3.2/main.c:249:5:  [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[76] = "  ";
data/pimd-2.3.2/main.c:524: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).
	n = open("/dev/null", O_RDWR, 0);
data/pimd-2.3.2/main.c:534: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).
	n = open("/dev/tty", 2);
data/pimd-2.3.2/mrt.h:56: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((to)->vif_timers, (from)->vif_timers,			\
data/pimd-2.3.2/mrt.h:58: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((to)->vif_deletion_delay, (from)->vif_deletion_delay,	\
data/pimd-2.3.2/netlink.c:40: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(RTA_DATA(rta), &data, 4);
data/pimd-2.3.2/netlink.c:106:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/pimd-2.3.2/pim.c:141:5:  [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[20], dest[20];
data/pimd-2.3.2/pim.c:230:5:  [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[20], dest[20];
data/pimd-2.3.2/pim.c:325:5:  [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[20], dest[20];
data/pimd-2.3.2/pim.c:418:5:  [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[20], dest[20];
data/pimd-2.3.2/pim.c:452: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(ip2, ip, hdrsize);
data/pimd-2.3.2/pim.c:488:5:  [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[20], dest[20];
data/pimd-2.3.2/pim.c:539: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(next, ip, hdrsz);
data/pimd-2.3.2/pim_proto.c:953: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(buf, ip, pktlen);
data/pimd-2.3.2/pim_proto.c:2578: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(data, bjpm->join_list, bjpm->join_list_size);
data/pimd-2.3.2/pim_proto.c:2580: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(data, bjpm->prune_list, bjpm->prune_list_size);
data/pimd-2.3.2/pim_proto.c:2598: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(data, bjpm->rp_list_join, bjpm->rp_list_join_size);
data/pimd-2.3.2/pim_proto.c:2600: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(data, bjpm->rp_list_prune, bjpm->rp_list_prune_size);
data/pimd-2.3.2/pim_proto.c:2631: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(data, bjpm->rp_list_join, bjpm->rp_list_join_size);
data/pimd-2.3.2/pim_proto.c:2633: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(data, bjpm->rp_list_prune, bjpm->rp_list_prune_size);
data/pimd-2.3.2/pim_proto.c:2653: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(pim_send_buf + sizeof(struct ip) + sizeof(pim_header_t),
data/pimd-2.3.2/pim_proto.c:3203: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(pim_send_buf + sizeof(struct ip), msg, len);
data/pimd-2.3.2/pim_proto.c:3494: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(data, cand_rp_adv_message.buffer, cand_rp_adv_message.message_size);
data/pimd-2.3.2/routesock.c:71:5:  [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    m_space[512];
data/pimd-2.3.2/routesock.c:139: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(cp, &(u), l);			\
data/pimd-2.3.2/routesock.c:146: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(cp, &(u), l);			\
data/pimd-2.3.2/trace.c:219:5:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    bcopy(data, p, datalen);
data/pimd-2.3.2/vif.h:143:5:  [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	     uv_name[IFNAMSIZ]; /* interface name                   */
data/pimd-2.3.2/config.c:1463: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(linebuf) >= (LINE_BUFSIZ - 1)) {
data/pimd-2.3.2/config.c:1537:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(linebuf, "169.254.0.1 232.0.0.0/8\n", sizeof(linebuf));
data/pimd-2.3.2/inet.c:289:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    domask(line + strlen(line), sizeof(line) - strlen(line), i, omask);
data/pimd-2.3.2/inet.c:289:48:  [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).
    domask(line + strlen(line), sizeof(line) - strlen(line), i, omask);
data/pimd-2.3.2/libite/chomp.c:36: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).
	if (!str || strlen(str) < 1) {
data/pimd-2.3.2/libite/chomp.c:41: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).
	p = str + strlen(str) - 1;
data/pimd-2.3.2/libite/copyfile.c:47: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).
		tmp = malloc(strlen(*dst) + strlen(ptr) + 2);
data/pimd-2.3.2/libite/copyfile.c:47:31:  [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 = malloc(strlen(*dst) + strlen(ptr) + 2);
data/pimd-2.3.2/libite/copyfile.c:72:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(in, buffer, count);
data/pimd-2.3.2/libite/dir.c:35: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).
	if ((1 == strlen(entry->d_name) && entry->d_name[0] == '.') ||
data/pimd-2.3.2/libite/dir.c:36: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).
	    (2 == strlen(entry->d_name) && !strcmp(entry->d_name, "..")))
data/pimd-2.3.2/libite/lfile.c:136: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 (!strncmp(token, key, MAX(strlen(token), strlen(key))))
data/pimd-2.3.2/libite/lfile.c:136:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strncmp(token, key, MAX(strlen(token), strlen(key))))
data/pimd-2.3.2/libite/lite.h:139: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(dir) > 0)
data/pimd-2.3.2/libite/lite.h:140: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).
	   return dir[strlen(dir) - 1] == '/';
data/pimd-2.3.2/libite/lite.h:163: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).
   return s && strlen(s);
data/pimd-2.3.2/libite/lite.h:169:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   size_t min = MIN(strlen(a), strlen(b));
data/pimd-2.3.2/libite/lite.h:169: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).
   size_t min = MIN(strlen(a), strlen(b));
data/pimd-2.3.2/libite/lite.h:177: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).
   return strlen(a) == strlen(b) && !strcmp(a, b);
data/pimd-2.3.2/libite/lite.h:177: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).
   return strlen(a) == strlen(b) && !strcmp(a, b);
data/pimd-2.3.2/libite/lite.h:185: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).
   return strlen (a) == strlen (b) && !strcasecmp (a, b);
data/pimd-2.3.2/libite/lite.h:185:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   return strlen (a) == strlen (b) && !strcasecmp (a, b);
data/pimd-2.3.2/libite/makepath.c:33: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(dir) == 1 && dir[0] == '/')
data/pimd-2.3.2/libite/pidfilefn.c:87: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(50000);	/* Wait 50ms between retries */
data/pimd-2.3.2/libite/progress.c:37: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).
	num = strlen(style);
data/pimd-2.3.2/libite/progress.c:122:22:  [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.
#define msleep(msec) usleep(msec * 1000)
data/pimd-2.3.2/libite/rsync.c:95:4:  [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(source, "/");
data/pimd-2.3.2/libite/rsync.c:158: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 (files[n], file, MAX(strlen(files[n]), strlen(file))))
data/pimd-2.3.2/libite/rsync.c:158:55:  [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 (files[n], file, MAX(strlen(files[n]), strlen(file))))
data/pimd-2.3.2/libite/rsync.c:178:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				size_t len = strlen(files[i]) + 2 + strlen(dst);
data/pimd-2.3.2/libite/rsync.c:178:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				size_t len = strlen(files[i]) + 2 + strlen(dst);
data/pimd-2.3.2/libite/strlcat.c:45:17:  [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(dlen + strlen(src));
data/pimd-2.3.2/libite/tempfile.c:49:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	oldmask = umask(0077);
data/pimd-2.3.2/libite/tempfile.c:51:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(oldmask);
data/pimd-2.3.2/libite/tree.c:32: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).
	if ((1 == strlen(entry->d_name) && entry->d_name[0] == '.') ||
data/pimd-2.3.2/libite/tree.c:33: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).
	    (2 == strlen(entry->d_name) && !strcmp(entry->d_name, "..")))
data/pimd-2.3.2/main.c:186:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       if (-1 == read(fd, &seed, sizeof(seed)))
data/pimd-2.3.2/main.c:235:6:  [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(200);
data/pimd-2.3.2/main.c:272: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(line) + strlen(d->name) + 3 >= sizeof(line)) {
data/pimd-2.3.2/main.c:272: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).
	if (strlen(line) + strlen(d->name) + 3 >= sizeof(line)) {
data/pimd-2.3.2/main.c:346: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(p);
data/pimd-2.3.2/routesock.c:220:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rlen = read(routing_socket, &m_rtmsg, sizeof(m_rtmsg));
data/pimd-2.3.2/routesock.c:339: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(v->uv_name) == ifp->sdl_nlen)
data/pimd-2.3.2/rsrr.c:84:56:  [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).
    servlen = offsetof(struct sockaddr_un, sun_path) + strlen(serv_addr.sun_path);
data/pimd-2.3.2/rsrr.c:87:46:  [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).
    servlen = sizeof(serv_addr.sun_family) + strlen(serv_addr.sun_path);

ANALYSIS SUMMARY:

Hits = 166
Lines analyzed = 28947 in approximately 0.83 seconds (34721 lines/second)
Physical Source Lines of Code (SLOC) = 18020
Hits@level = [0] 214 [1]  45 [2]  99 [3]   3 [4]  16 [5]   3
Hits@level+ = [0+] 380 [1+] 166 [2+] 121 [3+]  22 [4+]  19 [5+]   3
Hits/KSLOC@level+ = [0+] 21.0877 [1+] 9.21199 [2+] 6.71476 [3+] 1.22087 [4+] 1.05438 [5+] 0.166482
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.