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/etherape-0.9.19/src/datastructs.c
Examining data/etherape-0.9.19/src/node_windows.h
Examining data/etherape-0.9.19/src/diagram.c
Examining data/etherape-0.9.19/src/stats/prot_types.h
Examining data/etherape-0.9.19/src/stats/decode_proto.c
Examining data/etherape-0.9.19/src/stats/node_id.c
Examining data/etherape-0.9.19/src/stats/decode_proto.h
Examining data/etherape-0.9.19/src/stats/protocols.c
Examining data/etherape-0.9.19/src/stats/node.c
Examining data/etherape-0.9.19/src/stats/links.h
Examining data/etherape-0.9.19/src/stats/links.c
Examining data/etherape-0.9.19/src/stats/basic_stats.c
Examining data/etherape-0.9.19/src/stats/node_id.h
Examining data/etherape-0.9.19/src/stats/traffic_stats.h
Examining data/etherape-0.9.19/src/stats/protocols.h
Examining data/etherape-0.9.19/src/stats/conversations.c
Examining data/etherape-0.9.19/src/stats/util.h
Examining data/etherape-0.9.19/src/stats/conversations.h
Examining data/etherape-0.9.19/src/stats/util.c
Examining data/etherape-0.9.19/src/stats/node.h
Examining data/etherape-0.9.19/src/stats/traffic_stats.c
Examining data/etherape-0.9.19/src/stats/pkt_info.h
Examining data/etherape-0.9.19/src/stats/basic_stats.h
Examining data/etherape-0.9.19/src/ui_utils.c
Examining data/etherape-0.9.19/src/main.c
Examining data/etherape-0.9.19/src/preferences.h
Examining data/etherape-0.9.19/src/menus.h
Examining data/etherape-0.9.19/src/info_windows.h
Examining data/etherape-0.9.19/src/common.h
Examining data/etherape-0.9.19/src/ui_utils.h
Examining data/etherape-0.9.19/src/pref_dialog.c
Examining data/etherape-0.9.19/src/export.h
Examining data/etherape-0.9.19/src/menus.c
Examining data/etherape-0.9.19/src/compat.c
Examining data/etherape-0.9.19/src/main.h
Examining data/etherape-0.9.19/src/export.c
Examining data/etherape-0.9.19/src/node_windows.c
Examining data/etherape-0.9.19/src/callbacks.c
Examining data/etherape-0.9.19/src/info_windows.c
Examining data/etherape-0.9.19/src/capture/capctl.c
Examining data/etherape-0.9.19/src/capture/capctl-msg.h
Examining data/etherape-0.9.19/src/capture/cap-util.c
Examining data/etherape-0.9.19/src/capture/capture.h
Examining data/etherape-0.9.19/src/capture/cap-util.h
Examining data/etherape-0.9.19/src/capture/capctl.h
Examining data/etherape-0.9.19/src/capture/capture.c
Examining data/etherape-0.9.19/src/compat.h
Examining data/etherape-0.9.19/src/callbacks.h
Examining data/etherape-0.9.19/src/preferences.c
Examining data/etherape-0.9.19/src/appdata.h
Examining data/etherape-0.9.19/src/diagram.h
Examining data/etherape-0.9.19/src/appdata.c
Examining data/etherape-0.9.19/src/names/names.h
Examining data/etherape-0.9.19/src/names/ip-cache.c
Examining data/etherape-0.9.19/src/names/eth_resolv.h
Examining data/etherape-0.9.19/src/names/ip-cache.h
Examining data/etherape-0.9.19/src/names/names_netbios.h
Examining data/etherape-0.9.19/src/names/eth_resolv.c
Examining data/etherape-0.9.19/src/names/dns.h
Examining data/etherape-0.9.19/src/names/thread_resolve.h
Examining data/etherape-0.9.19/src/names/ares_resolve.h
Examining data/etherape-0.9.19/src/names/names.c
Examining data/etherape-0.9.19/src/names/thread_resolve.c
Examining data/etherape-0.9.19/src/names/ares_resolve.c
Examining data/etherape-0.9.19/src/names/names_netbios.c
Examining data/etherape-0.9.19/src/names/dns.c
Examining data/etherape-0.9.19/src/datastructs.h
Examining data/etherape-0.9.19/src/pref_dialog.h
Examining data/etherape-0.9.19/config.h

FINAL RESULTS:

