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/arp-scan-1.9.7/arp-scan.c
Examining data/arp-scan-1.9.7/arp-scan.h
Examining data/arp-scan-1.9.7/error.c
Examining data/arp-scan-1.9.7/getopt.c
Examining data/arp-scan-1.9.7/getopt.h
Examining data/arp-scan-1.9.7/getopt1.c
Examining data/arp-scan-1.9.7/link-bpf.c
Examining data/arp-scan-1.9.7/link-dlpi.c
Examining data/arp-scan-1.9.7/link-packet-socket.c
Examining data/arp-scan-1.9.7/mt19937ar.c
Examining data/arp-scan-1.9.7/strlcat.c
Examining data/arp-scan-1.9.7/strlcpy.c
Examining data/arp-scan-1.9.7/utils.c
Examining data/arp-scan-1.9.7/wrappers.c

FINAL RESULTS:

data/arp-scan-1.9.7/error.c:92:4:  [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(buf, MAXLINE, fmt, ap);
data/arp-scan-1.9.7/link-dlpi.c:117:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      if (sscanf(p, "%s (PPA %d)\n", dev, &ppa) != 2)
data/arp-scan-1.9.7/utils.c:168:11:  [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.
      n = vsnprintf (p, size, fmt, ap);
data/arp-scan-1.9.7/arp-scan.h:68:9:  [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.
#define getopt getopt_loser
data/arp-scan-1.9.7/arp-scan.h:70:8:  [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.
#undef getopt
data/arp-scan-1.9.7/getopt.c:218:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
#ifndef getenv
data/arp-scan-1.9.7/getopt.c:219:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
extern char *getenv ();
data/arp-scan-1.9.7/getopt.c:404:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/arp-scan-1.9.7/getopt.c:1194:1:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt (argc, argv, optstring)
data/arp-scan-1.9.7/getopt.c:1224:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/arp-scan-1.9.7/getopt.h:145:12:  [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.
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
data/arp-scan-1.9.7/getopt.h:147:12:  [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.
extern int getopt ();
data/arp-scan-1.9.7/getopt.h:151:12:  [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.
extern int getopt_long (int ___argc, char *const *___argv,
data/arp-scan-1.9.7/getopt.h:165:12:  [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.
extern int getopt ();
data/arp-scan-1.9.7/getopt.h:167:12:  [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.
extern int getopt_long ();
data/arp-scan-1.9.7/getopt1.c:71:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/arp-scan-1.9.7/getopt1.c:98: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.
libc_hidden_def (getopt_long)
data/arp-scan-1.9.7/getopt1.c:131:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/arp-scan-1.9.7/arp-scan.c:47: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 filename[MAXLINE];		/* Target list file name */
data/arp-scan-1.9.7/arp-scan.c:63: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.
static unsigned char arp_sha[ETH_ALEN];	/* Source Ethernet MAC Address */
data/arp-scan-1.9.7/arp-scan.c:65: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 ouifilename[MAXLINE];	/* OUI filename */
data/arp-scan-1.9.7/arp-scan.c:66: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 iabfilename[MAXLINE];	/* IAB filename */
data/arp-scan-1.9.7/arp-scan.c:67: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 macfilename[MAXLINE];	/* MAC filename */
data/arp-scan-1.9.7/arp-scan.c:68: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 pcap_savefile[MAXLINE];	/* pcap savefile filename */
data/arp-scan-1.9.7/arp-scan.c:75: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.
static unsigned char arp_tha[6] = {0, 0, 0, 0, 0, 0};
data/arp-scan-1.9.7/arp-scan.c:76: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.
static unsigned char target_mac[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
data/arp-scan-1.9.7/arp-scan.c:77: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.
static unsigned char source_mac[6];
data/arp-scan-1.9.7/arp-scan.c:86: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 pkt_filename[MAXLINE];	/* Read/Write packet to file filename */
data/arp-scan-1.9.7/arp-scan.c:111: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 errbuf[PCAP_ERRBUF_SIZE];
data/arp-scan-1.9.7/arp-scan.c:119:13:  [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 interface_mac[ETH_ALEN];
data/arp-scan-1.9.7/arp-scan.c:211: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.
         memcpy(source_mac, interface_mac, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:213: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.
         memcpy(arp_sha, interface_mac, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:376:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char line[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:382:20:  [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(filename, "r")) == NULL) {
data/arp-scan-1.9.7/arp-scan.c:402:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char localnet_descr[32];
data/arp-scan-1.9.7/arp-scan.c:434:27:  [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).
      write_pkt_to_file = open(pkt_filename, O_WRONLY|O_CREAT|O_TRUNC, 0666);
data/arp-scan-1.9.7/arp-scan.c:691:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char oui_string[13];	/* Space for full hw addr plus NULL */
data/arp-scan-1.9.7/arp-scan.c:834:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   unsigned char buf[MAX_FRAME];
data/arp-scan-1.9.7/arp-scan.c:842:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(frame_hdr.dest_addr, target_mac, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:843:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(frame_hdr.src_addr, source_mac, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:854:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(arpei.ar_sha, arp_sha, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:855:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(arpei.ar_tha, arp_tha, ETH_ALEN);
data/arp-scan-1.9.7/arp-scan.c:1275: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.
         char errbuf[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:1282: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.
         char errbuf[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:1289: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.
         char errbuf[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:1339: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.
         char ipstr[16];
data/arp-scan-1.9.7/arp-scan.c:1389: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.
         char ipstr[16];
data/arp-scan-1.9.7/arp-scan.c:1417: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.
         char ipstr[16];
data/arp-scan-1.9.7/arp-scan.c:1489:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(he->addr), &addr, sizeof(struct in_addr));
data/arp-scan-1.9.7/arp-scan.c:1688:13:  [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 extra_data[MAX_FRAME];
data/arp-scan-1.9.7/arp-scan.c:2015: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 err[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:2041:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(addr, &sa_in.sin_addr, sizeof(struct in_addr));
data/arp-scan-1.9.7/arp-scan.c:2064: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 ip_str[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:2114:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(frame_hdr->dest_addr), sizeof(frame_hdr->dest_addr));
data/arp-scan-1.9.7/arp-scan.c:2116:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(frame_hdr->src_addr), sizeof(frame_hdr->src_addr));
data/arp-scan-1.9.7/arp-scan.c:2125: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(cp, vlan_tag, sizeof(vlan_tag));
data/arp-scan-1.9.7/arp-scan.c:2126: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(cp+2, &tci, sizeof(tci));
data/arp-scan-1.9.7/arp-scan.c:2134: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(cp, &(frame_size), sizeof(frame_size));
data/arp-scan-1.9.7/arp-scan.c:2136: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(cp, &(frame_hdr->frame_type), sizeof(frame_hdr->frame_type));
data/arp-scan-1.9.7/arp-scan.c:2143: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(cp, llc_snap, sizeof(llc_snap));
data/arp-scan-1.9.7/arp-scan.c:2144: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(cp+6, &(frame_hdr->frame_type), sizeof(frame_hdr->frame_type));
data/arp-scan-1.9.7/arp-scan.c:2151:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_hrd), sizeof(arp_pkt->ar_hrd));
data/arp-scan-1.9.7/arp-scan.c:2153:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_pro), sizeof(arp_pkt->ar_pro));
data/arp-scan-1.9.7/arp-scan.c:2155:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_hln), sizeof(arp_pkt->ar_hln));
data/arp-scan-1.9.7/arp-scan.c:2157:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_pln), sizeof(arp_pkt->ar_pln));
data/arp-scan-1.9.7/arp-scan.c:2159:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_op), sizeof(arp_pkt->ar_op));
data/arp-scan-1.9.7/arp-scan.c:2161:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_sha), sizeof(arp_pkt->ar_sha));
data/arp-scan-1.9.7/arp-scan.c:2163:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_sip), sizeof(arp_pkt->ar_sip));
data/arp-scan-1.9.7/arp-scan.c:2165:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_tha), sizeof(arp_pkt->ar_tha));
data/arp-scan-1.9.7/arp-scan.c:2167:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(cp, &(arp_pkt->ar_tip), sizeof(arp_pkt->ar_tip));
data/arp-scan-1.9.7/arp-scan.c:2179: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(cp, frame_padding, safe_padding_len);
data/arp-scan-1.9.7/arp-scan.c:2222:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(frame_hdr->dest_addr), cp, sizeof(frame_hdr->dest_addr));
data/arp-scan-1.9.7/arp-scan.c:2224:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(frame_hdr->src_addr), cp, sizeof(frame_hdr->src_addr));
data/arp-scan-1.9.7/arp-scan.c:2240:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(frame_hdr->frame_type), cp, sizeof(frame_hdr->frame_type));
data/arp-scan-1.9.7/arp-scan.c:2254:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_hrd), cp, sizeof(arp_pkt->ar_hrd));
data/arp-scan-1.9.7/arp-scan.c:2256:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_pro), cp, sizeof(arp_pkt->ar_pro));
data/arp-scan-1.9.7/arp-scan.c:2258:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_hln), cp, sizeof(arp_pkt->ar_hln));
data/arp-scan-1.9.7/arp-scan.c:2260:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_pln), cp, sizeof(arp_pkt->ar_pln));
data/arp-scan-1.9.7/arp-scan.c:2262:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_op), cp, sizeof(arp_pkt->ar_op));
data/arp-scan-1.9.7/arp-scan.c:2264:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_sha), cp, sizeof(arp_pkt->ar_sha));
data/arp-scan-1.9.7/arp-scan.c:2266:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_sip), cp, sizeof(arp_pkt->ar_sip));
data/arp-scan-1.9.7/arp-scan.c:2268:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_tha), cp, sizeof(arp_pkt->ar_tha));
data/arp-scan-1.9.7/arp-scan.c:2270:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(&(arp_pkt->ar_tip), cp, sizeof(arp_pkt->ar_tip));
data/arp-scan-1.9.7/arp-scan.c:2278: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.
         memcpy(extra_data, cp, length);
