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/prads-0.3.3/src/assets.c
Examining data/prads-0.3.3/src/assets.h
Examining data/prads-0.3.3/src/bstraux.c
Examining data/prads-0.3.3/src/bstraux.h
Examining data/prads-0.3.3/src/bstrlib.c
Examining data/prads-0.3.3/src/bstrlib.h
Examining data/prads-0.3.3/src/common.h
Examining data/prads-0.3.3/src/config.c
Examining data/prads-0.3.3/src/config.h
Examining data/prads-0.3.3/src/cxt.c
Examining data/prads-0.3.3/src/cxt.h
Examining data/prads-0.3.3/src/dhcp.c
Examining data/prads-0.3.3/src/dhcp.h
Examining data/prads-0.3.3/src/dump_dns.c
Examining data/prads-0.3.3/src/dump_dns.h
Examining data/prads-0.3.3/src/ipfp/icmp_fp.c
Examining data/prads-0.3.3/src/ipfp/ipfp.c
Examining data/prads-0.3.3/src/ipfp/ipfp.h
Examining data/prads-0.3.3/src/ipfp/udp_fp.c
Examining data/prads-0.3.3/src/mac.c
Examining data/prads-0.3.3/src/mac.h
Examining data/prads-0.3.3/src/mtu.h
Examining data/prads-0.3.3/src/output-plugins/log_dispatch.c
Examining data/prads-0.3.3/src/output-plugins/log_fifo.c
Examining data/prads-0.3.3/src/output-plugins/log_fifo.h
Examining data/prads-0.3.3/src/output-plugins/log_file.c
Examining data/prads-0.3.3/src/output-plugins/log_file.h
Examining data/prads-0.3.3/src/output-plugins/log_ringbuffer.c
Examining data/prads-0.3.3/src/output-plugins/log_ringbuffer.h
Examining data/prads-0.3.3/src/output-plugins/log_sguil.c
Examining data/prads-0.3.3/src/output-plugins/log_sguil.h
Examining data/prads-0.3.3/src/output-plugins/log_stdout.c
Examining data/prads-0.3.3/src/output-plugins/log_stdout.h
Examining data/prads-0.3.3/src/output-plugins/log_unified.c
Examining data/prads-0.3.3/src/output-plugins/log_unified.h
Examining data/prads-0.3.3/src/output-plugins/log.h
Examining data/prads-0.3.3/src/prads.c
Examining data/prads-0.3.3/src/prads.h
Examining data/prads-0.3.3/src/servicefp/servicefp.h
Examining data/prads-0.3.3/src/servicefp/tcpc.c
Examining data/prads-0.3.3/src/servicefp/tcps.c
Examining data/prads-0.3.3/src/servicefp/udps.c
Examining data/prads-0.3.3/src/servicefp/servicefp.c
Examining data/prads-0.3.3/src/shm-client.c
Examining data/prads-0.3.3/src/sig.h
Examining data/prads-0.3.3/src/sig_tcp.c
Examining data/prads-0.3.3/src/sys_func.c
Examining data/prads-0.3.3/src/sys_func.h
Examining data/prads-0.3.3/src/tcp.h
Examining data/prads-0.3.3/src/tos.h

FINAL RESULTS:

