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/p0f-3.09b/languages.h
Examining data/p0f-3.09b/alloc-inl.h
Examining data/p0f-3.09b/tools/p0f-sendsyn6.c
Examining data/p0f-3.09b/tools/p0f-client.c
Examining data/p0f-3.09b/tools/p0f-sendsyn.c
Examining data/p0f-3.09b/api.h
Examining data/p0f-3.09b/fp_mtu.c
Examining data/p0f-3.09b/readfp.c
Examining data/p0f-3.09b/fp_tcp.c
Examining data/p0f-3.09b/fp_http.h
Examining data/p0f-3.09b/tcp.h
Examining data/p0f-3.09b/readfp.h
Examining data/p0f-3.09b/debug.h
Examining data/p0f-3.09b/fp_tcp.h
Examining data/p0f-3.09b/types.h
Examining data/p0f-3.09b/hash.h
Examining data/p0f-3.09b/p0f.c
Examining data/p0f-3.09b/p0f.h
Examining data/p0f-3.09b/process.h
Examining data/p0f-3.09b/fp_http.c
Examining data/p0f-3.09b/process.c
Examining data/p0f-3.09b/api.c
Examining data/p0f-3.09b/fp_mtu.h
Examining data/p0f-3.09b/config.h

FINAL RESULTS:

data/p0f-3.09b/alloc-inl.h:478:16:  [4] (format) snprintf:
  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.
    s32 _len = snprintf(NULL, 0, _str); \
data/p0f-3.09b/alloc-inl.h:481:5:  [4] (format) snprintf:
  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.
    snprintf((char*)_tmp, _len + 1, _str); \