data/arp-scan-1.9.7/arp-scan.c:2308: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 line[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:2319: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.
         char reg_errbuf[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:2328: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).
   if ((fp = fopen(map_filename, "r")) == NULL) {
data/arp-scan-1.9.7/arp-scan.c:2343: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.
         char reg_errbuf[MAXLINE];
data/arp-scan-1.9.7/arp-scan.c:2427: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 errbuf[PCAP_ERRBUF_SIZE];
data/arp-scan-1.9.7/arp-scan.c:2460:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(ip_addr, &(sin->sin_addr), sizeof(*ip_addr));
data/arp-scan-1.9.7/error.c:88:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buf[MAXLINE];
data/arp-scan-1.9.7/link-bpf.c:111:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(hw_address, sdl->sdl_data + sdl->sdl_nlen, ETH_ALEN);
data/arp-scan-1.9.7/link-dlpi.c:104: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 dev[16];
data/arp-scan-1.9.7/link-dlpi.c:105:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buf[256];
data/arp-scan-1.9.7/link-dlpi.c:187:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   unsigned char buf[MAXDLBUF];
data/arp-scan-1.9.7/link-dlpi.c:189: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 dev[16];
data/arp-scan-1.9.7/link-dlpi.c:197:22:  [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 ((handle->fd = open("/dev/streams/dlb", O_RDWR)) < 0) {
data/arp-scan-1.9.7/link-dlpi.c:213: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).
   ppa = atoi(p);
data/arp-scan-1.9.7/link-dlpi.c:216:22:  [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 ((handle->fd = open(dev, O_RDWR)) < 0) {
data/arp-scan-1.9.7/link-dlpi.c:218:25:  [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 ((handle->fd = open(dev, O_RDWR)) < 0) {
data/arp-scan-1.9.7/link-dlpi.c:285:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   unsigned char buf[MAXDLBUF];
data/arp-scan-1.9.7/link-dlpi.c:301:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(hw_address, buf + dlp->physaddr_ack.dl_addr_offset, ETH_ALEN);
data/arp-scan-1.9.7/link-packet-socket.c:130:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(hw_address, handle->ifr.ifr_ifru.ifru_hwaddr.sa_data, ETH_ALEN);
data/arp-scan-1.9.7/wrappers.c:113: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 device[IF_NAMESIZE + 1];
data/arp-scan-1.9.7/arp-scan.c:1911: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).
            if (strlen(optarg) % 2)     /* Length is odd */
data/arp-scan-1.9.7/arp-scan.c:2356:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(key, line+pmatch[1].rm_so, key_len);
data/arp-scan-1.9.7/arp-scan.c:2358:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(data, line+pmatch[2].rm_so, data_len);
data/arp-scan-1.9.7/error.c:93: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).
   n=strlen(buf);
data/arp-scan-1.9.7/getopt.c:241:51:  [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 (!defined __STDC__ || !__STDC__) && !defined strlen
data/arp-scan-1.9.7/getopt.c:244: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).
extern int strlen (const char *);
data/arp-scan-1.9.7/getopt.c:435:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/arp-scan-1.9.7/getopt.c:663: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).
		== (unsigned int) strlen (p->name))
data/arp-scan-1.9.7/getopt.c:708: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).
	  nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:774: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).
		  nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:808: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).
		  nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:813: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).
	  nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:1000:51:  [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 ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/arp-scan-1.9.7/getopt.c:1040: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).
	    nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:1078: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).
		    nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:1110: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).
		    nextchar += strlen (nextchar);
