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/fastnetmon-1.1.4/src/actions/gobgp_action.cpp
Examining data/fastnetmon-1.1.4/src/actions/gobgp_action.h
Examining data/fastnetmon-1.1.4/src/actions/pfring_hardware_filter_action.cpp
Examining data/fastnetmon-1.1.4/src/actions/pfring_hardware_filter_action.h
Examining data/fastnetmon-1.1.4/src/afpacket_plugin/afpacket_collector.cpp
Examining data/fastnetmon-1.1.4/src/afpacket_plugin/afpacket_collector.h
Examining data/fastnetmon-1.1.4/src/bgp_flow_spec.cpp
Examining data/fastnetmon-1.1.4/src/bgp_flow_spec.h
Examining data/fastnetmon-1.1.4/src/concurrentqueue.h
Examining data/fastnetmon-1.1.4/src/example_plugin/example_collector.cpp
Examining data/fastnetmon-1.1.4/src/example_plugin/example_collector.h
Examining data/fastnetmon-1.1.4/src/fast_dpi.cpp
Examining data/fastnetmon-1.1.4/src/fast_library.cpp
Examining data/fastnetmon-1.1.4/src/fast_priority_queue.cpp
Examining data/fastnetmon-1.1.4/src/fast_priority_queue.h
Examining data/fastnetmon-1.1.4/src/fastnetmon.cpp
Examining data/fastnetmon-1.1.4/src/fastnetmon_actions.h
Examining data/fastnetmon-1.1.4/src/fastnetmon_api_client.cpp
Examining data/fastnetmon-1.1.4/src/fastnetmon_client.cpp
Examining data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c
Examining data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.h
Examining data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp
Examining data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.h
Examining data/fastnetmon-1.1.4/src/fastnetmon_tests.cpp
Examining data/fastnetmon-1.1.4/src/fastnetmon_types.h
Examining data/fastnetmon-1.1.4/src/ipfix_rfc.cpp
Examining data/fastnetmon-1.1.4/src/ipfix_rfc.h
Examining data/fastnetmon-1.1.4/src/libpatricia/patricia.c
Examining data/fastnetmon-1.1.4/src/libpatricia/patricia.h
Examining data/fastnetmon-1.1.4/src/netflow_plugin/netflow.h
Examining data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.h
Examining data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp
Examining data/fastnetmon-1.1.4/src/netmap_plugin/netmap_collector.cpp
Examining data/fastnetmon-1.1.4/src/netmap_plugin/netmap_collector.h
Examining data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap.h
Examining data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h
Examining data/fastnetmon-1.1.4/src/packet_storage.h
Examining data/fastnetmon-1.1.4/src/pcap_plugin/pcap_collector.cpp
Examining data/fastnetmon-1.1.4/src/pcap_plugin/pcap_collector.h
Examining data/fastnetmon-1.1.4/src/pcap_reader.cpp
Examining data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp
Examining data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.h
Examining data/fastnetmon-1.1.4/src/plugin_runner.cpp
Examining data/fastnetmon-1.1.4/src/sflow_plugin/sflow.h
Examining data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp
Examining data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.h
Examining data/fastnetmon-1.1.4/src/sflow_plugin/sflow_data.h
Examining data/fastnetmon-1.1.4/src/snabbswitch_plugin/snabbswitch_collector.cpp
Examining data/fastnetmon-1.1.4/src/snabbswitch_plugin/snabbswitch_collector.h
Examining data/fastnetmon-1.1.4/src/tests/af_packet.cpp
Examining data/fastnetmon-1.1.4/src/tests/af_packet_ring.cpp
Examining data/fastnetmon-1.1.4/src/tests/conntrack_prototype.cpp
Examining data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c
Examining data/fastnetmon-1.1.4/src/tests/ip_lookup.cpp
Examining data/fastnetmon-1.1.4/src/tests/jsonc.cpp
Examining data/fastnetmon-1.1.4/src/tests/lpm_performance_tests.cpp
Examining data/fastnetmon-1.1.4/src/tests/lua_integration.cpp
Examining data/fastnetmon-1.1.4/src/tests/mongodb_client.cpp
Examining data/fastnetmon-1.1.4/src/tests/netmap.cpp
Examining data/fastnetmon-1.1.4/src/tests/parser_performance_tests.cpp
Examining data/fastnetmon-1.1.4/src/tests/patricia_performance_tests.c
Examining data/fastnetmon-1.1.4/src/tests/pcap_writer.cpp
Examining data/fastnetmon-1.1.4/src/tests/pfring_parser_zc_issue.c
Examining data/fastnetmon-1.1.4/src/tests/promisc.cpp
Examining data/fastnetmon-1.1.4/src/tests/snabb/capturecallback.cpp
Examining data/fastnetmon-1.1.4/src/tests/snabb/capturetodisk.cpp
Examining data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp
Examining data/fastnetmon-1.1.4/src/tests/sort_struct.cpp
Examining data/fastnetmon-1.1.4/src/tests/spsc_prototype.cpp
Examining data/fastnetmon-1.1.4/src/tests/store_data_to_graphite.cpp
Examining data/fastnetmon-1.1.4/src/tests/test_cidr.cpp
Examining data/fastnetmon-1.1.4/src/tests/tins_parser.cpp
Examining data/fastnetmon-1.1.4/src/tests/traffic_structures_performance_tests.cpp
Examining data/fastnetmon-1.1.4/src/tests/tsc_timers.cpp
Examining data/fastnetmon-1.1.4/src/unified_parser.cpp
Examining data/fastnetmon-1.1.4/src/unified_parser.hpp
Examining data/fastnetmon-1.1.4/src/fast_library.h
Examining data/fastnetmon-1.1.4/src/fast_dpi.h

