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/tcptrace-6.6.7/cygwin-includes/linux/if_ether.h Examining data/tcptrace-6.6.7/cygwin-includes/pcap.h Examining data/tcptrace-6.6.7/cygwin-includes/net/ethernet.h Examining data/tcptrace-6.6.7/cygwin-includes/net/bpf.h Examining data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h Examining data/tcptrace-6.6.7/cygwin-includes/netinet/if_ether.h Examining data/tcptrace-6.6.7/cygwin-includes/netinet/ip.h Examining data/tcptrace-6.6.7/cygwin-includes/netinet/tcp.h Examining data/tcptrace-6.6.7/cygwin-includes/netinet/udp.h Examining data/tcptrace-6.6.7/avl.c Examining data/tcptrace-6.6.7/compress.c Examining data/tcptrace-6.6.7/compress.h Examining data/tcptrace-6.6.7/config.h Examining data/tcptrace-6.6.7/dstring.c Examining data/tcptrace-6.6.7/dstring.h Examining data/tcptrace-6.6.7/dyncounter.c Examining data/tcptrace-6.6.7/dyncounter.h Examining data/tcptrace-6.6.7/erf.c Examining data/tcptrace-6.6.7/etherpeek.c Examining data/tcptrace-6.6.7/file_formats.h Examining data/tcptrace-6.6.7/filter.c Examining data/tcptrace-6.6.7/filter.h Examining data/tcptrace-6.6.7/filter_vars.h Examining data/tcptrace-6.6.7/gcache.c Examining data/tcptrace-6.6.7/gcache.h Examining data/tcptrace-6.6.7/ipv6.c Examining data/tcptrace-6.6.7/ipv6.h Examining data/tcptrace-6.6.7/mfiles.c Examining data/tcptrace-6.6.7/mod_collie.c Examining data/tcptrace-6.6.7/mod_collie.h Examining data/tcptrace-6.6.7/mod_http.h Examining data/tcptrace-6.6.7/mod_inbounds.c Examining data/tcptrace-6.6.7/mod_inbounds.h Examining data/tcptrace-6.6.7/mod_realtime.c Examining data/tcptrace-6.6.7/mod_realtime.h Examining data/tcptrace-6.6.7/mod_rttgraph.c Examining data/tcptrace-6.6.7/mod_rttgraph.h Examining data/tcptrace-6.6.7/mod_slice.c Examining data/tcptrace-6.6.7/mod_slice.h Examining data/tcptrace-6.6.7/mod_tcplib.c Examining data/tcptrace-6.6.7/mod_tcplib.h Examining data/tcptrace-6.6.7/mod_traffic.c Examining data/tcptrace-6.6.7/mod_traffic.h Examining data/tcptrace-6.6.7/modules.h Examining data/tcptrace-6.6.7/names.c Examining data/tcptrace-6.6.7/netm.c Examining data/tcptrace-6.6.7/netscout.c Examining data/tcptrace-6.6.7/nlanr.c Examining data/tcptrace-6.6.7/ns.c Examining data/tcptrace-6.6.7/output.c Examining data/tcptrace-6.6.7/plotter.c Examining data/tcptrace-6.6.7/pool.c Examining data/tcptrace-6.6.7/pool.h Examining data/tcptrace-6.6.7/poolaccess.c Examining data/tcptrace-6.6.7/print.c Examining data/tcptrace-6.6.7/rexmit.c Examining data/tcptrace-6.6.7/snoop.c Examining data/tcptrace-6.6.7/snprintf_vms.c Examining data/tcptrace-6.6.7/tcpdump.h Examining data/tcptrace-6.6.7/tcptrace.h Examining data/tcptrace-6.6.7/thruput.c Examining data/tcptrace-6.6.7/trace.c Examining data/tcptrace-6.6.7/udp.c Examining data/tcptrace-6.6.7/versnum.c Examining data/tcptrace-6.6.7/flex_bison/filt_parser.c Examining data/tcptrace-6.6.7/flex_bison/filt_parser.h Examining data/tcptrace-6.6.7/flex_bison/filt_scanner.c Examining data/tcptrace-6.6.7/tcpdump.c Examining data/tcptrace-6.6.7/tcptrace.c Examining data/tcptrace-6.6.7/version.c Examining data/tcptrace-6.6.7/version.h Examining data/tcptrace-6.6.7/mod_http.c FINAL RESULTS: data/tcptrace-6.6.7/compress.c:112:6: [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(binname,X_OK) == 0) { data/tcptrace-6.6.7/compress.c:142:6: [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(abspath,X_OK) == 0) { data/tcptrace-6.6.7/compress.c:441:2: [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. execv(abspath,args); data/tcptrace-6.6.7/filter.c:611:6: [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(buf,sizeof(buf),"%" FS_ULL,pf->un.constant.u_longint); data/tcptrace-6.6.7/filter.c:617:6: [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(buf,sizeof(buf),"%" FS_LL, pf->un.constant.longint); data/tcptrace-6.6.7/flex_bison/filt_parser.c:1002:4: [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(msg, count == 0 ? ", expecting `" : " or `"); data/tcptrace-6.6.7/flex_bison/filt_parser.c:1003:4: [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(msg, yytname[x]); data/tcptrace-6.6.7/gcache.c:144:32: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define CADEBUG if (docadebug) fprintf data/tcptrace-6.6.7/gcache.c:145:32: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define CAERROR if (docaerror) fprintf data/tcptrace-6.6.7/mfiles.c:227:11: [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. ret = vfprintf(pmf->stream,format,ap); data/tcptrace-6.6.7/mfiles.c:246:11: [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. ret = vfprintf(pmf->stream,format,ap); data/tcptrace-6.6.7/mfiles.c:439:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(directory,W_OK) == 0) { data/tcptrace-6.6.7/mod_inbounds.c:500:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "O %.6f TCP %s %s %i\n", data/tcptrace-6.6.7/mod_inbounds.c:636:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "C %.6f TCP %s %s %i\n", data/tcptrace-6.6.7/mod_inbounds.c:822:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "O %.6f UDP %s %s %i\n", data/tcptrace-6.6.7/mod_inbounds.c:1017:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "U %.6f TCP %s %s %.3f %.3f %.3f %.6f %.6f\n", data/tcptrace-6.6.7/mod_inbounds.c:1138:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "U %.6f UDP %s %s %.3f %.3f %.3f %.6f %.6f\n", data/tcptrace-6.6.7/mod_inbounds.c:1188:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "C %.6f UDP %s %s %i\n", data/tcptrace-6.6.7/mod_tcplib.c:1975:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(directory,F_OK) != 0) { data/tcptrace-6.6.7/netscout.c:153:3: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(strlen("Time") + strstr(buffer_string, "Time"), "%s %d %d:%d:%d.%d", data/tcptrace-6.6.7/ns.c:130:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. rlen = sscanf(myline, "%c %lg %d %d %s %d %s %d %d.%hu %d.%hu %d %hu", data/tcptrace-6.6.7/ns.c:295:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. rlen = sscanf(myline, "%c %lg %d %d %s %d %s %d %d.%hu %d.%hu %d %hu %d 0x%x %u %hu", data/tcptrace-6.6.7/ns.c:423:12: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. rlen = sscanf(myline, data/tcptrace-6.6.7/output.c:644:2: [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(stdout," %s2%s:%"FS_ULL, data/tcptrace-6.6.7/output.c:649:2: [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(stdout," %s2%s:%"FS_ULL, data/tcptrace-6.6.7/output.c:787:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(valbuf,sizeof(valbuf),format,arg); data/tcptrace-6.6.7/output.c:825:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(valbuf,sizeof(valbuf),format,arg); data/tcptrace-6.6.7/output.c:853:2: [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(valbuf,sizeof(valbuf),format,arg); data/tcptrace-6.6.7/plotter.c:402:4: [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. system(DSVal(xplot_cmd_buff)); data/tcptrace-6.6.7/print.c:143: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( data/tcptrace-6.6.7/print.c:213: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( data/tcptrace-6.6.7/print.c:779:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,hex?"0x%08lx(R)":"%lu(R)", data/tcptrace-6.6.7/print.c:783:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,hex?"0x%08lx":"%lu",seq); data/tcptrace-6.6.7/snprintf_vms.c:10:8: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. n = vsprintf(str, fmt, ap); data/tcptrace-6.6.7/tcptrace.c:389:5: [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. vfprintf(stderr,format,ap); data/tcptrace-6.6.7/tcptrace.h:1122: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_vms data/tcptrace-6.6.7/compress.c:123: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. path = getenv("PATH"); data/tcptrace-6.6.7/compress.c:302:16: [3] (tmpfile) tempnam: Temporary file race condition (CWE-377). tempfile = tempnam("/tmp/","trace_hdr"); data/tcptrace-6.6.7/erf.c:290:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((s = getenv("ERF_FCS_BITS")) != NULL) { data/tcptrace-6.6.7/erf.c:297:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((s = getenv("ERF_RECORDS_TO_CHECK")) != NULL) { data/tcptrace-6.6.7/tcptrace.c:1623:17: [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 ((home = getenv("HOME")) != NULL) { data/tcptrace-6.6.7/tcptrace.c:1702: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. if ((envariable = getenv(TCPTRACE_ENVARIABLE)) != NULL) { data/tcptrace-6.6.7/tcptrace.c:1738: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. char *TERM = getenv("TERM"); data/tcptrace-6.6.7/compress.c:108: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 abspath[256]; data/tcptrace-6.6.7/compress.c:219: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[COMP_HDR_SIZE]; data/tcptrace-6.6.7/compress.c:274: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[COMP_HDR_SIZE]; data/tcptrace-6.6.7/compress.c:286:13: [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). extern int mkstemp(char *template); data/tcptrace-6.6.7/compress.c:292:12: [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). if ((fd = mkstemp(tempfile)) == -1) { data/tcptrace-6.6.7/compress.c:305:19: [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 ((f_file = fopen(tempfile,"w+")) == NULL) { data/tcptrace-6.6.7/compress.c:377: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 *args[COMP_MAX_ARGS]; data/tcptrace-6.6.7/compress.c:418:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. child_pid = vfork(); data/tcptrace-6.6.7/compress.c:560:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. child_pid = vfork(); data/tcptrace-6.6.7/compress.c:629: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[COMP_HDR_SIZE]; /* just a big buffer */ data/tcptrace-6.6.7/compress.c:643:19: [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 ((f_header=fopen(tempfile,"r"))==NULL) { data/tcptrace-6.6.7/compress.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 *comp_args[COMP_MAX_ARGS]; /* arguments to pass */ data/tcptrace-6.6.7/cygwin-includes/linux/if_ether.h:95:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ data/tcptrace-6.6.7/cygwin-includes/linux/if_ether.h:96:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char h_source[ETH_ALEN]; /* source ether addr */ data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:65: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 __ar_sha[ETH_ALEN]; /* Sender hardware address. */ data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:66: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 __ar_sip[4]; /* Sender IP address. */ data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:67: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 __ar_tha[ETH_ALEN]; /* Target hardware address. */ data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:68: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 __ar_tip[4]; /* Target IP address. */ data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:134: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 arp_dev[16]; data/tcptrace-6.6.7/cygwin-includes/net/if_arp.h:168: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 ha[MAX_ADDR_LEN]; /* Hardware address. */ data/tcptrace-6.6.7/erf.c:72: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 pload[1]; data/tcptrace-6.6.7/erf.c:78: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 dst[6]; data/tcptrace-6.6.7/erf.c:79: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 src[6]; data/tcptrace-6.6.7/erf.c:81: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 pload[1]; data/tcptrace-6.6.7/erf.c:86: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 pload[1]; data/tcptrace-6.6.7/erf.c:277:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/erf.c:291: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 ((n = atoi(s)) == 0 || n == 16|| n == 32) { data/tcptrace-6.6.7/erf.c:298: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 ((n = atoi(s)) > 0 && n < 101) { data/tcptrace-6.6.7/etherpeek.c:117: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 protoStr[8]; /* protocol identity string (NOT null terminated!)*/ data/tcptrace-6.6.7/etherpeek.c:363:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/filter.c:602: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[100]; data/tcptrace-6.6.7/filter.c:653:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/tcptrace-6.6.7/filter.c:712: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[100]; data/tcptrace-6.6.7/filter.c:753: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[1024]; data/tcptrace-6.6.7/flex_bison/filt_parser.c:993:8: [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(msg, "parse error"); data/tcptrace-6.6.7/flex_bison/filt_scanner.c:896:28: [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). yylval.unsigned_long = atoi(yytext); data/tcptrace-6.6.7/flex_bison/filt_scanner.c:905: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). yylval.signed_long = atoi(yytext); data/tcptrace-6.6.7/gcache.c:75:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifndef bcopy data/tcptrace-6.6.7/gcache.c:76:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(from_ptr,to_ptr,nbytes) memcpy(to_ptr,from_ptr,nbytes) data/tcptrace-6.6.7/gcache.c:76:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(from_ptr,to_ptr,nbytes) memcpy(to_ptr,from_ptr,nbytes) data/tcptrace-6.6.7/gcache.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 cb_name[CA_NAMELEN]; /* name of the cache */ data/tcptrace-6.6.7/gcache.c:372:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(pkey,pce->ce_keyptr,(int)keylen); data/tcptrace-6.6.7/gcache.c:375:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(pres,pce->ce_resptr,(int)reslen); data/tcptrace-6.6.7/gcache.c:417:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(pce->ce_resptr,pres,(int)pce->ce_reslen); data/tcptrace-6.6.7/ipv6.c:415:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptoaddr->un.ip6.s6_addr, pfromaddr->un.ip6.s6_addr, 16); data/tcptrace-6.6.7/ipv6.c:553:2: [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(dst, "%04x:", twobytes); data/tcptrace-6.6.7/ipv6.c:587: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(&addr.un.ip6.s6_addr,&addr6->s6_addr, 16); data/tcptrace-6.6.7/mfiles.c:319: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). stream = fopen(pmf->fname,mode); data/tcptrace-6.6.7/mfiles.c:331:11: [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). stream = fopen(pmf->fname,mode); data/tcptrace-6.6.7/mod_http.c:224:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). httpd_port = atoi(argv[i]+6); data/tcptrace-6.6.7/mod_http.c:678: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 getbuf[1024]; data/tcptrace-6.6.7/mod_http.c:742: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). pget->response_code = atoi(pch); data/tcptrace-6.6.7/mod_http.c:757:28: [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). pget->content_length = atoi(&(pch[17])); data/tcptrace-6.6.7/mod_http.c:917: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 ascii[2]; data/tcptrace-6.6.7/mod_http.c:944: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 getbuf[1024]; data/tcptrace-6.6.7/mod_http.c:1066:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). contentLength = atoi(&pch[17]); data/tcptrace-6.6.7/mod_http.c:1123: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[100]; data/tcptrace-6.6.7/mod_http.c:1144:6: [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 title[256]; data/tcptrace-6.6.7/mod_inbounds.c:1183:6: [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[256]; data/tcptrace-6.6.7/mod_tcplib.c:88: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 *dtype_names[NUM_DIRECTION_TYPES] = {"local","incoming","outgoing", "remote"}; data/tcptrace-6.6.7/mod_tcplib.c:106: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 unused[3]; /* (explicit padding) */ data/tcptrace-6.6.7/mod_tcplib.c:748: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). ipport_offset = atoi(argv[i]+2); data/tcptrace-6.6.7/mod_tcplib.c:1098:6: [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 new_filename[128]; data/tcptrace-6.6.7/mod_tcplib.c:1966: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 directory[256]; data/tcptrace-6.6.7/mod_tcplib.c:1967: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 buffer[256]; /* Buffer to store the full file name */ data/tcptrace-6.6.7/mod_tcplib.c:2393: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 title[80]; data/tcptrace-6.6.7/mod_tcplib.c:3136:16: [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 ((old = fopen(filename, "r"))) { data/tcptrace-6.6.7/mod_tcplib.c:3137:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/tcptrace-6.6.7/mod_tcplib.c:3340: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 infobuf[100]; data/tcptrace-6.6.7/mod_tcplib.c:3358: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 infobuf[100]; data/tcptrace-6.6.7/mod_tcplib.c:3359: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 infobuf1[100]; data/tcptrace-6.6.7/mod_tcplib.c:3360: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 infobuf2[100]; data/tcptrace-6.6.7/mod_tcplib.c:3837: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[100]; data/tcptrace-6.6.7/mod_traffic.c:202:40: [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). static void DoplotIOpen(int port, Bool fopen); data/tcptrace-6.6.7/mod_traffic.c:437:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char title[100]; data/tcptrace-6.6.7/mod_traffic.c:754: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[20]; data/tcptrace-6.6.7/mod_traffic.c:1223:23: [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). longconn_duration = atoi(argv[i]+2); data/tcptrace-6.6.7/mod_traffic.c:1345:28: [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). DoplotIOpen(int port, Bool fopen) data/tcptrace-6.6.7/mod_traffic.c:1353:9: [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 (fopen) data/tcptrace-6.6.7/names.c:82: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 port_buf[20]; data/tcptrace-6.6.7/names.c:143: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. static char adrv6[INET6_ADDRSTRLEN]; data/tcptrace-6.6.7/names.c:164: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 name_buf[100]; data/tcptrace-6.6.7/names.c:229: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 name_buf[100]; data/tcptrace-6.6.7/netm.c:225:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/netscout.c:100: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 filename[255]; data/tcptrace-6.6.7/netscout.c:127: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 buffer_string[256]; data/tcptrace-6.6.7/netscout.c:128: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 month[256]; data/tcptrace-6.6.7/netscout.c:229: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((char *) pip_buf, (char *) pep_buf + 14, 48); data/tcptrace-6.6.7/netscout.c:242:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer_string[256]; data/tcptrace-6.6.7/netscout.c:245:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/nlanr.c:192:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/ns.c:113:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char type[16]; data/tcptrace-6.6.7/ns.c:114:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flags[16]; data/tcptrace-6.6.7/ns.c:120:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char myline[128]; data/tcptrace-6.6.7/ns.c:274:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char type[16]; data/tcptrace-6.6.7/ns.c:275:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flags[16]; data/tcptrace-6.6.7/ns.c:284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char myline[128]; data/tcptrace-6.6.7/ns.c:409: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 junks[20]; data/tcptrace-6.6.7/ns.c:413: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 myline[128]; // read into this line and then parse for values data/tcptrace-6.6.7/ns.c:416:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/output.c:187: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 infobuf[100]; data/tcptrace-6.6.7/output.c:212: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 bufl[40],bufr[40]; data/tcptrace-6.6.7/output.c:692: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 bufl[40]; data/tcptrace-6.6.7/output.c:784: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 valbuf[21]; data/tcptrace-6.6.7/output.c:822: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 valbuf[20]; data/tcptrace-6.6.7/output.c:846: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 valbuf[20]; data/tcptrace-6.6.7/output.c:873: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 labbuf[20]; data/tcptrace-6.6.7/output.c:896: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[80]; data/tcptrace-6.6.7/output.c:953: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 infobuf[100]; data/tcptrace-6.6.7/plotter.c:109: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 bufs[4][20]; /* several of them for multiple calls in one printf */ data/tcptrace-6.6.7/plotter.c:198: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 name[MAX_HOSTLETTER_LEN+1]; data/tcptrace-6.6.7/plotter.c:232: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. static char filename[25]; data/tcptrace-6.6.7/plotter.c:316:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/tcptrace-6.6.7/plotter.c:502: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 arrow_type[7]; data/tcptrace-6.6.7/plotter.c:555: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 tick_type[6]; data/tcptrace-6.6.7/plotter.c:644: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 text_type[6]; data/tcptrace-6.6.7/plotter.c:783:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmt[200]; data/tcptrace-6.6.7/print.c:89: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. static char buf[32]; data/tcptrace-6.6.7/print.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. static char buf[30]; data/tcptrace-6.6.7/print.c:336:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ina.s_addr,popt+nptr-1,4); data/tcptrace-6.6.7/print.c:612: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[80]; data/tcptrace-6.6.7/print.c:628: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[80]; data/tcptrace-6.6.7/print.c:744: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 adr[INET6_ADDRSTRLEN]; data/tcptrace-6.6.7/print.c:758: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[30]; data/tcptrace-6.6.7/print.c:775: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[20]; data/tcptrace-6.6.7/rexmit.c:717: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. static char filename[15]; data/tcptrace-6.6.7/rexmit.c:747: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 title[210]; data/tcptrace-6.6.7/snoop.c:82: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 format_name[8]; /* should be "snoop\0\0\0" */ data/tcptrace-6.6.7/snoop.c:380:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(filename, "r")) == NULL) { data/tcptrace-6.6.7/tcpdump.c:112:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ð_header, buf, EH_SIZE); /* save ether header */ data/tcptrace-6.6.7/tcpdump.c:116:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:122:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:135: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((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:153:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ð_header,buf,EH_SIZE); /* save ether header */ data/tcptrace-6.6.7/tcpdump.c:154:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:158:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ip_buf,buf+16,iplen-16); data/tcptrace-6.6.7/tcpdump.c:166:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:174:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:180:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:185:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)ip_buf,buf+8,iplen-8); data/tcptrace-6.6.7/tcpdump.c:191:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf,buf+offset,iplen-offset); data/tcptrace-6.6.7/tcpdump.c:197:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf, buf+offset, iplen-offset); data/tcptrace-6.6.7/tcpdump.c:204:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf, buf+offset, iplen-offset); data/tcptrace-6.6.7/tcpdump.c:209:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ð_header,buf,EH_SIZE); // save ethernet header data/tcptrace-6.6.7/tcpdump.c:210:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf, buf+offset, iplen-offset); data/tcptrace-6.6.7/tcpdump.c:215:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf, buf+offset, iplen-offset); data/tcptrace-6.6.7/tcpdump.c:220:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)ip_buf, buf+offset, iplen-offset); data/tcptrace-6.6.7/tcpdump.c:304: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[100]; data/tcptrace-6.6.7/tcpdump.h:190:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ð_proto_type, buf+12, 2); data/tcptrace-6.6.7/tcpdump.h:201:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ppp_proto_type, buf+20, 2); data/tcptrace-6.6.7/tcpdump.h:223:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ppp_byte0, buf, 1); data/tcptrace-6.6.7/tcpdump.h:227:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ppp_proto_type, buf+2, 2); data/tcptrace-6.6.7/tcpdump.h:240:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ppp_proto_type, buf, 2); data/tcptrace-6.6.7/tcptrace.c:170: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 *ColorNames[NCOLORS] = data/tcptrace-6.6.7/tcptrace.c:639:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; /* plenty large, but checked below with strncpy */ data/tcptrace-6.6.7/tcptrace.c:642:2: [2] (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 string. strcat(buf,"=\"STR\""); data/tcptrace-6.6.7/tcptrace.c:2004: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). ivalue = atoi(value); data/tcptrace-6.6.7/tcptrace.c:2100:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). thru_interval = atoi(argv[i]+1); data/tcptrace-6.6.7/tcptrace.c:2108:16: [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). beginpnum = atoi(argv[i]+1); data/tcptrace-6.6.7/tcptrace.c:2118: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). endpnum = atoi(argv[i]+1); data/tcptrace-6.6.7/tcptrace.c:2360:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/tcptrace-6.6.7/tcptrace.c:2368:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/tcptrace-6.6.7/tcptrace.c:2636:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename,"r")) == NULL) { data/tcptrace-6.6.7/tcptrace.c:2731:6: [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[32]; data/tcptrace-6.6.7/tcptrace.h:139: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 *ColorNames[NCOLORS]; data/tcptrace-6.6.7/tcptrace.h:1118: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. #define memcpy(p1,p2,n) MemCpy(p1,p2,n) data/tcptrace-6.6.7/thruput.c:75:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char title[210]; data/tcptrace-6.6.7/trace.c:155:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptoaddr->un.ip6.s6_addr, pfromaddr->un.ip6.s6_addr, 16); data/tcptrace-6.6.7/trace.c:501: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 title[210]; data/tcptrace-6.6.7/trace.c:638:6: [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 filename[25]; data/tcptrace-6.6.7/trace.c:2016:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[200]; data/tcptrace-6.6.7/trace.c:2017:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[50]; data/tcptrace-6.6.7/trace.c:2371:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[5]; /* can't be more than 1 digit! */ data/tcptrace-6.6.7/trace.c:2582: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). f_passfilter = fopen(PASS_FILTER_FILENAME,"w+"); data/tcptrace-6.6.7/trace.c:2804: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(&l,ptr,sizeof(u_long)); data/tcptrace-6.6.7/trace.c:2815: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(&s,ptr,sizeof(u_short)); data/tcptrace-6.6.7/trace.c:2956: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(psack_local, psack, sizeof(sack_block)); data/tcptrace-6.6.7/trace.c:3020: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 filename[MAX_HOSTLETTER_LEN data/tcptrace-6.6.7/compress.c:178:11: [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(filename); data/tcptrace-6.6.7/compress.c:187: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). lens = strlen(pf->comp_suffix); data/tcptrace-6.6.7/etherpeek.c:334:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) fgetc(SYS_STDIN); data/tcptrace-6.6.7/flex_bison/filt_parser.c:989: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). size += strlen(yytname[x]) + 15, count++; data/tcptrace-6.6.7/flex_bison/filt_parser.c:1004:4: [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(msg, "'"); data/tcptrace-6.6.7/flex_bison/filt_scanner.c:599:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/tcptrace-6.6.7/flex_bison/filt_scanner.c:925: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). yylval.string[strlen(yylval.string)-1] = '\00'; data/tcptrace-6.6.7/gcache.c:228:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #ifdef strncpy data/tcptrace-6.6.7/gcache.c:230:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #undef strncpy data/tcptrace-6.6.7/gcache.c:233:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pcb->cb_name,name,CA_NAMELEN); data/tcptrace-6.6.7/ipv6.c:549:6: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(dst, ":"); data/tcptrace-6.6.7/mfiles.c:150:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=strlen(fname)+strlen(directory)+strlen(prefix)+2; data/tcptrace-6.6.7/mfiles.c:150: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(fname)+strlen(directory)+strlen(prefix)+2; data/tcptrace-6.6.7/mfiles.c:150: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). len=strlen(fname)+strlen(directory)+strlen(prefix)+2; data/tcptrace-6.6.7/mod_http.c:913: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). int len = strlen(s); data/tcptrace-6.6.7/mod_inbounds.c:503: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). if (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_inbounds.c:639: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 (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_inbounds.c:825: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). if (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_inbounds.c:1032: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 (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_inbounds.c:1149: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 (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_inbounds.c:1194: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 (fwrite(tmp, strlen(tmp), 1, stdout) <= 0) { data/tcptrace-6.6.7/mod_tcplib.c:2041: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). if (file_pos < strlen(header)) { data/tcptrace-6.6.7/mod_traffic.c:1221:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(argv[i]) > 2) { data/tcptrace-6.6.7/names.c:128: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). (char *) sb_port, (tcelen) (strlen(sb_port)+1)); data/tcptrace-6.6.7/names.c:217: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). (char *) sb_host, (tcelen)(strlen(sb_host)+1)); data/tcptrace-6.6.7/netscout.c:77:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #ifdef strncpy data/tcptrace-6.6.7/netscout.c:79:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #undef strncpy data/tcptrace-6.6.7/netscout.c:147:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sscanf(strlen("Size") + strstr(buffer_string, "Size"), "%d", ptlen); data/tcptrace-6.6.7/netscout.c:153:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sscanf(strlen("Time") + strstr(buffer_string, "Time"), "%s %d %d:%d:%d.%d", data/tcptrace-6.6.7/netscout.c:160:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(strstr("DecNovOctSepAugJulJunMayAprMarFebJan", month)) / 3) - 1; data/tcptrace-6.6.7/netscout.c:259:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *) &(nhdr.filename[0]), buffer_string, data/tcptrace-6.6.7/netscout.c:260:4: [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("Packets from the file:")); data/tcptrace-6.6.7/ns.c:430:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((rlen = getc(SYS_STDIN)) == EOF) { data/tcptrace-6.6.7/output.c:622: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). len = strlen(FormatBrief(tmp_ptp)); data/tcptrace-6.6.7/output.c:928: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). len = strlen(UDPFormatBrief(tmp_pup)); data/tcptrace-6.6.7/pool.c:319:20: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. buffer = (void *)memalign(buffer_size, pagesize); data/tcptrace-6.6.7/tcptrace.c:641:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf,pvop->var_optname,sizeof(buf)-10); data/tcptrace-6.6.7/tcptrace.c:917:16: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ch = getchar()) == EOF) data/tcptrace-6.6.7/tcptrace.c:1569: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). argv = malloc(sizeof(char *) * ((strlen(buf)/2)+1)); data/tcptrace-6.6.7/tcptrace.c:1626: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). int rc_len=strlen(home)+strlen(TCPTRACE_RC_FILE)+2; data/tcptrace-6.6.7/tcptrace.c:1626: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). int rc_len=strlen(home)+strlen(TCPTRACE_RC_FILE)+2; data/tcptrace-6.6.7/tcptrace.c:1661: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). rc_buf = pch_new = MallocZ(strlen(file_buf)+3); data/tcptrace-6.6.7/tcptrace.c:1769: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). arglen = strlen(argtext); data/tcptrace-6.6.7/tcptrace.c:1777: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). strlen(popt->opt_name)) == 0 ) { data/tcptrace-6.6.7/tcptrace.c:1779: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). opt=argtext+strlen(popt->opt_name); data/tcptrace-6.6.7/tcptrace.c:1820: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(argtext); data/tcptrace-6.6.7/tcptrace.c:1996: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(value); i++) { data/tcptrace-6.6.7/trace.c:2048:2: [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. Risk is low because the source is a constant string. strncat(buf1, "SYN ", 4); data/tcptrace-6.6.7/trace.c:2050:2: [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. Risk is low because the source is a constant string. strncat(buf1, "FIN ", 4); data/tcptrace-6.6.7/trace.c:2052:2: [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. Risk is low because the source is a constant string. strncat(buf1, "RST ", 4); data/tcptrace-6.6.7/trace.c:2054:2: [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. Risk is low because the source is a constant string. strncat(buf1, "PSH ", 4); data/tcptrace-6.6.7/trace.c:2056:2: [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. Risk is low because the source is a constant string. strncat(buf1, "URG ", 4); data/tcptrace-6.6.7/trace.c:2064:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2064: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). strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2071:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2071: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). strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2083:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2083: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). strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2089:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2089: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). strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2095:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2095: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). strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2102:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf1, buf2, strlen(buf2)); data/tcptrace-6.6.7/trace.c:2102: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). strncat(buf1, buf2, strlen(buf2)); ANALYSIS SUMMARY: Hits = 285 Lines analyzed = 39170 in approximately 1.36 seconds (28821 lines/second) Physical Source Lines of Code (SLOC) = 24406 Hits@level = [0] 1227 [1] 64 [2] 178 [3] 7 [4] 36 [5] 0 Hits@level+ = [0+] 1512 [1+] 285 [2+] 221 [3+] 43 [4+] 36 [5+] 0 Hits/KSLOC@level+ = [0+] 61.952 [1+] 11.6775 [2+] 9.05515 [3+] 1.76186 [4+] 1.47505 [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.