data/arp-scan-1.9.7/getopt.c:1114: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).
	    nextchar += strlen (nextchar);
data/arp-scan-1.9.7/link-dlpi.c:115:38:  [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).
   for (p = buf; p < buf + len; p += strlen(p) + 1) {
data/arp-scan-1.9.7/strlcat.c:44: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).
                return(dlen + strlen(s));
data/arp-scan-1.9.7/utils.c:129: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(string) %2 ) {	/* Length is odd */
data/arp-scan-1.9.7/utils.c:134: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(string) / 2;
data/arp-scan-1.9.7/utils.c:294: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).
   bandwidth_len=strlen(bandwidth_str);
data/arp-scan-1.9.7/utils.c:338: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).
   interval_len=strlen(interval_str);
data/arp-scan-1.9.7/utils.c:384: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(str) + 1;	/* Allow space for terminating NULL */

ANALYSIS SUMMARY:

Hits = 128
Lines analyzed = 5845 in approximately 0.21 seconds (27652 lines/second)
Physical Source Lines of Code (SLOC) = 3618
Hits@level = [0] 336 [1]  24 [2]  86 [3]  15 [4]   3 [5]   0
Hits@level+ = [0+] 464 [1+] 128 [2+] 104 [3+]  18 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 128.248 [1+] 35.3787 [2+] 28.7452 [3+] 4.97512 [4+] 0.829187 [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.