FINAL RESULTS:

data/fastnetmon-1.1.4/src/fastnetmon.cpp:2422:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        chmod(cli_stats_file_path.c_str(), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH);	    
data/fastnetmon-1.1.4/src/fast_dpi.cpp:25:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, sizeof(buf)-1, format, va_ap);
data/fastnetmon-1.1.4/src/fast_library.cpp:235: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(path.c_str(), 0) == 0) {
data/fastnetmon-1.1.4/src/fast_library.cpp:539:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE* pipe = popen(cmd.c_str(), "r");
data/fastnetmon-1.1.4/src/fastnetmon.cpp:630:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE* pipe = popen(cmd.c_str(), "w");
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3059:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(bgp_message, "announce route %s next-hop %s community %s\n",
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3062:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(bgp_message, "withdraw route %s next-hop %s\n", prefix_as_string_with_mask.c_str(), exabgp_next_hop.c_str());
data/fastnetmon-1.1.4/src/fastnetmon_tests.cpp:309:27:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    int system_ret_code = system("/usr/src/exabgp/sbin/exabgp --test /tmp/exabgp_test_config.conf 2>/dev/null");
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:24:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(bgp_message, "%s route %s next-hop %s community %s\n", action, ip_cidr_form, next_hop, exabgp_community);
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:44:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(bgp_message, "%s route %s\n", action, ip_cidr_form);
data/fastnetmon-1.1.4/src/tests/ip_lookup.cpp:42:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE* pipe = popen(cmd.c_str(), "r");
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:221:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, sizeof(buf)-1, format, va_ap);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2849: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.
    if (getenv("DUMP_ALL_PACKETS") != NULL) {
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2853: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.
    if (getenv("DUMP_OTHER_PACKETS") != NULL) {
data/fastnetmon-1.1.4/src/fastnetmon_client.cpp:38:41:  [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.
        char* cli_stats_file_path_env = getenv("cli_stats_file_path");
data/fastnetmon-1.1.4/src/concurrentqueue.h:1515: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 elements[sizeof(T) * BLOCK_SIZE];
data/fastnetmon-1.1.4/src/fast_dpi.cpp:7: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[8192], out_buf[8192];
data/fastnetmon-1.1.4/src/fast_dpi.cpp:8: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 theDate[32];
data/fastnetmon-1.1.4/src/fast_library.cpp:45:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    return atoi(line.c_str());
data/fastnetmon-1.1.4/src/fast_library.cpp:157: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 buffer[80];
data/fastnetmon-1.1.4/src/fast_library.cpp:225:24:  [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* check_file = fopen(path.c_str(), "r");
data/fastnetmon-1.1.4/src/fast_library.cpp:510: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 tmbuf[64];
data/fastnetmon-1.1.4/src/fast_library.cpp:511: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[64];
data/fastnetmon-1.1.4/src/fast_library.cpp:542: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 buffer[256];
data/fastnetmon-1.1.4/src/fast_library.cpp:563: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).
    pid_file.open(pid_path.c_str(), std::ios::trunc);
data/fastnetmon-1.1.4/src/fast_library.cpp:751: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 buffer[128];
data/fastnetmon-1.1.4/src/fast_library.cpp:756: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(buffer, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
data/fastnetmon-1.1.4/src/fastnetmon.cpp:959:18:  [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).
    reading_file.open(file_name.c_str(), std::ifstream::in);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2418: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).
    screen_data_file.open(cli_stats_file_path.c_str(), std::ios::trunc);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2594: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).
    check_appendable_file.open(path.c_str(), std::ios::app);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2678: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).
    if (open("/dev/null", O_RDWR) != 0) {
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3056: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 bgp_message[256];    
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3067:23:  [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).
    int exabgp_pipe = open(exabgp_command_pipe.c_str(), O_WRONLY);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3096:23:  [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).
    int exabgp_pipe = open(exabgp_command_pipe.c_str(), O_WRONLY);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3663: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 print_buffer[512];
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3733:20:  [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).
    int filedesc = open(pcap_file_path.c_str(), O_RDONLY);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3757: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 packet_buffer[pcap_header.snaplen];
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3892:34:  [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).
        int pcap_fump_filedesc = open(attack_pcap_dump_path.c_str(), O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3962: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(&unpacked_data, struct_value, sizeof(uint64_t));
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3968: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(unpacked_data, packed_connection_data, sizeof(uint64_t));
data/fastnetmon-1.1.4/src/fastnetmon.cpp:4218:28:  [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).
    my_attack_details_file.open(attack_dump_path.c_str(), std::ios::app);
data/fastnetmon-1.1.4/src/fastnetmon_client.cpp:45: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).
        reading_file.open(cli_stats_file_path.c_str(), std::ifstream::in);
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:208: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 h_dest[ETH_ALEN]; /* destination eth addr */
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:209: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 h_source[ETH_ALEN]; /* source ether addr    */
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:298: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(&hdr->extended_hdr.parsed_pkt.tunnel.tunneled_ip_src.v6, &tunneled_ipv6->saddr,
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:300: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(&hdr->extended_hdr.parsed_pkt.tunnel.tunneled_ip_dst.v6, &tunneled_ipv6->daddr,
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:378: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(&hdr->extended_hdr.parsed_pkt.dmac, eh->h_dest, sizeof(eh->h_dest));
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:379: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(&hdr->extended_hdr.parsed_pkt.smac, eh->h_source, sizeof(eh->h_source));
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:457: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(&hdr->extended_hdr.parsed_pkt.ipv6_src, &ipv6->saddr, sizeof(ipv6->saddr));
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:458: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(&hdr->extended_hdr.parsed_pkt.ipv6_dst, &ipv6->daddr, sizeof(ipv6->daddr));
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:653: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 buf1[32], buf2[32];
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:771: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[sizeof "ff:ff:ff:ff:ff:ff:255.255.255.255"];
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:803: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[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
data/fastnetmon-1.1.4/src/fastnetmon_packet_parser.c:815: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 protoName[8];
data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp:6:20:  [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).
    int filedesc = open(pcap_file_path, O_RDONLY);
data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp:29: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 packet_buffer[pcap_header.snaplen];
data/fastnetmon-1.1.4/src/fastnetmon_tests.cpp:302:17:  [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).
    config_file.open("/tmp/exabgp_test_config.conf", std::ios::trunc);
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:90: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 (dst, xp, sizeof(struct in_addr));
data/fastnetmon-1.1.4/src/libpatricia/patricia.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.
            char buffs[PATRICIA_MAX_THREADS][48+5];
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:143:6:  [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 (buff, "%d.%d.%d.%d/%d", a[0], a[1], a[2], a[3],
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:147:6:  [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 (buff, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:157:6:  [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 (buff + strlen (buff), "/%d", prefix->bitlen);
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:196: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 (&prefix->add.sin6, dest, sizeof(struct in6_addr));
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:212: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 (&prefix->add.sin, dest, sizeof(struct in_addr));
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:246: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 save[MAXLINE];
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:269: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).
	bitlen = atol (cp + 1);
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:273: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 (save, string, cp - string);
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:364:20:  [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 BE_COPY(a) memcpy((u_char*)&a + (sizeof(a) - record_length), data, record_length);
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:372: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(&packet.flow_field, data, record_length); \
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:386: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(&packet.src_ip, data, record_length);
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:389: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(&packet.dst_ip, data, record_length);
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:1149: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 udp_buffer[udp_buffer_size];
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:1169: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 port_as_string[16];
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:1170: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(port_as_string, "%d", netflow_port);
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:1214: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.
            char host[NI_MAXHOST];
data/fastnetmon-1.1.4/src/netflow_plugin/netflow_collector.cpp:1215: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.
            char service[NI_MAXSERV];
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap.h:315:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		ni_name[IFNAMSIZ]; /* name of the interface. */
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap.h:471:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		nr_name[IFNAMSIZ];
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap.h:560:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char nifr_name[IFNAMSIZ];
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap.h:561:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char data[NM_IFRDATA_LEN];
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h:235:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg[NM_ERRBUF_SIZE];
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h:262: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(dst, src, l);
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h:371:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errmsg[MAXERRMSG] = "";
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h:485:10:  [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).
	d->fd = open("/dev/netmap", O_RDWR);
data/fastnetmon-1.1.4/src/netmap_plugin/netmap_includes/net/netmap_user.h:499: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(d->req.nr_name, ifname, namelen);
data/fastnetmon-1.1.4/src/packet_storage.h:40:17:  [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(memory_pos, data_pointer, length);
data/fastnetmon-1.1.4/src/pcap_plugin/pcap_collector.cpp:61: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 errbuf[PCAP_ERRBUF_SIZE];
data/fastnetmon-1.1.4/src/pcap_plugin/pcap_collector.cpp:174: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/fastnetmon-1.1.4/src/pcap_reader.cpp:148: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 print_buffer[512];
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:210: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((struct pfring_pkthdr*)h, &l2tp_header, sizeof(l2tp_header));
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:239: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(packet.src_ipv6.s6_addr, h->extended_hdr.parsed_pkt.ip_src.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:240: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(packet.dst_ipv6.s6_addr, h->extended_hdr.parsed_pkt.ip_dst.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:358: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.
            char stats_buffer[256];
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:365:13:  [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(stats_buffer, "Packets received:\t%lu\n"
data/fastnetmon-1.1.4/src/plugin_runner.cpp:94:18:  [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).
    reading_file.open(file_name.c_str(), std::ifstream::in);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow.h:332: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 bssid[6]; /* BSSID */
data/fastnetmon-1.1.4/src/sflow_plugin/sflow.h:347: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 bssid[6]; /* BSSID */
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:160: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 udp_buffer[udp_buffer_size];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:212:17:  [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(&sample.sourceIP.address.ip_v4, &peer4->sin_addr, 4);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:267: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(&address->address.ip_v6.addr, sample->datap, 16);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:501: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 buf[51];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:552: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(sample->eth_dst, ptr, 6);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:557: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(sample->eth_src, ptr, 6);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:666: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(buf, "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:678: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, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:702: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(current_packet.src_ipv6.s6_addr, sample->ipsrc.address.ip_v6.addr, 16);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:703: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(current_packet.dst_ipv6.s6_addr, sample->ipdst.address.ip_v6.addr, 16);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:852: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(&sample->ipsrc.address, ptr, 16);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:856: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 buf[101];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:861: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(&sample->ipdst.address, ptr, 16);
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:865: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 buf[101];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:903: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[51];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_data.h:191: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_user[SA_MAX_EXTENDED_USER_LEN + 1];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_data.h:194: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_user[SA_MAX_EXTENDED_USER_LEN + 1];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_data.h: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 url[SA_MAX_EXTENDED_URL_LEN + 1];
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_data.h:201: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 host[SA_MAX_EXTENDED_HOST_LEN + 1];
data/fastnetmon-1.1.4/src/tests/af_packet.cpp:168: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 buffer[capture_length];
data/fastnetmon-1.1.4/src/tests/af_packet_ring.cpp:106: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 print_buffer[512];
data/fastnetmon-1.1.4/src/tests/conntrack_prototype.cpp:154: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 data[1500];
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:10:23:  [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).
    int exabgp_pipe = open("/var/run/exabgp.cmd", O_WRONLY);
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:17: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 bgp_message[256];
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:33: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 bgp_message[256];
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:36:23:  [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).
    int exabgp_pipe = open("/var/run/exabgp.cmd", O_WRONLY);
data/fastnetmon-1.1.4/src/tests/ip_lookup.cpp:45: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 buffer[256];
data/fastnetmon-1.1.4/src/tests/ip_lookup.cpp:272:20:  [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).
        int cidr = atoi(subnet_as_string[1].c_str());
data/fastnetmon-1.1.4/src/tests/pcap_writer.cpp:33:20:  [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).
    int filedesc = open(pcap_file_path.c_str(), O_WRONLY|O_CREAT);
data/fastnetmon-1.1.4/src/tests/pfring_parser_zc_issue.c:12: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 buffer[512];
data/fastnetmon-1.1.4/src/tests/snabb/capturetodisk.cpp:37:18:  [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 buffer[1600];
data/fastnetmon-1.1.4/src/tests/snabb/capturetodisk.cpp:208:17:  [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).
    pcap_file = open("/mnt/traffic_capture.pcap", O_TRUNC|O_WRONLY|O_CREAT);
data/fastnetmon-1.1.4/src/tests/snabb/capturetodisk.cpp:259: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(packet_pointer->buffer, data, length);
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:203: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[8192], out_buf[8192];
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:204: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 theDate[32];
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:415: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(packet.src_ipv6.s6_addr, packet_header.extended_hdr.parsed_pkt.ip_src.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:416: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(packet.dst_ipv6.s6_addr, packet_header.extended_hdr.parsed_pkt.ip_dst.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/tests/snabb/ndpicallback.cpp:596: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.
            char print_buffer[512];
data/fastnetmon-1.1.4/src/tests/store_data_to_graphite.cpp:40: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 buffer[256];
data/fastnetmon-1.1.4/src/tests/store_data_to_graphite.cpp:41: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(buffer, "client.ip.in.udp %ld %ld\n", pps, time(NULL));
data/fastnetmon-1.1.4/src/unified_parser.cpp:41:8:  [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(packet.src_ipv6.s6_addr, packet_header.extended_hdr.parsed_pkt.ip_src.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/unified_parser.cpp:42: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(packet.dst_ipv6.s6_addr, packet_header.extended_hdr.parsed_pkt.ip_dst.v6.s6_addr, 16);
data/fastnetmon-1.1.4/src/afpacket_plugin/afpacket_collector.cpp:83:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ifr.ifr_name, interface_name.c_str(), sizeof(ifr.ifr_name));
data/fastnetmon-1.1.4/src/fast_library.cpp:545:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t newbuflen = strlen(buffer);
data/fastnetmon-1.1.4/src/fast_library.cpp:905:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ethreq.ifr_name, interface_name.c_str(), IFNAMSIZ);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:2753:13:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
            umask(0);
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3075:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int wrote_bytes = write(exabgp_pipe, bgp_message, strlen(bgp_message));
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3077:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (wrote_bytes != strlen(bgp_message)) {
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3741:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t file_header_readed_bytes = read(filedesc, &pcap_header, sizeof(struct fastnetmon_pcap_file_header));
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3779:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(filedesc, &pcap_packet_header, sizeof(struct fastnetmon_pcap_pkthdr));
data/fastnetmon-1.1.4/src/fastnetmon.cpp:3794:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t packet_payload_readed_bytes = read(filedesc, packet_buffer, pcap_packet_header.incl_len);
data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp:14:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t file_header_readed_bytes = read(filedesc, &pcap_header, sizeof(struct fastnetmon_pcap_file_header));
data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp:36:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(filedesc, &pcap_packet_header, sizeof(struct fastnetmon_pcap_pkthdr));
data/fastnetmon-1.1.4/src/fastnetmon_pcap_format.cpp:50:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t packet_payload_readed_bytes = read(filedesc, packet_buffer, pcap_packet_header.incl_len);
data/fastnetmon-1.1.4/src/libpatricia/patricia.c:157:22:  [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).
	    sprintf (buff + strlen (buff), "/%d", prefix->bitlen);
data/fastnetmon-1.1.4/src/pfring_plugin/pfring_collector.cpp:469:17:  [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(1); // sched_yield();
data/fastnetmon-1.1.4/src/sflow_plugin/sflow_collector.cpp:683:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(buf, "-");
data/fastnetmon-1.1.4/src/tests/af_packet.cpp:56:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ifr.ifr_name, interface_name.c_str(), sizeof(ifr.ifr_name));
data/fastnetmon-1.1.4/src/tests/af_packet.cpp:173:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int readed_bytes = read(packet_socket, buffer, capture_length); 
data/fastnetmon-1.1.4/src/tests/af_packet_ring.cpp:48:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ifr.ifr_name, interface_name.c_str(), sizeof(ifr.ifr_name));
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:25:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int wrote_bytes = write(exabgp_pipe, bgp_message, strlen(bgp_message));
data/fastnetmon-1.1.4/src/tests/exabgp_pipe.c:45:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int wrote_bytes = write(exabgp_pipe, bgp_message, strlen(bgp_message));
data/fastnetmon-1.1.4/src/tests/ip_lookup.cpp:49:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t newbuflen = strlen(buffer);
data/fastnetmon-1.1.4/src/tests/promisc.cpp:29:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(ethreq.ifr_name, "eth6", IFNAMSIZ);
data/fastnetmon-1.1.4/src/tests/store_data_to_graphite.cpp:42:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int write_result = write(sockfd, buffer, strlen(buffer));

ANALYSIS SUMMARY:

Hits = 162
Lines analyzed = 26449 in approximately 0.68 seconds (39059 lines/second)
Physical Source Lines of Code (SLOC) = 17944
Hits@level = [0] 201 [1]  23 [2] 124 [3]   3 [4]  11 [5]   1
Hits@level+ = [0+] 363 [1+] 162 [2+] 139 [3+]  15 [4+]  12 [5+]   1
Hits/KSLOC@level+ = [0+] 20.2296 [1+] 9.02809 [2+] 7.74632 [3+] 0.835934 [4+] 0.668747 [5+] 0.0557289
Dot directories skipped = 2 (--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.