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/tcpreplay-4.3.3/src/tcprewrite_opts.h Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip_chaff.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_delay.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip_tos.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_order.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_tcp_chaff.c Examining data/tcpreplay-4.3.3/src/fragroute/mod.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip_opt.c Examining data/tcpreplay-4.3.3/src/fragroute/argv.c Examining data/tcpreplay-4.3.3/src/fragroute/pkt.c Examining data/tcpreplay-4.3.3/src/fragroute/argv.h Examining data/tcpreplay-4.3.3/src/fragroute/mod.h Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_dup.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_echo.c Examining data/tcpreplay-4.3.3/src/fragroute/bget.h Examining data/tcpreplay-4.3.3/src/fragroute/mod_tcp_opt.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_print.c Examining data/tcpreplay-4.3.3/src/fragroute/iputil.h Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip6_opt.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip6_qos.c Examining data/tcpreplay-4.3.3/src/fragroute/iputil.c Examining data/tcpreplay-4.3.3/src/fragroute/bget.c Examining data/tcpreplay-4.3.3/src/fragroute/mod_drop.c Examining data/tcpreplay-4.3.3/src/fragroute/fragroute.c Examining data/tcpreplay-4.3.3/src/fragroute/pkt.h Examining data/tcpreplay-4.3.3/src/fragroute/mod_ip_ttl.c Examining data/tcpreplay-4.3.3/src/fragroute/randutil.h Examining data/tcpreplay-4.3.3/src/fragroute/randutil.c Examining data/tcpreplay-4.3.3/src/fragroute/fragroute.h Examining data/tcpreplay-4.3.3/src/tcpreplay_edit_opts.h Examining data/tcpreplay-4.3.3/src/tcpbridge.c Examining data/tcpreplay-4.3.3/src/tcpreplay.c Examining data/tcpreplay-4.3.3/src/tcpprep_opts.h Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit_stub.h Examining data/tcpreplay-4.3.3/src/tcpedit/edit_packet.h Examining data/tcpreplay-4.3.3/src/tcpedit/checksum.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/fuzzing.c Examining data/tcpreplay-4.3.3/src/tcpedit/checksum.h Examining data/tcpreplay-4.3.3/src/tcpedit/rewrite_sequence.h Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/incremental_checksum.c Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/parse_args.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins.h Examining data/tcpreplay-4.3.3/src/tcpedit/incremental_checksum.h Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit.h Examining data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c Examining data/tcpreplay-4.3.3/src/tcpedit/dlt.h Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c Examining data/tcpreplay-4.3.3/src/tcpedit/dlt.c Examining data/tcpreplay-4.3.3/src/tcpedit/fuzzing.h Examining data/tcpreplay-4.3.3/src/tcpedit/rewrite_sequence.c Examining data/tcpreplay-4.3.3/src/tcpedit/portmap.c Examining data/tcpreplay-4.3.3/src/tcpedit/tcpedit_api.c Examining data/tcpreplay-4.3.3/src/tcpedit/parse_args.c Examining data/tcpreplay-4.3.3/src/tcpedit/portmap.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_raw/raw.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_raw/raw.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/ethernet.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_null/null.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_null/null.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_pppserial/pppserial_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_pppserial/pppserial.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_pppserial/pppserial.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_pppserial/pppserial_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211_hdr.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211_hdr.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_radiotap/radiotap.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_radiotap/radiotap.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_loop/loop.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_loop/loop.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_linuxsll/linuxsll_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_linuxsll/linuxsll.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/ethernet.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_plugins.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc.c Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc_types.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc_api.h Examining data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc_api.c Examining data/tcpreplay-4.3.3/src/send_packets.h Examining data/tcpreplay-4.3.3/src/replay.h Examining data/tcpreplay-4.3.3/src/tcpliveplay_opts.c Examining data/tcpreplay-4.3.3/src/tcprewrite.h Examining data/tcpreplay-4.3.3/src/tcpcapinfo_opts.h Examining data/tcpreplay-4.3.3/src/timestamp_trace.h Examining data/tcpreplay-4.3.3/src/tcpreplay_edit_opts.c Examining data/tcpreplay-4.3.3/src/tcpreplay_api.c Examining data/tcpreplay-4.3.3/src/replay.c Examining data/tcpreplay-4.3.3/src/tcpprep.h Examining data/tcpreplay-4.3.3/src/tcprewrite.c Examining data/tcpreplay-4.3.3/src/defines.h Examining data/tcpreplay-4.3.3/src/signal_handler.h Examining data/tcpreplay-4.3.3/src/tcpreplay_opts.h Examining data/tcpreplay-4.3.3/src/tcpprep_api.h Examining data/tcpreplay-4.3.3/src/tree.c Examining data/tcpreplay-4.3.3/src/tcpreplay.h Examining data/tcpreplay-4.3.3/src/common/err.c Examining data/tcpreplay-4.3.3/src/common/xX.c Examining data/tcpreplay-4.3.3/src/common/flows.c Examining data/tcpreplay-4.3.3/src/common/services.c Examining data/tcpreplay-4.3.3/src/common/fakepoll.h Examining data/tcpreplay-4.3.3/src/common/netmap.c Examining data/tcpreplay-4.3.3/src/common/interface.c Examining data/tcpreplay-4.3.3/src/common/fakepcapnav.c Examining data/tcpreplay-4.3.3/src/common/cidr.h Examining data/tcpreplay-4.3.3/src/common/get.h Examining data/tcpreplay-4.3.3/src/common/list.c Examining data/tcpreplay-4.3.3/src/common/xX.h Examining data/tcpreplay-4.3.3/src/common/interface.h Examining data/tcpreplay-4.3.3/src/common/cache.h Examining data/tcpreplay-4.3.3/src/common/cidr.c Examining data/tcpreplay-4.3.3/src/common/flows.h Examining data/tcpreplay-4.3.3/src/common/dlt_names.h Examining data/tcpreplay-4.3.3/src/common/netmap.h Examining data/tcpreplay-4.3.3/src/common/timer.c Examining data/tcpreplay-4.3.3/src/common/tcpdump.h Examining data/tcpreplay-4.3.3/src/common/txring.h Examining data/tcpreplay-4.3.3/src/common/mac.c Examining data/tcpreplay-4.3.3/src/common/timer.h Examining data/tcpreplay-4.3.3/src/common/fakepoll.c Examining data/tcpreplay-4.3.3/src/common/mac.h Examining data/tcpreplay-4.3.3/src/common/fakepcap.h Examining data/tcpreplay-4.3.3/src/common/utils.c Examining data/tcpreplay-4.3.3/src/common/services.h Examining data/tcpreplay-4.3.3/src/common/list.h Examining data/tcpreplay-4.3.3/src/common/fakepcapnav.h Examining data/tcpreplay-4.3.3/src/common/utils.h Examining data/tcpreplay-4.3.3/src/common/git_version.c Examining data/tcpreplay-4.3.3/src/common/cache.c Examining data/tcpreplay-4.3.3/src/common/get.c Examining data/tcpreplay-4.3.3/src/common/sendpacket.c Examining data/tcpreplay-4.3.3/src/common/txring.c Examining data/tcpreplay-4.3.3/src/common/tcpdump.c Examining data/tcpreplay-4.3.3/src/common/dlt_names.c Examining data/tcpreplay-4.3.3/src/common/pcap_dlt.h Examining data/tcpreplay-4.3.3/src/common/err.h Examining data/tcpreplay-4.3.3/src/common/sendpacket.h Examining data/tcpreplay-4.3.3/src/common/fakepcap.c Examining data/tcpreplay-4.3.3/src/tcpbridge.h Examining data/tcpreplay-4.3.3/src/tcpcapinfo.c Examining data/tcpreplay-4.3.3/src/tcpbridge_opts.h Examining data/tcpreplay-4.3.3/src/tcpreplay_opts.c Examining data/tcpreplay-4.3.3/src/tcpbridge_opts.c Examining data/tcpreplay-4.3.3/src/sleep.h Examining data/tcpreplay-4.3.3/src/bridge.h Examining data/tcpreplay-4.3.3/src/common.h Examining data/tcpreplay-4.3.3/src/msvc_stdint.h Examining data/tcpreplay-4.3.3/src/tcpr.h Examining data/tcpreplay-4.3.3/src/tcpliveplay_opts.h Examining data/tcpreplay-4.3.3/src/tcpprep.c Examining data/tcpreplay-4.3.3/src/tcpliveplay.h Examining data/tcpreplay-4.3.3/src/send_packets.c Examining data/tcpreplay-4.3.3/src/sleep.c Examining data/tcpreplay-4.3.3/src/tcprewrite_opts.c Examining data/tcpreplay-4.3.3/src/tcpcapinfo_opts.c Examining data/tcpreplay-4.3.3/src/bridge.c Examining data/tcpreplay-4.3.3/src/signal_handler.c Examining data/tcpreplay-4.3.3/src/msvc_inttypes.h Examining data/tcpreplay-4.3.3/src/tcpreplay_api.h Examining data/tcpreplay-4.3.3/src/tcpprep_api.c Examining data/tcpreplay-4.3.3/src/tcpliveplay.c Examining data/tcpreplay-4.3.3/src/tree.h Examining data/tcpreplay-4.3.3/src/tcpprep_opts.c Examining data/tcpreplay-4.3.3/lib/strlcat.c Examining data/tcpreplay-4.3.3/lib/sll.h Examining data/tcpreplay-4.3.3/lib/strlcpy.c Examining data/tcpreplay-4.3.3/lib/strlcpy.h Examining data/tcpreplay-4.3.3/lib/queue.h Examining data/tcpreplay-4.3.3/lib/tree.h Examining data/tcpreplay-4.3.3/libopts/ao-strs.c Examining data/tcpreplay-4.3.3/libopts/intprops.h Examining data/tcpreplay-4.3.3/libopts/option-value-type.c Examining data/tcpreplay-4.3.3/libopts/text_mmap.c Examining data/tcpreplay-4.3.3/libopts/enum.c Examining data/tcpreplay-4.3.3/libopts/load.c Examining data/tcpreplay-4.3.3/libopts/pgusage.c Examining data/tcpreplay-4.3.3/libopts/sort.c Examining data/tcpreplay-4.3.3/libopts/ao-strs.h Examining data/tcpreplay-4.3.3/libopts/parse-duration.c Examining data/tcpreplay-4.3.3/libopts/check.c Examining data/tcpreplay-4.3.3/libopts/boolean.c Examining data/tcpreplay-4.3.3/libopts/alias.c Examining data/tcpreplay-4.3.3/libopts/genshell.h Examining data/tcpreplay-4.3.3/libopts/compat/strchr.c Examining data/tcpreplay-4.3.3/libopts/compat/windows-config.h Examining data/tcpreplay-4.3.3/libopts/compat/snprintf.c Examining data/tcpreplay-4.3.3/libopts/compat/pathfind.c Examining data/tcpreplay-4.3.3/libopts/compat/strdup.c Examining data/tcpreplay-4.3.3/libopts/compat/compat.h Examining data/tcpreplay-4.3.3/libopts/compat/_Noreturn.h Examining data/tcpreplay-4.3.3/libopts/option-xat-attribute.h Examining data/tcpreplay-4.3.3/libopts/file.c Examining data/tcpreplay-4.3.3/libopts/init.c Examining data/tcpreplay-4.3.3/libopts/configfile.c Examining data/tcpreplay-4.3.3/libopts/nested.c Examining data/tcpreplay-4.3.3/libopts/version.c Examining data/tcpreplay-4.3.3/libopts/autoopts.h Examining data/tcpreplay-4.3.3/libopts/genshell.c Examining data/tcpreplay-4.3.3/libopts/libopts.c Examining data/tcpreplay-4.3.3/libopts/proto.h Examining data/tcpreplay-4.3.3/libopts/autoopts/usage-txt.h Examining data/tcpreplay-4.3.3/libopts/autoopts/options.h Examining data/tcpreplay-4.3.3/libopts/autoopts/project.h Examining data/tcpreplay-4.3.3/libopts/parse-duration.h Examining data/tcpreplay-4.3.3/libopts/stack.c Examining data/tcpreplay-4.3.3/libopts/find.c Examining data/tcpreplay-4.3.3/libopts/stdnoreturn.in.h Examining data/tcpreplay-4.3.3/libopts/makeshell.c Examining data/tcpreplay-4.3.3/libopts/putshell.c Examining data/tcpreplay-4.3.3/libopts/ag-char-map.h Examining data/tcpreplay-4.3.3/libopts/autoopts.c Examining data/tcpreplay-4.3.3/libopts/option-xat-attribute.c Examining data/tcpreplay-4.3.3/libopts/streqvcmp.c Examining data/tcpreplay-4.3.3/libopts/time.c Examining data/tcpreplay-4.3.3/libopts/tokenize.c Examining data/tcpreplay-4.3.3/libopts/cook.c Examining data/tcpreplay-4.3.3/libopts/usage.c Examining data/tcpreplay-4.3.3/libopts/restore.c Examining data/tcpreplay-4.3.3/libopts/reset.c Examining data/tcpreplay-4.3.3/libopts/gettext.h Examining data/tcpreplay-4.3.3/libopts/numeric.c Examining data/tcpreplay-4.3.3/libopts/option-value-type.h Examining data/tcpreplay-4.3.3/libopts/save.c Examining data/tcpreplay-4.3.3/libopts/env.c FINAL RESULTS: data/tcpreplay-4.3.3/libopts/alias.c:40:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, ztoo_often_fmt, opts->pzProgName); data/tcpreplay-4.3.3/libopts/alias.c:43:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zat_most, od->optMaxCt, od->pz_Name, eqv); data/tcpreplay-4.3.3/libopts/alias.c:45:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zonly_one, od->pz_Name, eqv); data/tcpreplay-4.3.3/libopts/autoopts.c:46: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. # define vsnprintf option_vsnprintf data/tcpreplay-4.3.3/libopts/autoopts.c:47:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf option_snprintf data/tcpreplay-4.3.3/libopts/autoopts.c:67:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zalloc_fail, (int)sz); data/tcpreplay-4.3.3/libopts/autoopts.c:80:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zrealloc_fail, (int)sz, p); data/tcpreplay-4.3.3/libopts/autoopts.c:93:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zalloc_fail, (int)strlen(str)); data/tcpreplay-4.3.3/libopts/autoopts.c:156:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zmultiway_bug, eqv_od->pz_Name, od->pz_Name, data/tcpreplay-4.3.3/libopts/autoopts.c:231:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotCmdOpt, o_st->pOD->pz_Name); data/tcpreplay-4.3.3/libopts/check.c:44:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zneed_fmt, pOpts->pzProgName, data/tcpreplay-4.3.3/libopts/check.c:58:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zconflict_fmt, pOpts->pzProgName, data/tcpreplay-4.3.3/libopts/check.c:92:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zneed_more, pOpts->pzProgName, pOD->pz_Name, data/tcpreplay-4.3.3/libopts/check.c:94:10: [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. else fprintf(stderr, zneed_one, pOpts->pzProgName, pOD->pz_Name); data/tcpreplay-4.3.3/libopts/check.c:151:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoArgs, pOpts->pzProgName); data/tcpreplay-4.3.3/libopts/check.c:161:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zargs_must, pOpts->pzProgName); data/tcpreplay-4.3.3/libopts/compat/compat.h:87:17: [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. # error This system cannot support daemon processing data/tcpreplay-4.3.3/libopts/compat/pathfind.c:84:21: [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(abs_name, mode_bits) >= 0) { data/tcpreplay-4.3.3/libopts/compat/pathfind.c:121:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result, dot_path ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:133:9: [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( result + result_len, string ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:185:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result + start + 1, result + i ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:204:17: [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( result + i, result + i + 1 ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:214:17: [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( result + start + 1, result + i + 2 ); data/tcpreplay-4.3.3/libopts/compat/snprintf.c:29:1: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(char *str, size_t n, char const *fmt, ...) data/tcpreplay-4.3.3/libopts/compat/snprintf.c:37:10: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. rp = vsprintf(str, fmt, ap); data/tcpreplay-4.3.3/libopts/compat/snprintf.c:43:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. rval = vsprintf(str, fmt, ap); data/tcpreplay-4.3.3/libopts/compat/snprintf.c:55:1: [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( char *str, size_t n, char const *fmt, va_list ap ) data/tcpreplay-4.3.3/libopts/compat/snprintf.c:58:20: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return (strlen(vsprintf(str, fmt, ap))); data/tcpreplay-4.3.3/libopts/compat/snprintf.c:60:13: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return (vsprintf(str, fmt, ap)); data/tcpreplay-4.3.3/libopts/compat/strdup.c:19:16: [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). (void) strcpy(cp, s); data/tcpreplay-4.3.3/libopts/compat/windows-config.h:46:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/tcpreplay-4.3.3/libopts/compat/windows-config.h:46:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/tcpreplay-4.3.3/libopts/enum.c:74:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, pz_enum_err_fmt, pOpts->pzProgName, data/tcpreplay-4.3.3/libopts/enum.c:77:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zValidKeys, pOD->pz_Name); data/tcpreplay-4.3.3/libopts/enum.c:112:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, ENUM_ERR_LINE, *(paz_names++)); data/tcpreplay-4.3.3/libopts/enum.c:135:13: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. if (snprintf(fmt, 16, ENUM_ERR_WIDTH, (int)max_len) >= 16) data/tcpreplay-4.3.3/libopts/enum.c:149:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, NLSTR_SPACE_FMT, *(paz_names++)); data/tcpreplay-4.3.3/libopts/enum.c:154:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, fmt, *(paz_names++) ); data/tcpreplay-4.3.3/libopts/enum.c:156:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, NLSTR_FMT, *paz_names); data/tcpreplay-4.3.3/libopts/enum.c:160:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); data/tcpreplay-4.3.3/libopts/enum.c:167:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zLowerBits, name_ct); data/tcpreplay-4.3.3/libopts/enum.c:170:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); data/tcpreplay-4.3.3/libopts/enum.c:308:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(INVALID_FMT, ix); data/tcpreplay-4.3.3/libopts/find.c:114:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_file, hyph, pOD->pz_Name); data/tcpreplay-4.3.3/libopts/find.c:119:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_file, hyph, pOD->pz_DisableName); data/tcpreplay-4.3.3/libopts/find.c:217:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zDisabledErr, opts->pzProgName, pOD->pz_Name); data/tcpreplay-4.3.3/libopts/find.c:219:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, SET_OFF_FMT, pOD->pzText); data/tcpreplay-4.3.3/libopts/find.c:271:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, opts->pzProgPath, name); data/tcpreplay-4.3.3/libopts/find.c:293:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_opt_fmt, opts->pzProgPath, name, match_ct); data/tcpreplay-4.3.3/libopts/find.c:335:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllVendOptStr, pOpts->pzProgName, vopt_str); data/tcpreplay-4.3.3/libopts/find.c:385:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zInvalOptName, opts->pzProgName, opt_name); data/tcpreplay-4.3.3/libopts/find.c:430:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name); data/tcpreplay-4.3.3/libopts/find.c:432:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, SET_OFF_FMT, pRes->pzText); data/tcpreplay-4.3.3/libopts/find.c:469:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue); data/tcpreplay-4.3.3/libopts/find.c:527:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zMisArg, opts->pzProgPath, o_st->pOD->pz_Name); data/tcpreplay-4.3.3/libopts/find.c:632:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoArg, pOpts->pzProgPath, o_st->pOD->pz_Name); data/tcpreplay-4.3.3/libopts/find.c:755:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, opts->pzProgPath, opts->pzCurOpt-2); data/tcpreplay-4.3.3/libopts/init.c:84:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zwrong_ver, pname, NUM_TO_VER(opts->structVersion)); data/tcpreplay-4.3.3/libopts/makeshell.c:87:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zao_bug_msg, msg); data/tcpreplay-4.3.3/libopts/makeshell.c:94:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zfserr_fmt, prog, errno, strerror(errno), data/tcpreplay-4.3.3/libopts/makeshell.c:152:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:162:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:171:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_ARG_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:183:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:189:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_ARG_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:200:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHOW_PROG_ENV, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:235:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_TEXT_FMT, prog, var); data/tcpreplay-4.3.3/libopts/makeshell.c:298:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_NO_TEXT_FMT, opts->pzPROGNAME, ttnames[which]); data/tcpreplay-4.3.3/libopts/makeshell.c:386:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHELL_MAGIC, shell_prog); data/tcpreplay-4.3.3/libopts/makeshell.c:388:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PREAMBLE_FMT, START_MARK, out_nm, tm_nm_buf); data/tcpreplay-4.3.3/libopts/makeshell.c:391:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(END_PRE_FMT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:441:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(FINISH_LOOP, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:462:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, opts->pzPROGNAME, od->pz_NAME, min); data/tcpreplay-4.3.3/libopts/makeshell.c:529:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, opts->pzPROGNAME, od->pz_NAME, def_val); data/tcpreplay-4.3.3/libopts/makeshell.c:537:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ECHO_N_EXIT, opts->pzPROGNAME, VER_STR); data/tcpreplay-4.3.3/libopts/makeshell.c:540:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PAGE_USAGE_TEXT, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:543:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_LOAD_WARN); data/tcpreplay-4.3.3/libopts/makeshell.c:544:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, YES_NEED_OPT_ARG); data/tcpreplay-4.3.3/libopts/makeshell.c:549:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_SAVE_OPTS); data/tcpreplay-4.3.3/libopts/makeshell.c:550:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, OK_NEED_OPT_ARG); data/tcpreplay-4.3.3/libopts/makeshell.c:552:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ECHO_N_EXIT, opts->pzPROGNAME, LONG_USE_STR); data/tcpreplay-4.3.3/libopts/makeshell.c:556:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SGL_ARG_FMT, opts->pzPROGNAME, od->pz_NAME); data/tcpreplay-4.3.3/libopts/makeshell.c:559:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(CHK_MAX_COUNT, opts->pzPROGNAME, data/tcpreplay-4.3.3/libopts/makeshell.c:562:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(MULTI_ARG_FMT, opts->pzPROGNAME, od->pz_NAME); data/tcpreplay-4.3.3/libopts/makeshell.c:569:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME); data/tcpreplay-4.3.3/libopts/makeshell.c:570:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_ARG_NEEDED); data/tcpreplay-4.3.3/libopts/makeshell.c:573:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME); data/tcpreplay-4.3.3/libopts/makeshell.c:574:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, OK_NEED_OPT_ARG); data/tcpreplay-4.3.3/libopts/makeshell.c:577:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, YES_NEED_OPT_ARG); data/tcpreplay-4.3.3/libopts/makeshell.c:587:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_SUPPRESS_LOAD); data/tcpreplay-4.3.3/libopts/makeshell.c:590:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(NO_SGL_ARG_FMT, opts->pzPROGNAME, data/tcpreplay-4.3.3/libopts/makeshell.c:593:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(NO_MULTI_ARG_FMT, opts->pzPROGNAME, data/tcpreplay-4.3.3/libopts/makeshell.c:596:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_ARG_NEEDED); data/tcpreplay-4.3.3/libopts/makeshell.c:619:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionFlag, od->optValue); data/tcpreplay-4.3.3/libopts/makeshell.c:622:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(UNK_OPT_FMT, FLAG_STR, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:694:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionPartName, name_bf); data/tcpreplay-4.3.3/libopts/makeshell.c:704:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionFullName, name); data/tcpreplay-4.3.3/libopts/makeshell.c:742:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(UNK_OPT_FMT, OPTION_STR, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/makeshell.c:921:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zGenshell, optionParseShellOptions->pzProgName); data/tcpreplay-4.3.3/libopts/nested.c:937:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, XML_HEX_BYTE_FMT, (ch & 0xFF)); data/tcpreplay-4.3.3/libopts/numeric.c:60:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeErr, pOpts->pzProgName, data/tcpreplay-4.3.3/libopts/numeric.c:66:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeScaled, pz_indent); data/tcpreplay-4.3.3/libopts/numeric.c:68:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, (rng_ct > 1) ? zRangeLie : zRangeOnly, pz_indent); data/tcpreplay-4.3.3/libopts/numeric.c:75:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeExact, pz_indent, rng->rmin); data/tcpreplay-4.3.3/libopts/numeric.c:77:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeUpto, pz_indent, rng->rmax); data/tcpreplay-4.3.3/libopts/numeric.c:79:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeAbove, pz_indent, rng->rmin); data/tcpreplay-4.3.3/libopts/numeric.c:81:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRange, pz_indent, rng->rmin, data/tcpreplay-4.3.3/libopts/numeric.c:165:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( stderr, zNotNumber, opts->pzProgName, od->optArg.argString ); data/tcpreplay-4.3.3/libopts/pgusage.c:49:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(bf, bfsz, TMP_FILE_FMT, tmpdir, my_pid); data/tcpreplay-4.3.3/libopts/pgusage.c:90:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(res, bfsz, PAGE_USAGE_FMT, pager, fname); data/tcpreplay-4.3.3/libopts/pgusage.c:168:21: [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. ignore_val( system( fil_name)); data/tcpreplay-4.3.3/libopts/putshell.c:198:20: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. out += sprintf(out, MK_STR_OCT_FMT, ch); data/tcpreplay-4.3.3/libopts/putshell.c:284:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/tcpreplay-4.3.3/libopts/putshell.c:290:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(QUOT_ARG_FMT, pOD->optArg.argString); data/tcpreplay-4.3.3/libopts/putshell.c:295:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/tcpreplay-4.3.3/libopts/putshell.c:304:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:322:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHOW_VAL_FMT, (unsigned long)val); data/tcpreplay-4.3.3/libopts/putshell.c:337:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptCookieCt, pOpts->pzPROGNAME, pOD->pz_NAME, ct); data/tcpreplay-4.3.3/libopts/putshell.c:340:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ARG_BY_NUM_FMT, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:343:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(EXPORT_ARG_FMT, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:382:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptCtFmt, pOpts->curOptIdx-1); data/tcpreplay-4.3.3/libopts/putshell.c:410:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zEquivMode, pOpts->pzPROGNAME, pOD->pz_NAME, p->pz_NAME); data/tcpreplay-4.3.3/libopts/putshell.c:447:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptDisabl, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:458:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:478:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zFullOptFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:490:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/tcpreplay-4.3.3/libopts/putshell.c:498:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/tcpreplay-4.3.3/libopts/putshell.c:500:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/tcpreplay-4.3.3/libopts/reset.c:93:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zreset_arg, pOpts->pzProgName, pOD->pz_Name); data/tcpreplay-4.3.3/libopts/reset.c:110:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptChr, pOpts->pzProgPath, *pzArg); data/tcpreplay-4.3.3/libopts/reset.c:118:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg); data/tcpreplay-4.3.3/libopts/restore.c:143:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoState, pzName); data/tcpreplay-4.3.3/libopts/save.c:130:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/tcpreplay-4.3.3/libopts/save.c:131:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDef, dir); data/tcpreplay-4.3.3/libopts/save.c:185:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/tcpreplay-4.3.3/libopts/save.c:186:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoStat, errno, strerror(errno), pzDir); data/tcpreplay-4.3.3/libopts/save.c:238:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/tcpreplay-4.3.3/libopts/save.c:239:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoStat, errno, strerror(errno), data/tcpreplay-4.3.3/libopts/save.c:257:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName, pzDir); data/tcpreplay-4.3.3/libopts/save.c:352:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NULL_ATR_FMT, ovp->pzName); data/tcpreplay-4.3.3/libopts/save.c:367:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, TYPE_ATR_FMT, ovp->pzName, typ); data/tcpreplay-4.3.3/libopts/save.c:387:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, END_XML_FMT, ovp->pzName); data/tcpreplay-4.3.3/libopts/save.c:393:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NUMB_ATR_FMT, ovp->pzName, ovp->v.longVal); data/tcpreplay-4.3.3/libopts/save.c:397:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, BOOL_ATR_FMT, ovp->pzName, data/tcpreplay-4.3.3/libopts/save.c:412:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, OPEN_XML_FMT, name); data/tcpreplay-4.3.3/libopts/save.c:440:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, END_XML_FMT, name); data/tcpreplay-4.3.3/libopts/save.c:460:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, OPEN_CLOSE_FMT, name); data/tcpreplay-4.3.3/libopts/save.c:464:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NESTED_OPT_FMT, name); data/tcpreplay-4.3.3/libopts/save.c:504:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NESTED_OPT_FMT, p->pz_Name); data/tcpreplay-4.3.3/libopts/save.c:535:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/tcpreplay-4.3.3/libopts/save.c:536:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName); data/tcpreplay-4.3.3/libopts/save.c:557:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPresetFile, time_str); data/tcpreplay-4.3.3/libopts/time.c:50:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDuration, opts->pzProgName, od->optArg.argString); data/tcpreplay-4.3.3/libopts/time.c:95:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. if (snprintf(envptr, sz, fmt, opts->pzPkgDataDir) >= (int)sz) data/tcpreplay-4.3.3/libopts/time.c:101:13: [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(envptr+8, R_OK) != 0) data/tcpreplay-4.3.3/libopts/time.c:113:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDate, opts->pzProgName, data/tcpreplay-4.3.3/libopts/usage.c:333:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zoffer_usage_fmt, opts->pzProgName, help); data/tcpreplay-4.3.3/libopts/usage.c:355:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(line_fmt_buf, zFmtFmt, flen); data/tcpreplay-4.3.3/libopts/usage.c:360:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(line_fmt_buf, zFmtFmt, flen); data/tcpreplay-4.3.3/libopts/usage.c:412:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zPlsSendBugs, opts->pzBugAddr); data/tcpreplay-4.3.3/libopts/usage.c:440:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, PUTS_FMT, t); data/tcpreplay-4.3.3/libopts/usage.c:615:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, opts->pzUsageTitle, opts->pzProgName); data/tcpreplay-4.3.3/libopts/usage.c:655:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zReqOne, data/tcpreplay-4.3.3/libopts/usage.c:660:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, data/tcpreplay-4.3.3/libopts/usage.c:680:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zProhibOne, data/tcpreplay-4.3.3/libopts/usage.c:687:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, data/tcpreplay-4.3.3/libopts/usage.c:738:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, usefmt, z, od->pzText); data/tcpreplay-4.3.3/libopts/usage.c:750:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name); data/tcpreplay-4.3.3/libopts/usage.c:776:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, zVendOptsAre); data/tcpreplay-4.3.3/libopts/usage.c:790:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(vfmt, sizeof(vfmt), vfmtfmt, (unsigned int)nmlen + 4); data/tcpreplay-4.3.3/libopts/usage.c:840:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zDis + tab_skip_ct, od->pz_DisableName); data/tcpreplay-4.3.3/libopts/usage.c:876:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zalt_opt + tab_skip_ct, data/tcpreplay-4.3.3/libopts/usage.c:913:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zUpTo + tab_skip_ct, od->optMaxCt); break; data/tcpreplay-4.3.3/libopts/usage.c:921:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zMust + tab_skip_ct, data/tcpreplay-4.3.3/libopts/usage.c:974:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zPathFmt, path); data/tcpreplay-4.3.3/libopts/usage.c:1069:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(z, sizeof(z), at->pzOptFmt, atyp, od->pz_Name, data/tcpreplay-4.3.3/libopts/usage.c:1072:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, line_fmt_buf, z, od->pzText); data/tcpreplay-4.3.3/libopts/usage.c:1084:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name); data/tcpreplay-4.3.3/libopts/usage.c:1120:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zDisabledOpt, od->pz_Name, why_pz); data/tcpreplay-4.3.3/libopts/usage.c:1128:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, od->pzText, data/tcpreplay-4.3.3/libopts/usage.c:1151:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, zAuto, title); data/tcpreplay-4.3.3/libopts/usage.c:1155:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, zVendIntro, title); data/tcpreplay-4.3.3/libopts/usage.c:1197:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zExamineFmt, opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/version.c:100:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPlsSendBugs, o->pzBugAddr); data/tcpreplay-4.3.3/libopts/version.c:121:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zao_ver_fmt, optionVersion()); data/tcpreplay-4.3.3/libopts/version.c:129:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPlsSendBugs, opts->pzBugAddr); data/tcpreplay-4.3.3/libopts/version.c:168:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zBadVerArg, ch); data/tcpreplay-4.3.3/src/common/cidr.c:245:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(networkip, tempoctet); data/tcpreplay-4.3.3/src/common/err.c:70:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/tcpreplay-4.3.3/src/common/err.c:98:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/tcpreplay-4.3.3/src/common/err.c:128:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/tcpreplay-4.3.3/src/common/err.c:156:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/tcpreplay-4.3.3/src/common/sendpacket.c:696:15: [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. (void)vsnprintf(sp->errbuf, SENDPACKET_ERRBUF_SIZE, fmt, ap); data/tcpreplay-4.3.3/src/common/sendpacket.c:1076:14: [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(bpf_dev, F_OK) && (mysocket = open(bpf_dev, O_RDWR, 0)) > 0) { data/tcpreplay-4.3.3/src/common/tcpdump.c:296:13: [4] (shell) execv: 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. if (execv(TCPDUMP_BINARY, options_vec) < 0) data/tcpreplay-4.3.3/src/common/utils.c:280:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, tmp, when->tv_usec); data/tcpreplay-4.3.3/src/fragroute/bget.c:452:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. extern char *sprintf(); /* Sun includes don't define sprintf */ data/tcpreplay-4.3.3/src/fragroute/mod.c:96:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "couldn't open %s", script); data/tcpreplay-4.3.3/src/fragroute/mod.c:125:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "unknown directive '%s' (line %d)", argv[0], i); data/tcpreplay-4.3.3/src/fragroute/mod.c:141:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "invalid argument to directive '%s' (line %d)", data/tcpreplay-4.3.3/src/fragroute/mod.c:161:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "wtf: %s", buf); data/tcpreplay-4.3.3/src/tcpcapinfo.c:274:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("%"PRIu64"\t%4"PRIu32"\t\t%4"PRIu32"\t\t%" data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:478:15: [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. (void)vsnprintf(errormsg, data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:511:15: [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. (void)vsnprintf(tcpedit->runtime.warnstr, (TCPEDIT_ERRSTR_LEN - 1), fmt, ap); data/tcpreplay-4.3.3/src/tcpprep_api.c:329:15: [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. (void)vsnprintf(errormsg, data/tcpreplay-4.3.3/src/tcpprep_api.c:353:15: [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. (void)vsnprintf(ctx->warnstr, (TCPREPLAY_ERRSTR_LEN - 1), fmt, ap); data/tcpreplay-4.3.3/src/tcpprep_opts.c:1331:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tcpprep->options->comment, OPT_ARG(COMMENT)); data/tcpreplay-4.3.3/src/tcpreplay_api.c:926:15: [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. (void)vsnprintf(errormsg, data/tcpreplay-4.3.3/src/tcpreplay_api.c:954:15: [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. (void)vsnprintf(ctx->warnstr, (TCPREPLAY_ERRSTR_LEN - 1), fmt, ap); data/tcpreplay-4.3.3/libopts/env.c:50:36: [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 const * env_opts = getenv(pOpts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/env.c:121:20: [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. os->pzOptArg = getenv(env_name); data/tcpreplay-4.3.3/libopts/init.c:108:23: [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. pz = pathfind(getenv("PATH"), (char *)pname, "rx"); data/tcpreplay-4.3.3/libopts/load.c:80:13: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(buf, z) == NULL) data/tcpreplay-4.3.3/libopts/load.c:230:25: [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. path = pathfind(getenv("PATH"), (char *)prg_path, "rx"); data/tcpreplay-4.3.3/libopts/load.c:288:16: [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. dir_part = getenv(buf); data/tcpreplay-4.3.3/libopts/makeshell.c:128:28: [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. else if ((shell_prog = getenv("SHELL")), data/tcpreplay-4.3.3/libopts/pgusage.c:44:31: [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 const * tmpdir = getenv(TMPDIR); data/tcpreplay-4.3.3/libopts/pgusage.c:78:45: [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 const * pager = (char const *)getenv(PAGER_NAME); data/tcpreplay-4.3.3/libopts/save.c:119:19: [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 = getenv(z); data/tcpreplay-4.3.3/libopts/save.c:126:19: [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 = getenv(dir); data/tcpreplay-4.3.3/libopts/sort.c:194:12: [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("POSIXLY_CORRECT") != NULL) data/tcpreplay-4.3.3/libopts/usage.c:117: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. txt = getenv("AUTOOPTS_USAGE"); data/tcpreplay-4.3.3/src/fragroute/bget.c:1303:6: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. void srand(seed) data/tcpreplay-4.3.3/src/fragroute/bget.c:1463:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. V srand(1234); data/tcpreplay-4.3.3/src/fragroute/bget.c:1465:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. V srand((int) time((long *) NULL)); data/tcpreplay-4.3.3/src/tcpedit/parse_args.c:230:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(rand_num); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:252:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. config->random.set = OPT_VALUE_ENET_MAC_SEED; data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:255:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. config->random.mask[i] = (u_char)tcpr_random(&config->random.set) % 256; data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:255:65: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. config->random.mask[i] = (u_char)tcpr_random(&config->random.set) % 256; data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:258:25: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (config->random.mask[i] == config->random.mask[j]) { data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:258:51: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (config->random.mask[i] == config->random.mask[j]) { data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:266:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. config->random.keep = OPT_VALUE_ENET_MAC_SEED_KEEP_BYTES; data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:597:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (config->random.set) { data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:601:23: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int i = config->random.keep; data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:603:75: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. eth->ether_shost[i] = MAC_MASK_APPLY(eth->ether_shost[i], config->random.mask[i], unicast_src); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:604:75: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. eth->ether_dhost[i] = MAC_MASK_APPLY(eth->ether_dhost[i], config->random.mask[i], unicast_dst); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:608:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (!config->random.keep) { data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h:75:26: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. en10mb_random_conf_t random; data/tcpreplay-4.3.3/src/tcpliveplay.c:419:22: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. return (49152 + (random % 16383)); data/tcpreplay-4.3.3/libopts/ag-char-map.h:390: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 const * ag_char_map_spanners[46]; data/tcpreplay-4.3.3/libopts/ao-strs.c:41: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 const ao_strs_strtable[6670] = data/tcpreplay-4.3.3/libopts/ao-strs.h:330: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. extern char const ao_strs_strtable[6670]; data/tcpreplay-4.3.3/libopts/autoopts.h:459: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 line_fmt_buf[32]; data/tcpreplay-4.3.3/libopts/autoopts/options.h:153: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 strVal[1]; ///< OPARG_TYPE_STRING data/tcpreplay-4.3.3/libopts/autoopts/options.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 const * apzArgs[MIN_ARG_ALLOC_CT]; ///< element array data/tcpreplay-4.3.3/libopts/autoopts/options.h:701: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 * tkn_list[1]; ///< array of pointers to tokens data/tcpreplay-4.3.3/libopts/autoopts/usage-txt.h:50: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 const * apz_str[104]; data/tcpreplay-4.3.3/libopts/autoopts/usage-txt.h:58: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. extern char const option_lib_text[4285]; data/tcpreplay-4.3.3/libopts/autoopts/usage-txt.h:184: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 const option_lib_text[4285] = data/tcpreplay-4.3.3/libopts/compat/pathfind.c: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 zPath[ AG_PATH_MAX + 1 ]; data/tcpreplay-4.3.3/libopts/compat/windows-config.h:93: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). #define open _open data/tcpreplay-4.3.3/libopts/configfile.c:616: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 const * dir_names[DIRECTIVE_TABLE 0]; data/tcpreplay-4.3.3/libopts/configfile.c:664: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(ftxt, pz, len); data/tcpreplay-4.3.3/libopts/configfile.c:690: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(ttl, ttlfmt, sizeof(ttlfmt) - 1); data/tcpreplay-4.3.3/libopts/configfile.c:691: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(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1)); data/tcpreplay-4.3.3/libopts/configfile.c:741: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 z[24] = "["; data/tcpreplay-4.3.3/libopts/configfile.c:742: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(z+1, opts->pzPROGNAME, len); data/tcpreplay-4.3.3/libopts/configfile.c:850: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 z[64], *pz = z; data/tcpreplay-4.3.3/libopts/configfile.c:857: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(pz+2, pznm, nm_len); data/tcpreplay-4.3.3/libopts/configfile.c:888: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 bf[4]; data/tcpreplay-4.3.3/libopts/configfile.c:1016: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 f_name[ AG_PATH_MAX+1 ]; data/tcpreplay-4.3.3/libopts/configfile.c:1084: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(pz, opts->pzRcName, nln); data/tcpreplay-4.3.3/libopts/cook.c:94: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 z[4]; data/tcpreplay-4.3.3/libopts/cook.c:116: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 z[4]; data/tcpreplay-4.3.3/libopts/enum.c:133: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 fmt[16]; /* format for all-but-last entries on a line */ data/tcpreplay-4.3.3/libopts/enum.c:219:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strncmp((char *)paz_names[idx], (char *)name, len) == 0) { data/tcpreplay-4.3.3/libopts/enum.c:405: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(pz, nm_list[ix], nln); data/tcpreplay-4.3.3/libopts/enum.c:409: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(pz, PLUS_STR, PLUS_STR_LEN); data/tcpreplay-4.3.3/libopts/enum.c:493: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 nm_buf[ AO_NAME_SIZE ]; data/tcpreplay-4.3.3/libopts/enum.c:495: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(nm_buf, pz, len); data/tcpreplay-4.3.3/libopts/env.c:197: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 zEnvName[ AO_NAME_SIZE ]; data/tcpreplay-4.3.3/libopts/env.c:234: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(pzFlagName, st.pOD->pz_NAME, nln); data/tcpreplay-4.3.3/libopts/env.c:255: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(pzFlagName, st.pOD->pz_NAME, nln); data/tcpreplay-4.3.3/libopts/file.c:73: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(p, fname, l); data/tcpreplay-4.3.3/libopts/file.c:104: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). int fd = open(pOD->optArg.argString, mode.file_flags); data/tcpreplay-4.3.3/libopts/file.c:128:17: [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 * fp = fopen(pOD->optArg.argString, mode.file_mode); data/tcpreplay-4.3.3/libopts/find.c:79: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(buf, *nm_pp, (size_t)res); data/tcpreplay-4.3.3/libopts/find.c:373: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 name_buf[128]; data/tcpreplay-4.3.3/libopts/genshell.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 const genshellopt_opt_strs[1769] = data/tcpreplay-4.3.3/libopts/gettext.h:218: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/tcpreplay-4.3.3/libopts/gettext.h:220: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[1024]; data/tcpreplay-4.3.3/libopts/gettext.h:229: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/tcpreplay-4.3.3/libopts/gettext.h:231: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/tcpreplay-4.3.3/libopts/gettext.h:266: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/tcpreplay-4.3.3/libopts/gettext.h:268: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[1024]; data/tcpreplay-4.3.3/libopts/gettext.h:277: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/tcpreplay-4.3.3/libopts/gettext.h:279: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/tcpreplay-4.3.3/libopts/load.c:71: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(buf, pz, name_len + 1); data/tcpreplay-4.3.3/libopts/load.c:78: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 z[PATH_MAX+1]; data/tcpreplay-4.3.3/libopts/load.c:87: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(buf, z, name_len + 1); data/tcpreplay-4.3.3/libopts/load.c:256: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(buf, path, dir_len); data/tcpreplay-4.3.3/libopts/load.c:257: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(buf + dir_len, fname, fname_len); data/tcpreplay-4.3.3/libopts/load.c:302: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(buf, dir_part, dir_len); data/tcpreplay-4.3.3/libopts/load.c:303: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(buf + dir_len, name, nm_len); data/tcpreplay-4.3.3/libopts/makeshell.c:361: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 tm_nm_buf[AO_NAME_SIZE]; data/tcpreplay-4.3.3/libopts/makeshell.c:477: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 int_val_buf[32]; data/tcpreplay-4.3.3/libopts/makeshell.c:636: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 name_bf[32]; data/tcpreplay-4.3.3/libopts/makeshell.c:690: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(name_bf, name, min_match_ct); data/tcpreplay-4.3.3/libopts/makeshell.c:759:17: [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 * fp = fopen(fname, "r" FOPEN_BINARY_FLAG); data/tcpreplay-4.3.3/libopts/nested.c:37: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 xml_txt[8]; data/tcpreplay-4.3.3/libopts/nested.c:217: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(pNV->pzName, name, nm_len); data/tcpreplay-4.3.3/libopts/nested.c:252:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). new_val->v.boolVal = (unsigned)atoi(val); data/tcpreplay-4.3.3/libopts/nested.c:258: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(new_val->pzName, name, nm_len); data/tcpreplay-4.3.3/libopts/nested.c:295: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(new_val->pzName, name, nm_len); data/tcpreplay-4.3.3/libopts/nested.c:324: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(new_val->pzName, name, nm_len); data/tcpreplay-4.3.3/libopts/nested.c:518: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 z[72] = "</"; data/tcpreplay-4.3.3/libopts/nested.c:613: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(pz, val_str, v_len); data/tcpreplay-4.3.3/libopts/nested.c:766: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(res_val->pzName, name, nm_len); data/tcpreplay-4.3.3/libopts/parse-duration.c:193: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[8]; data/tcpreplay-4.3.3/libopts/parse-duration.c:202: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 (buf, in_pz, 4); data/tcpreplay-4.3.3/libopts/parse-duration.c:207: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 (buf, in_pz + 4, 2); data/tcpreplay-4.3.3/libopts/parse-duration.c:212: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 (buf, in_pz + 6, 2); data/tcpreplay-4.3.3/libopts/parse-duration.c:291: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[4]; data/tcpreplay-4.3.3/libopts/parse-duration.c:300: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 (buf, in_pz, 2); data/tcpreplay-4.3.3/libopts/parse-duration.c:305: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 (buf, in_pz + 2, 2); data/tcpreplay-4.3.3/libopts/parse-duration.c:310: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 (buf, in_pz + 4, 2); data/tcpreplay-4.3.3/libopts/pgusage.c:55:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(bf); data/tcpreplay-4.3.3/libopts/putshell.c:169: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(out, nl, nl_len); data/tcpreplay-4.3.3/libopts/restore.c:109: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(p, pOpts, sizeof(*p)); data/tcpreplay-4.3.3/libopts/restore.c:110: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(p + 1, pOpts->pOptDesc, (size_t)p->optCt * sizeof(tOptDesc)); data/tcpreplay-4.3.3/libopts/restore.c:150: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(pOpts, p, sizeof(*p)); data/tcpreplay-4.3.3/libopts/restore.c:151: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(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc)); data/tcpreplay-4.3.3/libopts/restore.c:208: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(pOpts, p, sizeof(*p)); data/tcpreplay-4.3.3/libopts/restore.c:209: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(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc)); data/tcpreplay-4.3.3/libopts/save.c:114: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 z[ AO_NAME_SIZE ]; data/tcpreplay-4.3.3/libopts/save.c:117: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(z, dir, (size_t)(end - dir)); data/tcpreplay-4.3.3/libopts/save.c:149: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(p, env, env_len); data/tcpreplay-4.3.3/libopts/save.c:152: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(p, end, end_len + 1); data/tcpreplay-4.3.3/libopts/save.c:176: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 z[AG_PATH_MAX]; data/tcpreplay-4.3.3/libopts/save.c:205: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(z, pzDir, (size_t)(dirchp - pzDir)); data/tcpreplay-4.3.3/libopts/save.c:533: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). fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG); data/tcpreplay-4.3.3/libopts/save.c:654: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(buf+1, list, len + 1); data/tcpreplay-4.3.3/libopts/sort.c:317: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(opts->origArgVect + 1, opt_txt, data/tcpreplay-4.3.3/libopts/sort.c:320: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(opts->origArgVect + 1 + optsIdx, ppzOpds, data/tcpreplay-4.3.3/libopts/text_mmap.c:132:32: [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). mapinfo->txt_zero_fd = open("/dev/zero", O_RDONLY); data/tcpreplay-4.3.3/libopts/text_mmap.c:201: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). mapinfo->txt_fd = open(fname, o_flag); data/tcpreplay-4.3.3/libopts/usage.c:288: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 help[24]; data/tcpreplay-4.3.3/libopts/usage.c:319:13: [2] (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). Risk is low because the source is a constant string. strcpy(help, "-h"); data/tcpreplay-4.3.3/libopts/usage.c:324:13: [2] (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). Risk is low because the source is a constant string. strcpy(help, "--help"); data/tcpreplay-4.3.3/libopts/usage.c:328:13: [2] (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). Risk is low because the source is a constant string. strcpy(help, "help"); data/tcpreplay-4.3.3/libopts/usage.c:709: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 z[ 80 ]; data/tcpreplay-4.3.3/libopts/usage.c:768: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 vfmt[sizeof(vfmtfmt)]; data/tcpreplay-4.3.3/libopts/usage.c:945: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 pth_buf[AG_PATH_MAX+1]; data/tcpreplay-4.3.3/libopts/usage.c:1038: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 z[80]; data/tcpreplay-4.3.3/src/bridge.c:282: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(pktdata, nextpkt, pkthdr->caplen); data/tcpreplay-4.3.3/src/bridge.c:293: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(&finder.key, &pktdata[ETHER_ADDR_LEN], ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/bridge.c:295: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(&dstmac, pktdata, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/bridge.c:317: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(&node->key, &finder.key, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/common/cache.c:80: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). if ((cachefd = open(cachefile, O_RDONLY)) == -1) data/tcpreplay-4.3.3/src/common/cache.c:95:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi(header.version) != atoi(CACHEVERSION)) data/tcpreplay-4.3.3/src/common/cache.c:95:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi(header.version) != atoi(CACHEVERSION)) data/tcpreplay-4.3.3/src/common/cache.c:260: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 bitstring[9] = EIGHT_ZEROS; data/tcpreplay-4.3.3/src/common/cache.h:42: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[CACHEDATASIZE]; data/tcpreplay-4.3.3/src/common/cache.h:63: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 magic[8]; data/tcpreplay-4.3.3/src/common/cache.h:64: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 version[4]; data/tcpreplay-4.3.3/src/common/cidr.c:116: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 mask[3]; data/tcpreplay-4.3.3/src/common/cidr.c:179: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 networkip[16], tempoctet[4], ebuf[EBUF_SIZE]; data/tcpreplay-4.3.3/src/common/cidr.c:269:5: [2] (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). Risk is low because the source is a constant string. strcpy(ebuf, "Unable to parse as a valid CIDR: "); data/tcpreplay-4.3.3/src/common/cidr.c:473: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 netstr[20]; data/tcpreplay-4.3.3/src/common/cidr.c:529: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 netstr[INET6_ADDRSTRLEN]; data/tcpreplay-4.3.3/src/common/cidr.c:668: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 ipaddr[18], tempbuff[20]; data/tcpreplay-4.3.3/src/common/cidr.c:697: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(ipaddr, tempbuff, 16); data/tcpreplay-4.3.3/src/common/fakepcapnav.c:51: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/tcpreplay-4.3.3/src/common/get.c:53: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 ourver[255]; data/tcpreplay-4.3.3/src/common/get.c:289: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(*newbuff, (pktdata + l2_len), (datalen - l2_len)); data/tcpreplay-4.3.3/src/common/get.c:351: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(*newbuff, (pktdata + l2_len), (datalen - l2_len)); data/tcpreplay-4.3.3/src/common/interface.c:78: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 ebuf[PCAP_ERRBUF_SIZE], testnic[255]; data/tcpreplay-4.3.3/src/common/interface.c:119: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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:133:47: [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 (netmap_version != -1 && (fd = open ("/dev/netmap", O_RDWR)) < 0) data/tcpreplay-4.3.3/src/common/interface.c:145:17: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:151:17: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:161:21: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:167:21: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:173:21: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:179:25: [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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.c:193: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(list_ptr->alias, "%%%d", i++); data/tcpreplay-4.3.3/src/common/interface.h:25: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 name[255]; data/tcpreplay-4.3.3/src/common/interface.h:26: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 alias[255]; data/tcpreplay-4.3.3/src/common/interface.h:27:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char description[255]; data/tcpreplay-4.3.3/src/common/list.c:70: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 ebuf[EBUF_SIZE]; data/tcpreplay-4.3.3/src/common/netmap.c:54:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open ("/dev/netmap", O_RDWR)) < 0) data/tcpreplay-4.3.3/src/common/netmap.c:182: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 ifname_buf[MAX_IFNAMELEN]; data/tcpreplay-4.3.3/src/common/netmap.c:260:26: [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 ((sp->handle.fd = open("/dev/netmap", O_RDWR)) < 0) { data/tcpreplay-4.3.3/src/common/netmap.c:278:25: [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). nr_ringid = atoi(port + 1); data/tcpreplay-4.3.3/src/common/netmap.c:299:25: [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). nr_ringid = atoi(port + 1); data/tcpreplay-4.3.3/src/common/netmap.c:304:25: [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). nr_ringid = atoi(port + 1); data/tcpreplay-4.3.3/src/common/netmap.c:327: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(nmr.nr_name, ifname, namelen); data/tcpreplay-4.3.3/src/common/netmap.c:622: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(pkt, data, min(len, txring->nr_buf_size)); data/tcpreplay-4.3.3/src/common/netmap.h:107: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 nr_name[IFNAMSIZ]; data/tcpreplay-4.3.3/src/common/sendpacket.c:251: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(buffer, pkthdr, sizeof(struct pcap_pkthdr)); data/tcpreplay-4.3.3/src/common/sendpacket.c:252: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(buffer + sizeof(struct pcap_pkthdr), data, min(len, buffer_payload_size)); data/tcpreplay-4.3.3/src/common/sendpacket.c:798: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(&sp->ether, addr, sizeof(struct tcpr_ether_addr)); data/tcpreplay-4.3.3/src/common/sendpacket.c:818: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). if ((tapfd = open("/dev/net/tun", O_RDWR)) < 0) { data/tcpreplay-4.3.3/src/common/sendpacket.c:833: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 ((tapfd = open(device, O_RDWR)) < 0) { data/tcpreplay-4.3.3/src/common/sendpacket.c:846: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 ((tapfd = open(path, O_RDWR)) < 0) { data/tcpreplay-4.3.3/src/common/sendpacket.c:1021: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). if (!sp->open) { data/tcpreplay-4.3.3/src/common/sendpacket.c:1042: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(&sp->ether, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/common/sendpacket.c:1056: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 bpf_dev[16]; data/tcpreplay-4.3.3/src/common/sendpacket.c:1076:51: [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 (!access(bpf_dev, F_OK) && (mysocket = open(bpf_dev, O_RDWR, 0)) > 0) { data/tcpreplay-4.3.3/src/common/sendpacket.c:1211: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(&sp->ether, LLADDR(sdl), ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/common/sendpacket.c:1247: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/tcpreplay-4.3.3/src/common/sendpacket.c:1291:21: [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 ((mysocket = open(device, O_WRONLY|O_EXCL)) < 0) { data/tcpreplay-4.3.3/src/common/sendpacket.h:99: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). int open; data/tcpreplay-4.3.3/src/common/sendpacket.h:100: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 device[MAX_IFNAMELEN]; data/tcpreplay-4.3.3/src/common/sendpacket.h:101: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[SENDPACKET_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/common/services.c:38: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 service_line[MAXLINE], port[10], proto[10]; data/tcpreplay-4.3.3/src/common/services.c:54: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 ((service = fopen(file, "r")) == NULL) { data/tcpreplay-4.3.3/src/common/services.c:79:31: [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). portc = (uint16_t)atoi(port); data/tcpreplay-4.3.3/src/common/tcpdump.c:60: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 *options_vec[OPTIONS_VEC_SIZE]; data/tcpreplay-4.3.3/src/common/tcpdump.c:72: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 decode[TCPDUMP_DECODE_LEN]; data/tcpreplay-4.3.3/src/common/tcpdump.c:221: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). if ((tcpdump->debugfd = open(tcpdump->debugfile, O_WRONLY|O_CREAT|O_TRUNC, data/tcpreplay-4.3.3/src/common/tcpdump.c:354: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 options[256]; data/tcpreplay-4.3.3/src/common/tcpdump.h:90: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 debugfile[255]; data/tcpreplay-4.3.3/src/common/txring.c:110: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(to_data, data, length); data/tcpreplay-4.3.3/src/common/utils.c:100: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(newstr, str, strlen(str) + 1); data/tcpreplay-4.3.3/src/common/utils.c:271: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 tmp[64]; data/tcpreplay-4.3.3/src/common/utils.c:313: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(&hex[numbytes], &databyte, 1); data/tcpreplay-4.3.3/src/common/utils.c:326: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(&hex[numbytes], &databyte, 1); data/tcpreplay-4.3.3/src/defines.h:132: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 tcp[NUM_PORTS]; data/tcpreplay-4.3.3/src/defines.h:133: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[NUM_PORTS]; data/tcpreplay-4.3.3/src/fragroute/bget.c:809: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. V memcpy((char *) nbuf, (char *) buf, /* Copy the data */ data/tcpreplay-4.3.3/src/fragroute/bget.c:1116: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 bhex[50], bascii[20]; data/tcpreplay-4.3.3/src/fragroute/bget.c:1123:15: [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. V sprintf(bhex + i * 3, "%02X ", bdump[i]); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:60: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(ctx->l2header, buf, ctx->l2len); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:63:9: [2] (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). Risk is low because the source is a constant string. strcpy(ctx->errbuf, "unable to pkt_new()"); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:71: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(pkt->pkt_data, buf, len); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:77:9: [2] (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). Risk is low because the source is a constant string. strcpy(ctx->errbuf, "skipping non-IP packet"); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:116: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(pkt_data, pkt->pkt_data, pkt->pkt_end - pkt->pkt_data); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:119: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(pkt_data, ctx->l2header, ctx->l2len); data/tcpreplay-4.3.3/src/fragroute/fragroute.c:134: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(errbuf, "Fragroute only supports DLT_EN10MB pcap files"); data/tcpreplay-4.3.3/src/fragroute/fragroute.h:47: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[FRAGROUTE_ERRBUF_LEN]; data/tcpreplay-4.3.3/src/fragroute/mod.c:89:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[MAX_ARGS], buf[BUFSIZ]; data/tcpreplay-4.3.3/src/fragroute/mod.c:95:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(script, "r")) == NULL) { data/tcpreplay-4.3.3/src/fragroute/mod.c:109: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(errbuf, "couldn't parse arguments (line %d)", i); data/tcpreplay-4.3.3/src/fragroute/mod.c:132: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(errbuf, "calloc"); data/tcpreplay-4.3.3/src/fragroute/mod.c:139:24: [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 (rule->mod->open != NULL && data/tcpreplay-4.3.3/src/fragroute/mod.c:140:38: [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). (rule->data = rule->mod->open(argc, argv)) == NULL) { data/tcpreplay-4.3.3/src/fragroute/mod.h:17:16: [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). void *(*open)(int argc, char *argv[]); data/tcpreplay-4.3.3/src/fragroute/mod_delay.c:63:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((usec = atoi(argv[2])) == 0) data/tcpreplay-4.3.3/src/fragroute/mod_drop.c:62:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((data->percent = atoi(argv[2])) <= 0 || data->percent > 100) data/tcpreplay-4.3.3/src/fragroute/mod_dup.c:62:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((data->percent = atoi(argv[2])) <= 0 || data->percent > 100) data/tcpreplay-4.3.3/src/fragroute/mod_ip6_opt.c:70:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((opt->u.route.segments = atoi(argv[2])) < 1 || data/tcpreplay-4.3.3/src/fragroute/mod_ip6_opt.c:145: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(p, opt->u.route.addr[i].addr_data8, IP6_ADDR_LEN); data/tcpreplay-4.3.3/src/fragroute/mod_ip6_opt.c:158: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(p, opt->u.raw.data8, opt->u.raw.len); data/tcpreplay-4.3.3/src/fragroute/mod_ip_chaff.c:59:29: [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). } else if ((data->ttl = atoi(argv[1])) >= 0 && data->ttl < 256) { data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:60:25: [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). ip_frag_data.size = atoi(argv[1]); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:144: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(new->pkt_eth, pkt->pkt_eth, (u_char*)pkt->pkt_eth_data - (u_char*)pkt->pkt_eth); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:145: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(new->pkt_ip, pkt->pkt_ip, hl); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:176: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(new->pkt_ip_data, p1, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:187: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(new->pkt_ip_data, p, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:188: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(new->pkt_ip_data+fraglen, p2, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:253: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(new->pkt_eth, pkt->pkt_eth, (u_char*)pkt->pkt_eth_data - (u_char*)pkt->pkt_eth); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:254: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(new->pkt_ip, pkt->pkt_ip, hl); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:292: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(new->pkt_ip_data, p1, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:303: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(new->pkt_ip_data, p, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_frag.c:304: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(new->pkt_ip_data + fraglen, p2, fraglen); data/tcpreplay-4.3.3/src/fragroute/mod_ip_opt.c:54:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((i = atoi(argv[2])) < 4 || i > 0xff) { data/tcpreplay-4.3.3/src/fragroute/mod_ip_ttl.c:42:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((data->ttl = atoi(argv[1])) <= 0 || data->ttl > 255) data/tcpreplay-4.3.3/src/fragroute/mod_print.c:64: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[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN]; data/tcpreplay-4.3.3/src/fragroute/mod_print.c:256: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[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN]; data/tcpreplay-4.3.3/src/fragroute/mod_print.c:398: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 d[20], s[20]; data/tcpreplay-4.3.3/src/fragroute/mod_print.c:408: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[128]; data/tcpreplay-4.3.3/src/fragroute/mod_tcp_chaff.c:71:27: [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). else if ((data->ttl = atoi(argv[1])) > 0 && data->ttl < 256) data/tcpreplay-4.3.3/src/fragroute/mod_tcp_opt.c:45:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((i = atoi(argv[2])) <= 0 || i > 0xffff) { data/tcpreplay-4.3.3/src/fragroute/mod_tcp_opt.c:54:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((i = atoi(argv[2])) <= 0 || i > 0xff) { data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:54:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((tcp_seg_data.size = atoi(argv[1])) == 0) { data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:119: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(new->pkt_eth, pkt->pkt_eth, (u_char*)pkt->pkt_eth_data - (u_char*)pkt->pkt_eth); data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:142: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(new->pkt_ip, pkt->pkt_ip, hl + tl); data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:145: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(new->pkt_tcp_data, p1, len); data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:170: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(new->pkt_tcp_data, p, len); data/tcpreplay-4.3.3/src/fragroute/mod_tcp_seg.c:171: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(new->pkt_tcp_data + len, p2, len); data/tcpreplay-4.3.3/src/fragroute/pkt.c:98: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(new->pkt_data, pkt->pkt_data, pkt->pkt_end - pkt->pkt_data); data/tcpreplay-4.3.3/src/replay.c:119: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 ebuf[PCAP_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/replay.c: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 ebuf[PCAP_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/send_packets.c:424: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 ebuf[PCAP_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/send_packets.c:502: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 buf[64]; data/tcpreplay-4.3.3/src/send_packets.c:744: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 buf[64]; data/tcpreplay-4.3.3/src/send_packets.c:1033: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(pkthdr, &((*prev_packet)->pkthdr), sizeof(struct pcap_pkthdr)); data/tcpreplay-4.3.3/src/send_packets.c:1060:21: [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((*prev_packet)->pktdata, pktdata, pktlen); data/tcpreplay-4.3.3/src/send_packets.c:1061:21: [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(&((*prev_packet)->pkthdr), pkthdr, sizeof(struct pcap_pkthdr)); data/tcpreplay-4.3.3/src/send_packets.c:1322: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 input[EBUF_SIZE]; data/tcpreplay-4.3.3/src/tcpbridge.c:141: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 ebuf[SENDPACKET_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/tcpbridge.c:219: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(options.intf1_mac, eth_buff, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpbridge.c:232: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(options.intf2_mac, eth_buff, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpbridge.h:48: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 intf1_mac[ETHER_ADDR_LEN]; data/tcpreplay-4.3.3/src/tcpbridge.h:49: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 intf2_mac[ETHER_ADDR_LEN]; data/tcpreplay-4.3.3/src/tcpbridge_opts.c:79: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 const tcpbridge_opt_strs[4517] = data/tcpreplay-4.3.3/src/tcpbridge_opts.c:1701: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tcpcapinfo.c:105: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[UINT16_MAX]; data/tcpreplay-4.3.3/src/tcpcapinfo.c:122:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(argv[i], O_RDONLY)) < 0) data/tcpreplay-4.3.3/src/tcpcapinfo.c:260: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(&readword, buf, 4); data/tcpreplay-4.3.3/src/tcpcapinfo.c:262: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(&readword, &buf[4], 4); data/tcpreplay-4.3.3/src/tcpcapinfo.c:264: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(&pcap_ph.caplen, &buf[8], 4); data/tcpreplay-4.3.3/src/tcpcapinfo.c:265: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(&pcap_ph.len, &buf[12], 4); data/tcpreplay-4.3.3/src/tcpcapinfo_opts.c:73: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 const tcpcapinfo_opt_strs[1631] = data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:383: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 srcip[16], dstip[16]; data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:434: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 srcip[INET6_ADDRSTRLEN], dstip[INET6_ADDRSTRLEN]; data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:987: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(&iptemp, add_hdr, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:994: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(add_hdr, &iptemp, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1000: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(&iptemp, add_hdr, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1007: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(add_hdr, &iptemp, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1066: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(&iptemp, add_hdr, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1079:21: [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(ip1, &newip, 4); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1084:21: [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(ip2, &newip, 4); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1092:21: [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(ip2, &newip, 4); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1097:21: [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(ip1, &newip, 4); data/tcpreplay-4.3.3/src/tcpedit/edit_packet.c:1104: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(add_hdr, &iptemp, sizeof(uint32_t)); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:389: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(&(ctx->dstaddr.ethernet), eth, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:390: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(&(ctx->srcaddr.ethernet), &(eth->ether_shost), ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:515: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(eth->ether_shost, config->intf1_smac, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:517: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(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:520: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(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:531: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(eth->ether_dhost, config->intf1_dmac, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:533: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(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:536: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(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:548: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(eth->ether_shost, config->intf2_smac, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:550: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(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:553: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(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:565: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(eth->ether_dhost, config->intf2_dmac, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:567: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(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:570: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(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:588:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(eth->ether_dhost, current->rewrite, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:592:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(eth->ether_shost, current->rewrite, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:747: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(ctx->srcmac, &packet[6], ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:752: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(ctx->dstmac, packet, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c:63: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(config->intf1_dmac, mac_addr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c:68: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(config->intf2_dmac, mac_addr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c:73: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(config->intf1_smac, mac_addr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c:78: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(config->intf2_smac, mac_addr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc.c:247: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(tmpbuff, packet, pktlen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc.c:248: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 + 4, (tmpbuff + ctx->l2len), pktlen - ctx->l2len); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_hdlc/hdlc.c:390: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(ctx->dstmac, packet, 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c:207: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(&(ctx->srcaddr), ieee80211_get_src((ieee80211_hdr_t *)packet), ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c:208: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(&(ctx->dstaddr), ieee80211_get_dst((ieee80211_hdr_t *)packet), ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c:392: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(ctx->srcmac, macaddr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c:398: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(ctx->dstmac, macaddr, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c:240: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(&jnpr_header_len, &packet[JUNIPER_ETHER_EXTLEN_OFFSET], 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c:317: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(&jnpr_hdr_len, &packet[JUNIPER_ETHER_EXTLEN_OFFSET], 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c:392: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(&jnpr_hdr_len, &packet[JUNIPER_ETHER_EXTLEN_OFFSET], 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c:419: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(&len, &packet[JUNIPER_ETHER_EXTLEN_OFFSET], 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c:192: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(&(ctx->srcaddr), linux_sll->address, ETHER_ADDR_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c:303: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(ctx->srcmac, &packet[6], 8); /* linuxssl defines the src mac field to be 8 bytes, not 6 */ data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_radiotap/radiotap.c:320: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(&radiolen, &packet[2], 2); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_radiotap/radiotap.c:374: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(extra->packet, &packet[radiolen], pktlen - radiolen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c:194: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(config->l2client, config->l2server, config->length); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c:250: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(tmpbuff, packet, pktlen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c:251: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 + config->length, (tmpbuff + ctx->l2len), pktlen - ctx->l2len); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c: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, config->l2client, config->length); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user.c:261: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, config->l2server, config->length); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.c:95: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(config->l2server, data, datalen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.c:96: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(config->l2client, data, datalen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.c:100: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(config->l2server, data, datalen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_user/user_api.c:104: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(config->l2client, data, datalen); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.c:219: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(ptr, (&(packet)[l2len]), pktlen - l2len); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.c:248: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((&(packet)[l2len]), l3data, pktlen - l2len); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.c:266: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(&ctx->srcmac, &subctx->srcmac, MAX_MAC_LEN); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_utils.c:267: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(&ctx->dstmac, &subctx->dstmac, MAX_MAC_LEN); data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:244: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(&ipflags, &ip6_hdr->ip_flags, 4); data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:252: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(&ip6_hdr->ip_flags, &ipflags, 4); data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:257: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(&ipflags, &ip6_hdr->ip_flags, 4); data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:261: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(&ip6_hdr->ip_flags, &ipflags, 4); data/tcpreplay-4.3.3/src/tcpedit/tcpedit.c:472: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 errormsg[TCPEDIT_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpedit/tcpedit_types.h:70:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errstr[TCPEDIT_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpedit/tcpedit_types.h:71: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 warnstr[TCPEDIT_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpliveplay.c:159: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/tcpreplay-4.3.3/src/tcpliveplay.c: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 ebuf[SENDPACKET_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/tcpliveplay.c:186:24: [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). new_src_port = atoi(argv[5]); data/tcpreplay-4.3.3/src/tcpliveplay.c:492: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/tcpreplay-4.3.3/src/tcpliveplay.c:514: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(&sched[i].pkthdr, &header, sizeof(struct pcap_pkthdr)); data/tcpreplay-4.3.3/src/tcpliveplay.c:516: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(sched[i].packet_ptr, packet, sched[i].pkthdr.len); data/tcpreplay-4.3.3/src/tcpliveplay.c:635: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]; /* Error string buffer */ data/tcpreplay-4.3.3/src/tcpliveplay.c:637: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 filter_exp[52]; data/tcpreplay-4.3.3/src/tcpliveplay.c:638: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(filter_exp,"tcp and dst host %d.%d.%d.%d and dst port %u", data/tcpreplay-4.3.3/src/tcpliveplay.c:685: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]; /* Error string */ data/tcpreplay-4.3.3/src/tcpliveplay.c:968: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 ErrBuff [1024]; data/tcpreplay-4.3.3/src/tcpliveplay_opts.c:93: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 const tcpliveplay_opt_strs[3209] = data/tcpreplay-4.3.3/src/tcpliveplay_opts.c:348: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tcpprep.c:86: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/tcpreplay-4.3.3/src/tcpprep.c:96:21: [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 ((out_file = open(OPT_ARG(CACHEFILE), O_WRONLY | O_CREAT | O_TRUNC, data/tcpreplay-4.3.3/src/tcpprep_api.c:229: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 ebuf[EBUF_SIZE]; data/tcpreplay-4.3.3/src/tcpprep_api.c:279: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(&ctx->tcpdump, value, sizeof(tcpdump_t)); data/tcpreplay-4.3.3/src/tcpprep_api.c:323: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 errormsg[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpprep_api.c:367: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 myargs[MYARGS_LEN]; data/tcpreplay-4.3.3/src/tcpprep_api.h:69:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errstr[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpprep_api.h:70:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char warnstr[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpprep_opts.c:78: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 const tcpprep_opt_strs[3078] = data/tcpreplay-4.3.3/src/tcpprep_opts.c:1021: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tcpprep_opts.c:1241: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 ebuf[EBUF_SIZE]; data/tcpreplay-4.3.3/src/tcpreplay.c:149: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[1024]; data/tcpreplay-4.3.3/src/tcpreplay_api.c:917: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 errormsg[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpreplay_api.c:1174: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[64]; data/tcpreplay-4.3.3/src/tcpreplay_api.c:1276: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(&ctx->static_stats, &ctx->stats, sizeof(tcpreplay_stats_t)); data/tcpreplay-4.3.3/src/tcpreplay_api.h:181: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 errstr[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpreplay_api.h:182: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 warnstr[TCPREPLAY_ERRSTR_LEN]; data/tcpreplay-4.3.3/src/tcpreplay_edit_opts.c:77: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 const tcpreplay_opt_strs[5943] = data/tcpreplay-4.3.3/src/tcpreplay_edit_opts.c:2326: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tcpreplay_opts.c:77: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 const tcpreplay_opt_strs[3882] = data/tcpreplay-4.3.3/src/tcpreplay_opts.c:1287: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tcprewrite.c:69:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ebuf[FRAGROUTE_ERRBUF_LEN]; data/tcpreplay-4.3.3/src/tcprewrite.c:177: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 ebuf[PCAP_ERRBUF_SIZE]; data/tcpreplay-4.3.3/src/tcprewrite.c:270: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(*pktdata, pktconst, pkthdr.caplen); data/tcpreplay-4.3.3/src/tcprewrite_opts.c:77: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 const tcprewrite_opt_strs[4912] = data/tcpreplay-4.3.3/src/tcprewrite_opts.c:1626: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 const * const apzHomeList[2] = { data/tcpreplay-4.3.3/src/tree.c:41: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 tree_print_buff[TREEPRINTBUFFLEN]; data/tcpreplay-4.3.3/src/tree.c:391: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(&ip_hdr, (data + TCPR_ETH_H), TCPR_IPV4_H); data/tcpreplay-4.3.3/src/tree.c:411:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip_hdr, (data + TCPR_ETH_H), TCPR_IPV4_H); data/tcpreplay-4.3.3/src/tree.c:445: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(&ip6_hdr, (data + TCPR_ETH_H), TCPR_IPV6_H); data/tcpreplay-4.3.3/src/tree.c:465: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(&ip6_hdr, (data + TCPR_ETH_H), TCPR_IPV6_H); data/tcpreplay-4.3.3/src/tree.c:714: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 srcip[INET6_ADDRSTRLEN]; data/tcpreplay-4.3.3/src/tree.c:726: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(ðer_type, (u_char*)eth_hdr + 12, 2); data/tcpreplay-4.3.3/src/tree.c:738: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(ðer_type, (u_char*)eth_hdr + 16, 2); data/tcpreplay-4.3.3/src/tree.c:753: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(&ip_hdr, (data + TCPR_ETH_H + hl), TCPR_IPV4_H); data/tcpreplay-4.3.3/src/tree.c:776: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(&ip6_hdr, (data + TCPR_ETH_H + hl), TCPR_IPV6_H); data/tcpreplay-4.3.3/src/tree.c:808: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(&tcp_hdr, (data + TCPR_ETH_H + hl), TCPR_TCP_H); data/tcpreplay-4.3.3/src/tree.c:837: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(&udp_hdr, (data + TCPR_ETH_H + hl), TCPR_UDP_H); data/tcpreplay-4.3.3/src/tree.c:847: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(&dnsv4_hdr, data/tcpreplay-4.3.3/src/tree.c:876: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(&dnsv4_hdr, data/tcpreplay-4.3.3/src/tree.c:908: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(&icmp_hdr, (data + TCPR_ETH_H + hl), TCPR_ICMPV4_H); data/tcpreplay-4.3.3/lib/strlcat.c:48: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). return(dlen + strlen(s)); data/tcpreplay-4.3.3/libopts/ag-char-map.h:511:25: [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 (s >= e) e = s + strlen(s); data/tcpreplay-4.3.3/libopts/ag-char-map.h:522: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). if (s == e) e += strlen(e); data/tcpreplay-4.3.3/libopts/autoopts.c:93:43: [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). fprintf(stderr, zalloc_fail, (int)strlen(str)); data/tcpreplay-4.3.3/libopts/compat/compat.h:129:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define D_NAMLEN(dirent) strlen((dirent)->d_name) data/tcpreplay-4.3.3/libopts/compat/pathfind.c:120: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). result = malloc( 2 + strlen( dot_path ) + strlen( string ) ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:120: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). result = malloc( 2 + strlen( dot_path ) + strlen( string ) ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:122: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). result_len = (int)strlen(result); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:128: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). result = malloc( 3 + strlen( string ) ); data/tcpreplay-4.3.3/libopts/compat/pathfind.c:243:25: [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)ix >= strlen( string )) data/tcpreplay-4.3.3/libopts/compat/snprintf.c:39: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). rval = strlen(rp); data/tcpreplay-4.3.3/libopts/compat/snprintf.c:58:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return (strlen(vsprintf(str, fmt, ap))); data/tcpreplay-4.3.3/libopts/compat/strchr.c:48:25: [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). char const *e = s + strlen(s); data/tcpreplay-4.3.3/libopts/compat/strdup.c:16: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). cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup"); data/tcpreplay-4.3.3/libopts/compat/windows-config.h:95:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read _read data/tcpreplay-4.3.3/libopts/configfile.c:132:40: [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). res = optionLoadNested(txt, fname, strlen(fname)); data/tcpreplay-4.3.3/libopts/configfile.c:523: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). return txt + strlen(txt); data/tcpreplay-4.3.3/libopts/configfile.c:629: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). size_t len = strlen(dir_names[ix]); data/tcpreplay-4.3.3/libopts/configfile.c:686:40: [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 ttl_len = sizeof(ttlfmt) + strlen(zCfgProg); data/tcpreplay-4.3.3/libopts/configfile.c:688:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t name_len = strlen(opts->pzProgName); data/tcpreplay-4.3.3/libopts/configfile.c:732: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). size_t len = strlen(opts->pzPROGNAME); data/tcpreplay-4.3.3/libopts/configfile.c:846: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). size_t nm_len = strlen(pznm); data/tcpreplay-4.3.3/libopts/configfile.c:1075: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). size_t len = strlen(f_name); data/tcpreplay-4.3.3/libopts/configfile.c:1076: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). size_t nln = strlen(opts->pzRcName) + 1; data/tcpreplay-4.3.3/libopts/enum.c:98: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). size_t len = strlen(*(paz++)) + 1; data/tcpreplay-4.3.3/libopts/enum.c:193:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen((char *)name); data/tcpreplay-4.3.3/libopts/enum.c:384:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(nm_list[ix]) + PLUS_STR_LEN + 1; data/tcpreplay-4.3.3/libopts/enum.c:404: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). nln = strlen(nm_list[ix]); data/tcpreplay-4.3.3/libopts/env.c:229: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). nln = strlen(st.pOD->pz_NAME) + 1; data/tcpreplay-4.3.3/libopts/env.c:250: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). nln = strlen(st.pOD->pz_NAME) + 1; data/tcpreplay-4.3.3/libopts/find.c:295: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). opt_ambiguities(opts, name, (int)strlen(name)); data/tcpreplay-4.3.3/libopts/gettext.h:214: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/tcpreplay-4.3.3/libopts/gettext.h:215: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). size_t msgid_len = strlen (msgid) + 1; data/tcpreplay-4.3.3/libopts/gettext.h:262: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/tcpreplay-4.3.3/libopts/gettext.h:263: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). size_t msgid_len = strlen (msgid) + 1; data/tcpreplay-4.3.3/libopts/load.c:65:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(pz); data/tcpreplay-4.3.3/libopts/load.c:83:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(z); data/tcpreplay-4.3.3/libopts/load.c:148: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). size_t len = strlen(fname); data/tcpreplay-4.3.3/libopts/load.c:246: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). fname_len = strlen(fname) + 1; // + NUL byte data/tcpreplay-4.3.3/libopts/load.c:297: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). size_t dir_len = strlen(dir_part); data/tcpreplay-4.3.3/libopts/load.c:298: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). size_t nm_len = strlen(name) + 1; data/tcpreplay-4.3.3/libopts/load.c:327: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). size_t l = strlen(src) + 1; data/tcpreplay-4.3.3/libopts/load.c:332: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). end = txt + strlen(txt); data/tcpreplay-4.3.3/libopts/load.c:365: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). return txt + strlen(txt); data/tcpreplay-4.3.3/libopts/makeshell.c:240:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = fgetc(fp); data/tcpreplay-4.3.3/libopts/makeshell.c:638:36: [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 max_match_ct = strlen(name) - 1; data/tcpreplay-4.3.3/libopts/makeshell.c:833:36: [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). script_trailer = txt + strlen(txt) + START_MARK_LEN + 1; data/tcpreplay-4.3.3/libopts/nested.c:859: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). od->optArg.argString, od->pz_Name, strlen(od->pz_Name)); data/tcpreplay-4.3.3/libopts/parse-duration.c:184:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps = pz + strlen (pz); data/tcpreplay-4.3.3/libopts/parse-duration.c:196:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (in_pz) != 8) data/tcpreplay-4.3.3/libopts/parse-duration.c:282:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps = pz + strlen (pz); data/tcpreplay-4.3.3/libopts/parse-duration.c:294:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (in_pz) != 6) data/tcpreplay-4.3.3/libopts/parse-duration.c:396: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). char * pe = pz + strlen (pz); data/tcpreplay-4.3.3/libopts/pgusage.c:47:35: [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). bfsz = TMP_FILE_FMT_LEN + strlen(tmpdir) + 10; data/tcpreplay-4.3.3/libopts/pgusage.c:54:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t svmsk = umask(cmask); data/tcpreplay-4.3.3/libopts/pgusage.c:56:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(svmsk); data/tcpreplay-4.3.3/libopts/pgusage.c:88:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bfsz = 2 * strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN; data/tcpreplay-4.3.3/libopts/pgusage.c:88:36: [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). bfsz = 2 * strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN; data/tcpreplay-4.3.3/libopts/putshell.c:131:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nl_len = strlen(nl); data/tcpreplay-4.3.3/libopts/save.c:144: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). size_t env_len = strlen(env); data/tcpreplay-4.3.3/libopts/save.c:145: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). size_t end_len = strlen(end); data/tcpreplay-4.3.3/libopts/save.c:220:25: [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 sz = strlen(pzDir) + strlen(opts->pzRcName) + 2; data/tcpreplay-4.3.3/libopts/save.c:220: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). size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2; data/tcpreplay-4.3.3/libopts/save.c:294:25: [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). space_ct = 17 - strlen(pz); data/tcpreplay-4.3.3/libopts/save.c:651: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 len = strlen(list); data/tcpreplay-4.3.3/libopts/text_mmap.c:99:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t rdct = read(mapinfo->txt_fd, pz, sz); data/tcpreplay-4.3.3/libopts/time.c:93:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = sizeof(fmt) + strlen(opts->pzPkgDataDir); data/tcpreplay-4.3.3/libopts/usage.c:308:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(help + 2, od->pz_Name, 20); data/tcpreplay-4.3.3/libopts/usage.c:312:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(help, od->pz_Name, 20); data/tcpreplay-4.3.3/libopts/usage.c:472: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). size_t len = strlen(text); data/tcpreplay-4.3.3/libopts/usage.c:786: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). l = strlen(od->pz_Name); data/tcpreplay-4.3.3/src/common/cache.c:84:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read_size = read(cachefd, &header, sizeof(header))) < 0) data/tcpreplay-4.3.3/src/common/cache.c:109:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read_size = read(cachefd, *comment, header.comment_len)) < 0) data/tcpreplay-4.3.3/src/common/cache.c:135:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((COUNTER)(read_size = read(cachefd, *cachedata, cache_size)) data/tcpreplay-4.3.3/src/common/cache.c:167:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cache_header->magic, CACHEMAGIC, strlen(CACHEMAGIC)+1); data/tcpreplay-4.3.3/src/common/cache.c:167: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). strncpy(cache_header->magic, CACHEMAGIC, strlen(CACHEMAGIC)+1); data/tcpreplay-4.3.3/src/common/cache.c:168:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cache_header->version, CACHEVERSION, strlen(CACHEVERSION)+1); data/tcpreplay-4.3.3/src/common/cache.c:168:50: [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). strncpy(cache_header->version, CACHEVERSION, strlen(CACHEVERSION)+1); data/tcpreplay-4.3.3/src/common/cache.c:174:53: [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). cache_header->comment_len = htons((uint16_t)strlen(comment)); data/tcpreplay-4.3.3/src/common/cache.c:189: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). written = write(out_file, comment, strlen(comment)); data/tcpreplay-4.3.3/src/common/cache.c:192:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (written != (ssize_t)strlen(comment)) data/tcpreplay-4.3.3/src/common/cache.c:194:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). written, strlen(comment), data/tcpreplay-4.3.3/src/common/cidr.c:122:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat((char *)network, "/"); data/tcpreplay-4.3.3/src/common/cidr.c:125:9: [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((char *)network, mask, 1); data/tcpreplay-4.3.3/src/common/cidr.c:128:9: [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((char *)network, mask, 2); data/tcpreplay-4.3.3/src/common/cidr.c:184: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). assert(strlen(cidr) <= EBUF_SIZE); data/tcpreplay-4.3.3/src/common/cidr.c:248:17: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(networkip, "."); data/tcpreplay-4.3.3/src/common/interface.c:137:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nmr.nr_name, pcap_if_ptr->name, sizeof(nmr.nr_name)); data/tcpreplay-4.3.3/src/common/interface.c:203:57: [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 (strncmp(dirdata->d_name, "testpackets", strlen("testpackets")) == 0) { data/tcpreplay-4.3.3/src/common/list.c:91: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). for (i = 0; i < strlen(this); i++) { data/tcpreplay-4.3.3/src/common/list.c:124:25: [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 (i = 0; i < strlen(this); i++) { data/tcpreplay-4.3.3/src/common/mac.c:84:9: [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(temp)) { data/tcpreplay-4.3.3/src/common/mac.c:92:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(temp)) { data/tcpreplay-4.3.3/src/common/mac.c:120:9: [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(tempstr)) { data/tcpreplay-4.3.3/src/common/netmap.c:110: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, sp->device, sizeof(ifr.ifr_name)); data/tcpreplay-4.3.3/src/common/netmap.c:200:9: [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(device) > MAX_IFNAMELEN - 8) { data/tcpreplay-4.3.3/src/common/sendpacket.c:824: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, device, sizeof(ifr.ifr_name)-1); data/tcpreplay-4.3.3/src/common/sendpacket.c:840:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int prefix_length = strlen(TUNTAP_DEVICE_PREFIX); data/tcpreplay-4.3.3/src/common/sendpacket.c:841:28: [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 ((path = malloc(strlen(device) + prefix_length + 1)) == NULL) { data/tcpreplay-4.3.3/src/common/sendpacket.c:845: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). snprintf(path, strlen(device) + prefix_length + 1, "%s%s", TUNTAP_DEVICE_PREFIX, device); data/tcpreplay-4.3.3/src/common/services.c:75:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(port, &service_line[pmatch[1].rm_so], (pmatch[1].rm_eo - pmatch[1].rm_so)); data/tcpreplay-4.3.3/src/common/services.c:76:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(proto, &service_line[pmatch[2].rm_so], (pmatch[2].rm_eo - pmatch[2].rm_so)); data/tcpreplay-4.3.3/src/common/tcpdump.c:179:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((res = read(PARENT_READ_FD, decode, TCPDUMP_DECODE_LEN))) { data/tcpreplay-4.3.3/src/common/tcpdump.c:379:14: [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). arglen = strlen(arg) + 2; /* -{arg}\0 */ data/tcpreplay-4.3.3/src/common/tcpdump.c:393: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). arglen = strlen(arg) + 2; data/tcpreplay-4.3.3/src/common/txring.c:68:13: [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(100); data/tcpreplay-4.3.3/src/common/txring.c:119: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(0); data/tcpreplay-4.3.3/src/common/utils.c:95: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 ((newstr = (char *)malloc(strlen(str) + 1)) == NULL) { data/tcpreplay-4.3.3/src/common/utils.c:96:107: [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). fprintf(stderr, "ERROR in %s:%s() line %d: Unable to strdup() %zu bytes\n", file, funcname, line, strlen(str)); data/tcpreplay-4.3.3/src/common/utils.c:100:25: [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). memcpy(newstr, str, strlen(str) + 1); data/tcpreplay-4.3.3/src/fragroute/argv.c:52: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). len += strlen(*p++) + 1; data/tcpreplay-4.3.3/src/fragroute/mod.c:160:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf[strlen(buf) - 4] = '\0'; data/tcpreplay-4.3.3/src/replay.c:216: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). if ((strncmp(path1, "-", strlen(path1)) == 0) || data/tcpreplay-4.3.3/src/replay.c:217: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). (strncmp(path2, "-", strlen(path2)) == 0)) { data/tcpreplay-4.3.3/src/send_packets.c:1347: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). } else if (strlen(input) > 1) { data/tcpreplay-4.3.3/src/tcpcapinfo.c:130:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(fd, &buf, sizeof(pcap_fh))) != sizeof(pcap_fh)) data/tcpreplay-4.3.3/src/tcpcapinfo.c:225:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ret = read(fd, &buf, pkthdrlen)) == pkthdrlen) { data/tcpreplay-4.3.3/src/tcpcapinfo.c:311:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(fd, &buf, maxread)) != maxread) { data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:180: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). int input_len = strlen(input); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:274: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). config->intf2_dmac, strlen(OPT_ARG(ENET_DMAC))); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb.c:304: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). config->intf2_smac, strlen(OPT_ARG(ENET_SMAC))); data/tcpreplay-4.3.3/src/tcpedit/plugins/dlt_en10mb/en10mb_api.c:58:28: [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). mac2hex(mac, mac_addr, strlen(mac)); data/tcpreplay-4.3.3/src/tcpedit/portmap.c:92:9: [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(badchar) != 0) data/tcpreplay-4.3.3/src/tcpedit/portmap.c:113:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(badchar) != 0) { data/tcpreplay-4.3.3/src/tcpedit/portmap.c:137:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(badchar) != 0) { data/tcpreplay-4.3.3/src/tcpedit/portmap.c:146: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(badchar) != 0 || from_l > 65535 || from_l < 0) { data/tcpreplay-4.3.3/src/tcpedit/portmap.c:168:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(badchar) != 0 || from_l > 65535 || from_l < 0) { data/tcpreplay-4.3.3/src/tcpliveplay.c:172:9: [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(iface) > IFNAMSIZ - 1) data/tcpreplay-4.3.3/src/tcpliveplay.c:897:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer.ifr_name, iface, sizeof(buffer.ifr_name)-1); data/tcpreplay-4.3.3/src/tcpprep_api.c:424: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). myargs[strlen(myargs) - 1] = 0; data/tcpreplay-4.3.3/src/tcpprep_api.c:426:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dbgx(1, "Comment args length: %zu", strlen(myargs)); data/tcpreplay-4.3.3/src/tcpprep_api.c:432: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). bufsize = strlen(ctx->options->comment) + strlen(myargs) + 1; data/tcpreplay-4.3.3/src/tcpprep_api.c:432: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). bufsize = strlen(ctx->options->comment) + strlen(myargs) + 1; data/tcpreplay-4.3.3/src/tcpprep_api.c:441: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). bufsize = strlen(myargs) + 1; data/tcpreplay-4.3.3/src/tcpprep_api.c:446:42: [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). dbgx(1, "Final comment length: %zu", strlen(ctx->options->comment)); data/tcpreplay-4.3.3/src/tcpprep_opts.c:1325:9: [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(OPT_ARG(COMMENT)) > ((1 << 16) - 1 - MYARGS_LEN)) data/tcpreplay-4.3.3/src/tcpprep_opts.c:1327: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). strlen(OPT_ARG(COMMENT)), (1 << 16) - 1 - MYARGS_LEN); data/tcpreplay-4.3.3/src/tcpprep_opts.c:1330:53: [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). tcpprep->options->comment = (char *)safe_malloc(strlen(OPT_ARG(COMMENT)) + 1); data/tcpreplay-4.3.3/src/tcpreplay_api.c:1140:21: [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(ctx->options->loopdelay_ms * 1000); data/tcpreplay-4.3.3/src/tcpreplay_api.c:1162: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(ctx->options->loopdelay_ms * 1000); data/tcpreplay-4.3.3/src/tree.c:793:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)node->mac, (char *)eth_hdr->ether_shost, ANALYSIS SUMMARY: Hits = 759 Lines analyzed = 79419 in approximately 2.11 seconds (37580 lines/second) Physical Source Lines of Code (SLOC) = 48505 Hits@level = [0] 484 [1] 141 [2] 379 [3] 30 [4] 209 [5] 0 Hits@level+ = [0+] 1243 [1+] 759 [2+] 618 [3+] 239 [4+] 209 [5+] 0 Hits/KSLOC@level+ = [0+] 25.6262 [1+] 15.6479 [2+] 12.741 [3+] 4.92733 [4+] 4.30883 [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.