data/p0f-3.09b/debug.h:18:23:  [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/p0f-3.09b/debug.h:23:23:  [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 ERRORF(x...)  fprintf(stderr, x)
data/p0f-3.09b/debug.h:24:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SAYF(x...)    printf(x)
data/p0f-3.09b/fp_http.c:511:16:  [4] (format) snprintf:
  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.
    s32 _len = snprintf(NULL, 0, _par); \
data/p0f-3.09b/fp_http.c:514:5:  [4] (format) snprintf:
  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.
    snprintf((char*)ret + rlen, _len + 1, _par); \
data/p0f-3.09b/fp_tcp.c:772:16:  [4] (format) snprintf:
  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.
    s32 _len = snprintf(NULL, 0, _par); \
data/p0f-3.09b/fp_tcp.c:775:5:  [4] (format) snprintf:
  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.
    snprintf((char*)ret + rlen, _len + 1, _par); \
data/p0f-3.09b/p0f.c:113: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 LOGF(_x...) fprintf(lf, _x)
data/p0f-3.09b/p0f.c:274:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(u.sun_path, (char*)api_sock);
data/p0f-3.09b/p0f.c:386:7:  [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("/sys/class/net", R_OK | X_OK) && errno != ENOENT)
data/p0f-3.09b/p0f.c:471:9:  [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((char*)read_file, R_OK))
data/p0f-3.09b/p0f.c:487: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 (!access("/sys/class/net", R_OK | X_OK) || errno == ENOENT)
data/p0f-3.09b/p0f.c:565:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf((char*)final_rule, "(tcp and (%s)) or (vlan and tcp and (%s))",
data/p0f-3.09b/p0f.c:572:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf((char*)final_rule, "tcp and (%s)", orig_rule);
data/p0f-3.09b/p0f.c:650: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("/proc/", F_OK) || !access("/sys/", F_OK))
data/p0f-3.09b/p0f.c:650:35:  [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("/proc/", F_OK) || !access("/sys/", F_OK))
data/p0f-3.09b/process.c:1468:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    rptr += sprintf((char*)rptr, _par); \
data/p0f-3.09b/tools/p0f-client.c:125:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(sun.sun_path, argv[1]);
data/p0f-3.09b/p0f.c:644:7:  [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(pw->pw_dir))
data/p0f-3.09b/p0f.c:1030:15:  [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 ((r = getopt(argc, argv, "+LS:df:i:m:o:pr:s:t:u:")) != -1) switch (r) {
data/p0f-3.09b/alloc-inl.h:140: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(ret + ALLOC_OFF, orig + ALLOC_OFF, MIN(size, old_size));
data/p0f-3.09b/alloc-inl.h:199:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return memcpy(ret, str, size);
data/p0f-3.09b/alloc-inl.h:217:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return memcpy(ret, mem, size);
data/p0f-3.09b/alloc-inl.h:235: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(ret, mem, size);
data/p0f-3.09b/fp_mtu.c:46:9:  [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).
  mtu = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:316:10:  [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).
  ittl = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:333:16:  [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).
    ittl_add = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:349:10:  [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).
  olen = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:368:11:  [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).
    mss = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:392:11:  [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).
    win = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:407:11:  [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).
    win = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:421:11:  [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).
    win = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:440:13:  [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).
    scale = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:474:21:  [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).
      opt_eol_pad = atol((char*)val);
data/p0f-3.09b/fp_tcp.c:522:15:  [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).
      optno = atol((char*)val);
data/p0f-3.09b/p0f.c:168:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  s32 f = open("/dev/urandom", O_RDONLY);
data/p0f-3.09b/p0f.c:204:9:  [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).
    i = atol(de->d_name);
data/p0f-3.09b/p0f.c:223:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  log_fd = open((char*)log_file, O_WRONLY | O_APPEND | O_NOFOLLOW | O_LARGEFILE);
data/p0f-3.09b/p0f.c:235:14:  [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).
    log_fd = open((char*)log_file, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW,
data/p0f-3.09b/p0f.c:379: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 pcap_err[PCAP_ERRBUF_SIZE];
data/p0f-3.09b/p0f.c:433: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 pcap_err[PCAP_ERRBUF_SIZE];
data/p0f-3.09b/p0f.c:460: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 pcap_err[PCAP_ERRBUF_SIZE];
data/p0f-3.09b/p0f.c:1048:22:  [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).
      api_max_conn = atol(optarg);
data/p0f-3.09b/p0f.c:1216: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).
    null_fd = open("/dev/null", O_RDONLY);
data/p0f-3.09b/process.c:184: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[128];
data/p0f-3.09b/process.c:191:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(tmp, "%u.%u.%u.%u", data[0], data[1], data[2], data[3]);
data/p0f-3.09b/process.c:195:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(tmp, "%x:%x:%x:%x:%x:%x:%x:%x",
data/p0f-3.09b/process.c:331: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(pk.src, ip4->src, 4);
data/p0f-3.09b/process.c:332: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(pk.dst, ip4->dst, 4);
data/p0f-3.09b/process.c:410: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(pk.src, ip6->src, 16);
data/p0f-3.09b/process.c:411: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(pk.dst, ip6->dst, 16);
data/p0f-3.09b/process.c:906: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(nh->addr, addr, (ip_ver == IP_VER4) ? 4 : 16);
data/p0f-3.09b/process.c:1339: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.
          memcpy(f->request + f->req_len, pk->payload, read_amt);
data/p0f-3.09b/process.c:1369: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.
          memcpy(f->response + f->resp_len, pk->payload, read_amt);
data/p0f-3.09b/readfp.c:391: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).
  f = open((char*)fname, O_RDONLY);
data/p0f-3.09b/tools/p0f-sendsyn.c:153: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(&sin.sin_addr.s_addr, ip4->dst, 4);
data/p0f-3.09b/tools/p0f-sendsyn.c:160:26:  [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).
  tcp->dport     = htons(atoi(argv[3]));
data/p0f-3.09b/tools/p0f-sendsyn.c:170: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(opts, opt_combos[i], 24);
data/p0f-3.09b/tools/p0f-sendsyn6.c:166: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(&sin.sin6_addr, ip6->dst, 16);
data/p0f-3.09b/tools/p0f-sendsyn6.c:173:26:  [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).
  tcp->dport     = htons(atoi(argv[3]));
data/p0f-3.09b/tools/p0f-sendsyn6.c:183: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(opts, opt_combos[i], 24);
data/p0f-3.09b/types.h:35:36:  [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 RD16(_val)  ({ u16 _ret; memcpy(&_ret, &(_val), 2); _ret; })
data/p0f-3.09b/types.h:36:36:  [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 RD32(_val)  ({ u32 _ret; memcpy(&_ret, &(_val), 4); _ret; })
data/p0f-3.09b/types.h:37:36:  [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 RD16p(_ptr) ({ u16 _ret; memcpy(&_ret, _ptr, 2); _ret; })
data/p0f-3.09b/types.h:38:36:  [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 RD32p(_ptr) ({ u32 _ret; memcpy(&_ret, _ptr, 4); _ret; })
data/p0f-3.09b/alloc-inl.h:188: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).
  size = strlen((char*)str) + 1;
data/p0f-3.09b/api.c:73:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)r->os_name, (char*)fp_os_names[h->last_name_id],
data/p0f-3.09b/api.c:77:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
       strncpy((char*)r->os_flavor, (char*)h->last_flavor, P0F_STR_MAX + 1);
data/p0f-3.09b/api.c:83:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)r->http_name, (char*)fp_os_names[h->http_name_id],
data/p0f-3.09b/api.c:87:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy((char*)r->http_flavor, (char*)h->http_flavor, P0F_STR_MAX + 1);
data/p0f-3.09b/api.c:92:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)r->link_type, (char*)h->link_type, P0F_STR_MAX + 1);
data/p0f-3.09b/api.c:95:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)r->language, (char*)h->language, P0F_STR_MAX + 1);
data/p0f-3.09b/fp_http.c:51: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).
#define SLOF(_str) (u8*)_str, strlen((char*)_str)
data/p0f-3.09b/p0f.c:176:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(f, &hash_seed, sizeof(hash_seed)) != sizeof(hash_seed))
data/p0f-3.09b/p0f.c:271: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((char*)api_sock) >= sizeof(u.sun_path))
data/p0f-3.09b/p0f.c:285:15:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  old_umask = umask(0777 ^ API_MODE);
data/p0f-3.09b/p0f.c:290:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask(old_umask);
data/p0f-3.09b/p0f.c:563:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      final_rule = ck_alloc(strlen((char*)orig_rule) * 2 + 64);
data/p0f-3.09b/p0f.c:570:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      final_rule = ck_alloc(strlen((char*)orig_rule) + 16);
data/p0f-3.09b/p0f.c:940:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          i = read(pfds[cur].fd, 
data/p0f-3.09b/readfp.c:403:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(f, data, st.st_size) != st.st_size)
data/p0f-3.09b/tools/p0f-client.c:122: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(argv[1]) >= sizeof(sun.sun_path))
data/p0f-3.09b/tools/p0f-client.c:133:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(sock, &r, sizeof(struct p0f_api_response)) !=
data/p0f-3.09b/tools/p0f-sendsyn.c:176:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(100000);
data/p0f-3.09b/tools/p0f-sendsyn6.c:189:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(100000);

ANALYSIS SUMMARY:

Hits = 87
Lines analyzed = 8784 in approximately 0.22 seconds (40422 lines/second)
Physical Source Lines of Code (SLOC) = 4841
Hits@level = [0]   7 [1]  20 [2]  45 [3]   2 [4]  20 [5]   0
Hits@level+ = [0+]  94 [1+]  87 [2+]  67 [3+]  22 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 19.4175 [1+] 17.9715 [2+] 13.8401 [3+] 4.54452 [4+] 4.13138 [5+]   0
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.