data/etherape-0.9.19/src/capture/capture.c:77:36:  [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 __xmessage(pfx, fmt, ...)  fprintf(stderr, pfx ": "fmt "\n", ## __VA_ARGS__)
data/etherape-0.9.19/src/names/eth_resolv.c:59: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(ent->hostname, hostname);
data/etherape-0.9.19/src/main.c:172:8:  [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.
  if (!getenv("GNOME_DESKTOP_ICON"))
data/etherape-0.9.19/src/preferences.c:99:49:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  return g_strdup_printf("%s/.gnome2/Etherape", g_get_home_dir());
data/etherape-0.9.19/src/ui_utils.c:140:15:  [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.
  env_value = getenv("HOME");
data/etherape-0.9.19/src/capture/capctl.c:68: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 lastpkt_data[MAXCAPSIZE];
data/etherape-0.9.19/src/capture/capctl.c:273: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 pktdata[MAXCAPSIZE];
data/etherape-0.9.19/src/capture/capctl.c:392: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(filecap_state.lastpkt_data, nextpkt_data, copylen);
data/etherape-0.9.19/src/capture/capctl.c:412: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 errbuf[PCAP_ERRBUF_SIZE];
data/etherape-0.9.19/src/capture/capture.c:148: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 errbuf[PCAP_ERRBUF_SIZE];
data/etherape-0.9.19/src/capture/capture.c:184: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 errbuf[PCAP_ERRBUF_SIZE];
data/etherape-0.9.19/src/capture/capture.c:340: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 buf[MAXCAPSIZE + sizeof(struct pcap_pkthdr)];
data/etherape-0.9.19/src/capture/capture.c:384: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(pktbuf.buf, hdr, sizeof(*hdr));
data/etherape-0.9.19/src/capture/capture.c:385: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(pktbuf.buf + sizeof(*hdr), data, hdr->caplen);
data/etherape-0.9.19/src/export.c:41: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 timebuf[256];
data/etherape-0.9.19/src/export.c:98: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).
  fout = fopen(ofile, "wb");
data/etherape-0.9.19/src/names/eth_resolv.c:68: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 ethline[ETHBUFSIZE];
data/etherape-0.9.19/src/names/eth_resolv.c:73: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 hostname[ETHBUFSIZE];
data/etherape-0.9.19/src/names/eth_resolv.c:78: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).
  ethf = fopen(EPATH_ETHERS, "r");
data/etherape-0.9.19/src/names/names_netbios.c:196: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 const char hex_digits[16] = "0123456780abcdef";
data/etherape-0.9.19/src/names/names_netbios.c:223: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 name[MAXDNAME];
data/etherape-0.9.19/src/names/names_netbios.c:224: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 nbname[NBNAME_BUF_LEN];
data/etherape-0.9.19/src/names/names_netbios.c:225: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 buf[16];
data/etherape-0.9.19/src/names/thread_resolve.c:106: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 extrabuf[4096];
data/etherape-0.9.19/src/stats/decode_proto.c:1558: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(mesg, dp->cur_packet, size);
data/etherape-0.9.19/src/stats/util.c:95: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 buf[INET6_ADDRSTRLEN];
data/etherape-0.9.19/src/stats/util.c:200: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 buf[INET6_ADDRSTRLEN];
data/etherape-0.9.19/src/capture/cap-util.c:59:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read(fd, (char *)buf + total, count - total);
data/etherape-0.9.19/src/capture/capctl.c:250:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (devname = raw_msg; *devname; devname += strlen(devname) + 1)
data/etherape-0.9.19/src/capture/capctl.c:298:52:  [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).
  req.startcap.devlen = appdata.source.interface ? strlen(appdata.source.interface) : 0;
data/etherape-0.9.19/src/capture/capctl.c:666:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  req.setfilter.bpflen = strlen(filter);
data/etherape-0.9.19/src/capture/capture.c:113: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).
  resp.err.msglen = strlen(msg);
data/etherape-0.9.19/src/capture/capture.c:120: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).
  ctrl_send(str, strlen(str));
data/etherape-0.9.19/src/capture/capture.c:162:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    resp.listdevs.len += strlen(dev->name) + 1;
data/etherape-0.9.19/src/capture/capture.c:170:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ctrl_send(dev->name, strlen(dev->name) + 1);
data/etherape-0.9.19/src/capture/capture.c:226:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  resp.startcap.devlen = strlen(devname);
data/etherape-0.9.19/src/datastructs.c:193:34:  [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 (!colors_protocols[1] || !strlen(colors_protocols[1]))
data/etherape-0.9.19/src/diagram.c:421:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (canvas_background.image.path && strlen(canvas_background.image.path))
data/etherape-0.9.19/src/main.c:332: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).
  for (p = line + strlen(line) - 1; p > line; p--) {
data/etherape-0.9.19/src/names/eth_resolv.c:57: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).
  struct ether_ent *ent = g_malloc(sizeof(*ent) + strlen(hostname) + 1);
data/etherape-0.9.19/src/names/eth_resolv.c:86:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    linelen = strlen(ethline);
data/etherape-0.9.19/src/names/eth_resolv.c:92:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c = fgetc(ethf)) != '\n') {
data/etherape-0.9.19/src/names/eth_resolv.c:125: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).
  addrstr_size = strlen("XX:XX:XX:XX:XX:XX")+1;
data/etherape-0.9.19/src/stats/util.c:72:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(dst, src, maxlen - 1);       /* no need to copy that last char */
data/etherape-0.9.19/src/stats/util.c:80: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).
  size_t lendst = strlen(dst);
data/etherape-0.9.19/src/stats/util.c:83:3:  [1] (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.
  strncat(dst, src, maxlen - strlen(dst));
data/etherape-0.9.19/src/stats/util.c:83:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  strncat(dst, src, maxlen - strlen(dst));

ANALYSIS SUMMARY:

Hits = 47
Lines analyzed = 16736 in approximately 0.48 seconds (34697 lines/second)
Physical Source Lines of Code (SLOC) = 11357
Hits@level = [0]  13 [1]  20 [2]  22 [3]   3 [4]   2 [5]   0
Hits@level+ = [0+]  60 [1+]  47 [2+]  27 [3+]   5 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 5.28309 [1+] 4.13842 [2+] 2.37739 [3+] 0.440257 [4+] 0.176103 [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.