data/prads-0.3.3/src/servicefp/servicefp.c:324:13:  [5] (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. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
            strncat(app, (char *)bdata(sig->title.ver), MAX_VER);
data/prads-0.3.3/src/servicefp/servicefp.c:330:13:  [5] (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. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
            strncat(app, (char *)bdata(sig->title.misc), MAX_MISC);
data/prads-0.3.3/src/bstrlib.c:2735:33:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define exvsnprintf(r,b,n,f,a) {vsprintf (b,f,a); r = -1;}
data/prads-0.3.3/src/bstrlib.c:2742:12:  [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.
extern int vsnprintf (char *buf, size_t count, const char *format, va_list arg);
data/prads-0.3.3/src/bstrlib.c:2745:37:  [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.
#define exvsnprintf(r,b,n,f,a) {r = vsnprintf (b,n,f,a);}
data/prads-0.3.3/src/config.c:517:13:  [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(conf->cxtlogdir, optarg);
data/prads-0.3.3/src/sys_func.c:183:37:  [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 (!S_ISREG(st.st_mode) || access(path, W_OK) != -1) {
data/prads-0.3.3/src/sys_func.c:188:5:  [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(dir, path);
data/prads-0.3.3/src/sys_func.c:194:33:  [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 (!S_ISDIR(st.st_mode) || access(dir, W_OK) == -1) {
data/prads-0.3.3/src/sys_func.h:4:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define plog(fmt, ...) do{ fprintf(stdout, (fmt), ##__VA_ARGS__); }while(0)
data/prads-0.3.3/src/sys_func.h:10:13:  [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.
            syslog(LOG_INFO, (fmt), ##__VA_ARGS__); \
data/prads-0.3.3/src/sys_func.h:12:13:  [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(stdout, (fmt), ##__VA_ARGS__); \
data/prads-0.3.3/src/sys_func.h:19:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define dlog(fmt, ...) do { fprintf(stderr, ("[%s:%d(%s)] " fmt), __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__);} while(0)
data/prads-0.3.3/src/sys_func.h:20:46:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define vlog(v, fmt, ...) do{ if(DEBUG == v) fprintf(stderr, ("[%s:%d(%s)] " fmt), __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__); }while(0)
data/prads-0.3.3/src/sys_func.h:22:24:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define elog(fmt, ...) fprintf(stderr, ("[%s:%d(%s)] " fmt), __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__)
data/prads-0.3.3/src/sys_func.h:29:9:  [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.
        syslog(LOG_ERR, (fmt), ##__VA_ARGS__); \
data/prads-0.3.3/src/sys_func.h:30:9:  [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, (fmt), ##__VA_ARGS__); \
data/prads-0.3.3/src/sys_func.h:36:21:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debug(x...)	fprintf(stderr,x)
data/prads-0.3.3/src/config.c:404:18:  [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 ((ch = getopt(argc, argv, args)) != -1) {
data/prads-0.3.3/src/prads.c:1362:18:  [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 ((ch = getopt(argc, argv, ARGS)) != -1)
data/prads-0.3.3/src/sys_func.c:137:9:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if (chroot(absdir) < 0) {
data/prads-0.3.3/src/assets.c:473: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/assets.c:530: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.
        memcpy(&pi->asset->mac_addr, arp_sha, MAC_ADDR_LEN);
data/prads-0.3.3/src/bstraux.c:220: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 (buff, t->data, tsz);
data/prads-0.3.3/src/bstraux.c:250: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 strnum[sizeof (b->slen) * 3 + 1];
data/prads-0.3.3/src/bstraux.c:255:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (strnum, "%d:", b->slen);
data/prads-0.3.3/src/bstraux.c:292: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 (b->data, buff + i + 1, x);
data/prads-0.3.3/src/bstraux.c:519:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char outoctet[3];
data/prads-0.3.3/src/bstraux.c:623: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 (buff, luuCtx->io.dst->data, tsz);
data/prads-0.3.3/src/bstraux.c:663: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 (buff, luuCtx->io.dst->data, luuCtx->io.dst->slen);
data/prads-0.3.3/src/bstraux.c:792: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.
unsigned char octetbuff[MAX_OB_LEN];
data/prads-0.3.3/src/bstraux.c:965:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			if (t) memcpy (t->data, b->data, i);
data/prads-0.3.3/src/bstrlib.c:41:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bstr__memcpy(d,s,l) memcpy ((d), (s), (l))
data/prads-0.3.3/src/bstrlib.c:704:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		if (b0->data[i] != ((const unsigned char *) blk)[i]) {
data/prads-0.3.3/src/bstrlib.c:706:35:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			    downcase (((const unsigned char *) blk)[i])) return 0;
data/prads-0.3.3/src/bstrlib.c:815:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		if (b0->data[i] != ((const unsigned char *) blk)[i]) return BSTR_OK;
data/prads-0.3.3/src/bstrlib.c:1284:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
struct charField { unsigned char content[CFCLEN]; };
data/prads-0.3.3/src/config.c:137:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(fname, "r")) == NULL) {
data/prads-0.3.3/src/config.h:53: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        errbuf[PCAP_ERRBUF_SIZE];   /**/
data/prads-0.3.3/src/config.h:61: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        cxtfname[4096];         /* cxtracker/sancp like output file */
data/prads-0.3.3/src/config.h:62: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        cxtlogdir[2048];        /* log dir for sancp/cxtracker output */
data/prads-0.3.3/src/cxt.c:64: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/cxt.c:65: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 ip_addr_d[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/cxt.c:383:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    logfile = fopen("/tmp/prads-buckets.log", "w");
data/prads-0.3.3/src/dhcp.c:27: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 dest[INET_ADDRSTRLEN];
data/prads-0.3.3/src/dhcp.c:235:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(file, "r");
data/prads-0.3.3/src/dhcp.c:236: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[MAXLINE];
data/prads-0.3.3/src/dhcp.c:257: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 opts[MAXLINE], optreq[MAXLINE], genre[MAXLINE], desc[MAXLINE];
data/prads-0.3.3/src/dhcp.c:258: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 vc[MAXLINE];
data/prads-0.3.3/src/dhcp.c:447:35:  [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).
               sig->opt[optcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.c:449:35:  [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).
               sig->opt[optcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.c:452:35:  [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).
               sig->opt[optcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.c:486:41:  [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).
               sig->optreq[optreqcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.c:488:41:  [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).
               sig->optreq[optreqcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.c:491:41:  [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).
               sig->optreq[optreqcnt] = atoi(p);
data/prads-0.3.3/src/dhcp.h:87: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 chaddr [16];            // Client HW address (16)
data/prads-0.3.3/src/dhcp.h:88: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 sname [64];             // Optional server host name (64)
data/prads-0.3.3/src/dhcp.h:89: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 file [128];             // Boot file name (128)
data/prads-0.3.3/src/dump_dns.c:74:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void printchars(char buf[NS_MAXDNAME], u_char * cdata, u_int16_t dlen);
data/prads-0.3.3/src/dump_dns.c:199: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[NS_MAXDNAME];
data/prads-0.3.3/src/dump_dns.c:234:9:  [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, "%u,%u,%u,%u,%u", soa[0], soa[1], soa[2], soa[3],
data/prads-0.3.3/src/dump_dns.c:258:9:  [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, "[%u]", ns_rr_rdlen(*rr));
data/prads-0.3.3/src/dump_dns.c:275:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void printchars(char buf[NS_MAXDNAME], u_char * cdata, u_int16_t dlen)
data/prads-0.3.3/src/mac.c:188:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(file, "r");
data/prads-0.3.3/src/mac.c:189: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[MAXLINE];
data/prads-0.3.3/src/mac.c:212: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 vendor[128] = {0}; 
data/prads-0.3.3/src/output-plugins/log_dispatch.c:83: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_dispatch.c:93: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_dispatch.c:106: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_fifo.c:116: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(fifo_file, "w+");
data/prads-0.3.3/src/output-plugins/log_fifo.c:134: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_fifo.c:173: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 sip[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_fifo.c:174: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 dip[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_fifo.c:213: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_file.c:73:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(log->path, mode)) == NULL) {
data/prads-0.3.3/src/output-plugins/log_file.c:109:35:  [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 ((log->data = (void *) fopen(log->path, "a")) == NULL) {
data/prads-0.3.3/src/output-plugins/log_file.c:140:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(log->path, "r")) == NULL) {
data/prads-0.3.3/src/output-plugins/log_file.c:199:23:  [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 ((port = htons(atoi(bdata(list->entry[1])))) == -1)
data/prads-0.3.3/src/output-plugins/log_file.c:202: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).
    if ((proto = atoi(bdata(list->entry[2]))) == -1)
data/prads-0.3.3/src/output-plugins/log_file.c:211:23:  [2] (integer) atol:
  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 ((discovered = atol(bdata(list->entry[5]))) == -1)
data/prads-0.3.3/src/output-plugins/log_file.c:248: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_file.c:280:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_file.c:315: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_ringbuffer.c:66: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 stime[80], ltime[80];
data/prads-0.3.3/src/output-plugins/log_ringbuffer.c:69: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_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_ringbuffer.c:70: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 dst_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_ringbuffer.h:24: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 text[256];
data/prads-0.3.3/src/output-plugins/log_sguil.c:26: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 filename[PATH_MAX];
data/prads-0.3.3/src/output-plugins/log_sguil.c:35:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    cxtfile = fopen(filename, "w");
data/prads-0.3.3/src/output-plugins/log_sguil.c:74: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 stime[80], ltime[80];
data/prads-0.3.3/src/output-plugins/log_sguil.c:77: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 src_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_sguil.c:78: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 dst_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:46: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:62: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:105: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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:131: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.
   static char src_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:132: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.
   static char dst_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.c:144: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 stime[80], ltime[80];
data/prads-0.3.3/src/output-plugins/log_stdout.c:146: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.
   static char src_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/output-plugins/log_stdout.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.
   static char dst_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/prads.c:155: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 output[INET_ADDRSTRLEN + 1];
data/prads-0.3.3/src/prads.c:194:13:  [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(&ip_vec.ip6,ipptr, sizeof(struct in6_addr));
data/prads-0.3.3/src/prads.c:765:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 ip_addr_s[INET6_ADDRSTRLEN];
data/prads-0.3.3/src/prads.c:913: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 output[MAX_NETS];
data/prads-0.3.3/src/prads.c:1175: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).
    fs = fopen(file, "r");
data/prads-0.3.3/src/prads.c:1301:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 log_prefix[PATH_MAX];
data/prads-0.3.3/src/prads.h:237: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 __ar_sha[MAC_ADDR_LEN];       /* Sender hardware address.  */
data/prads-0.3.3/src/prads.h:238: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 __ar_sip[4];  /* Sender IP address.  */
data/prads-0.3.3/src/prads.h:239: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 __ar_tha[MAC_ADDR_LEN];       /* Target hardware address.  */
data/prads-0.3.3/src/prads.h:240: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 __ar_tip[4];  /* Target IP address.  */
data/prads-0.3.3/src/prads.h:400: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 data[1];
data/prads-0.3.3/src/servicefp/servicefp.c:73:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(TCP_SIGNATURE_LIST, "r")) != NULL) {
data/prads-0.3.3/src/servicefp/servicefp.c:83:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(bdata(filename), "r")) == NULL) {
data/prads-0.3.3/src/servicefp/servicefp.c:306: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 sub[512];
data/prads-0.3.3/src/servicefp/servicefp.c:307: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 app[5000];
data/prads-0.3.3/src/servicefp/servicefp.c:329:13:  [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(app, " (");
data/prads-0.3.3/src/servicefp/servicefp.c:347: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).
            n = atoi(&app[i]);
data/prads-0.3.3/src/sig_tcp.c:526: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).
        sig->wsize = atoi(w + 1);
data/prads-0.3.3/src/sig_tcp.c:531: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).
        sig->wsize = atoi(w + 1);
data/prads-0.3.3/src/sig_tcp.c:533:28:  [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 (!(sig->wsize = atoi(w + 1)))
data/prads-0.3.3/src/sig_tcp.c:538: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).
        sig->wsize = atoi(w);
data/prads-0.3.3/src/sig_tcp.c:585:38:  [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 (!(sig->wsc = atoi(p + 2)))
data/prads-0.3.3/src/sig_tcp.c:593:32:  [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).
                    sig->wsc = atoi(p + 1);
data/prads-0.3.3/src/sig_tcp.c:602:38:  [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 (!(sig->mss = atoi(p + 2)))
data/prads-0.3.3/src/sig_tcp.c:609:32:  [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).
                    sig->mss = atoi(p + 1);
data/prads-0.3.3/src/sig_tcp.c:619:40:  [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).
                    sig->opt[optcnt] = atoi(p + 1);
data/prads-0.3.3/src/sig_tcp.c:732:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(file, "r");
data/prads-0.3.3/src/sig_tcp.c:733: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[MAXLINE];
data/prads-0.3.3/src/sig_tcp.c:754: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 obuf[MAXLINE], genre[MAXLINE], desc[MAXLINE];
data/prads-0.3.3/src/sig_tcp.c:756: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 w[MAXLINE], sb[MAXLINE];
data/prads-0.3.3/src/sig_tcp.c:785: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).
            s = atoi(sb);
data/prads-0.3.3/src/sig_tcp.c:911: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 rbuf[MY_MAXDNS+6] = "/";
data/prads-0.3.3/src/sig_tcp.c:936: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 tmp[32];
data/prads-0.3.3/src/sig_tcp.c:949: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(tmp,"unknown-%d",mss);
data/prads-0.3.3/src/sig_tcp.c:1108:13:  [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(&tstamp, opt_ptr + 5, 4);
data/prads-0.3.3/src/sig_tcp.c:1112:13:  [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(&tstamp, opt_ptr + 1, 4);
data/prads-0.3.3/src/sig_tcp.c:1196: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 outbuf[INET6_ADDRSTRLEN+1];
data/prads-0.3.3/src/sys_func.c:175: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[STDBUF];
data/prads-0.3.3/src/sys_func.c:203: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(path, O_CREAT, 0664);
data/prads-0.3.3/src/sys_func.c:251: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 pid_buffer[12];
data/prads-0.3.3/src/sys_func.c:263:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(path, O_CREAT | O_WRONLY,
data/prads-0.3.3/src/sys_func.c:318:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open("/dev/null", O_RDWR)) >= 0) {
data/prads-0.3.3/src/sys_func.c:333: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 buf[32];
data/prads-0.3.3/src/bstraux.c:861: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).
	if ((n = (int) (2*strlen (fmt))) < 16) n = 16;
data/prads-0.3.3/src/bstrlib.c:188: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) (str);
data/prads-0.3.3/src/bstrlib.c:216: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) (str);
data/prads-0.3.3/src/bstrlib.c:380:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return bcatblk (b, (const void *) s, (int) strlen (s));
data/prads-0.3.3/src/bstrlib.c:515: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 (str + i);
data/prads-0.3.3/src/bstrlib.c:2782: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/prads-0.3.3/src/bstrlib.c:2794: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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/prads-0.3.3/src/bstrlib.c:2830: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/prads-0.3.3/src/bstrlib.c:2842: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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/prads-0.3.3/src/bstrlib.c:2877: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/prads-0.3.3/src/bstrlib.c:2889: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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/prads-0.3.3/src/bstrlib.c:2937:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (n >= (l = b->slen + (int) (strlen) ((const char *) b->data + b->slen))) {
data/prads-0.3.3/src/bstrlib.h:219: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).
    (t).slen = ((t).data) ? ((int) (strlen) ((char *)(t).data)) : 0; \
data/prads-0.3.3/src/config.c:407: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).
            if(strlen(optarg) == 0)
data/prads-0.3.3/src/dhcp.c:111:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(dhcpfp.vc, (char*) optdata, optsize);
data/prads-0.3.3/src/dhcp.c:269: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).
        l = strlen(p);
data/prads-0.3.3/src/mac.c:221: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).
        l = strlen(p);
data/prads-0.3.3/src/mac.c:253: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.
        sscanf(p, "%127s", vendor);
data/prads-0.3.3/src/mac.c:264: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).
           lp = strlen(p);
data/prads-0.3.3/src/mac.c:271:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
           strncpy(comment, p, lp);
data/prads-0.3.3/src/prads.c:978: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).
    len = strlen(s_net);
data/prads-0.3.3/src/prads.c:981:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(snet, s_net, len);
data/prads-0.3.3/src/prads.c:1210: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).
        lineptr = lineptr+strlen(lineptr);
data/prads-0.3.3/src/prads.c:1276: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 (strlen(conf->errbuf) > 0) {
data/prads-0.3.3/src/servicefp/servicefp.c:319:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(app, bdata(sig->title.app), MAX_APP);
data/prads-0.3.3/src/servicefp/servicefp.c:323:13:  [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(app, " ");
data/prads-0.3.3/src/servicefp/servicefp.c:331:13:  [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(app, ")");
data/prads-0.3.3/src/shm-client.c:70:9:  [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);
data/prads-0.3.3/src/sig_tcp.c:767: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).
        l = strlen(p);
data/prads-0.3.3/src/sig_tcp.c:917:39:  [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 (!r || !(s = r->h_name) || !(j = strlen(s))) return "";
data/prads-0.3.3/src/sys_func.c:289: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).
    if (write(fd, pid_buffer, strlen(pid_buffer)) == -1) {

ANALYSIS SUMMARY:

Hits = 174
Lines analyzed = 15117 in approximately 0.46 seconds (33165 lines/second)
Physical Source Lines of Code (SLOC) = 10216
Hits@level = [0] 149 [1]  31 [2] 122 [3]   3 [4]  16 [5]   2
Hits@level+ = [0+] 323 [1+] 174 [2+] 143 [3+]  21 [4+]  18 [5+]   2
Hits/KSLOC@level+ = [0+] 31.6171 [1+] 17.0321 [2+] 13.9977 [3+] 2.0556 [4+] 1.76194 [5+] 0.195771
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.