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/ipgrab-0.9.10/src/ah.c Examining data/ipgrab-0.9.10/src/ah.h Examining data/ipgrab-0.9.10/src/arp.c Examining data/ipgrab-0.9.10/src/arp.h Examining data/ipgrab-0.9.10/src/bgp.c Examining data/ipgrab-0.9.10/src/bgp.h Examining data/ipgrab-0.9.10/src/cbcp.c Examining data/ipgrab-0.9.10/src/cbcp.h Examining data/ipgrab-0.9.10/src/ccp.c Examining data/ipgrab-0.9.10/src/ccp.h Examining data/ipgrab-0.9.10/src/chap.c Examining data/ipgrab-0.9.10/src/chap.h Examining data/ipgrab-0.9.10/src/datalink.h Examining data/ipgrab-0.9.10/src/dhcp.c Examining data/ipgrab-0.9.10/src/dhcp.h Examining data/ipgrab-0.9.10/src/display.c Examining data/ipgrab-0.9.10/src/display.h Examining data/ipgrab-0.9.10/src/dns.c Examining data/ipgrab-0.9.10/src/dns.h Examining data/ipgrab-0.9.10/src/dynports.c Examining data/ipgrab-0.9.10/src/dynports.h Examining data/ipgrab-0.9.10/src/error.c Examining data/ipgrab-0.9.10/src/error.h Examining data/ipgrab-0.9.10/src/esp.c Examining data/ipgrab-0.9.10/src/esp.h Examining data/ipgrab-0.9.10/src/ethernet.c Examining data/ipgrab-0.9.10/src/ethernet.h Examining data/ipgrab-0.9.10/src/ethertypes.c Examining data/ipgrab-0.9.10/src/ethertypes.h Examining data/ipgrab-0.9.10/src/file.c Examining data/ipgrab-0.9.10/src/file.h Examining data/ipgrab-0.9.10/src/ftpctrl.c Examining data/ipgrab-0.9.10/src/ftpctrl.h Examining data/ipgrab-0.9.10/src/getopt.c Examining data/ipgrab-0.9.10/src/getopt.h Examining data/ipgrab-0.9.10/src/global.h Examining data/ipgrab-0.9.10/src/gre.c Examining data/ipgrab-0.9.10/src/gre.h Examining data/ipgrab-0.9.10/src/hexbuffer.c Examining data/ipgrab-0.9.10/src/hexbuffer.h Examining data/ipgrab-0.9.10/src/http.c Examining data/ipgrab-0.9.10/src/http.h Examining data/ipgrab-0.9.10/src/iana.c Examining data/ipgrab-0.9.10/src/iana.h Examining data/ipgrab-0.9.10/src/icmp.h Examining data/ipgrab-0.9.10/src/icmpv6.h Examining data/ipgrab-0.9.10/src/igmp.c Examining data/ipgrab-0.9.10/src/igmp.h Examining data/ipgrab-0.9.10/src/ip.c Examining data/ipgrab-0.9.10/src/ip.h Examining data/ipgrab-0.9.10/src/ip_protocols.c Examining data/ipgrab-0.9.10/src/ip_protocols.h Examining data/ipgrab-0.9.10/src/ip_services.c Examining data/ipgrab-0.9.10/src/ip_services.h Examining data/ipgrab-0.9.10/src/ipcp.c Examining data/ipgrab-0.9.10/src/ipcp.h Examining data/ipgrab-0.9.10/src/ipgrab.c Examining data/ipgrab-0.9.10/src/ipgrab.h Examining data/ipgrab-0.9.10/src/ipgsnmp.h Examining data/ipgrab-0.9.10/src/ipv6.c Examining data/ipgrab-0.9.10/src/ipv6.h Examining data/ipgrab-0.9.10/src/ipx.c Examining data/ipgrab-0.9.10/src/ipx.h Examining data/ipgrab-0.9.10/src/ipxrip.c Examining data/ipgrab-0.9.10/src/ipxrip.h Examining data/ipgrab-0.9.10/src/isakmp.c Examining data/ipgrab-0.9.10/src/isakmp.h Examining data/ipgrab-0.9.10/src/l2tp.c Examining data/ipgrab-0.9.10/src/l2tp.h Examining data/ipgrab-0.9.10/src/layers.c Examining data/ipgrab-0.9.10/src/layers.h Examining data/ipgrab-0.9.10/src/lcp.c Examining data/ipgrab-0.9.10/src/lcp.h Examining data/ipgrab-0.9.10/src/llc.c Examining data/ipgrab-0.9.10/src/llc.h Examining data/ipgrab-0.9.10/src/local.h Examining data/ipgrab-0.9.10/src/loopback.c Examining data/ipgrab-0.9.10/src/loopback.h Examining data/ipgrab-0.9.10/src/mgcp.c Examining data/ipgrab-0.9.10/src/mgcp.h Examining data/ipgrab-0.9.10/src/mobileip.h Examining data/ipgrab-0.9.10/src/mppc.c Examining data/ipgrab-0.9.10/src/mppc.h Examining data/ipgrab-0.9.10/src/netbios_ns.c Examining data/ipgrab-0.9.10/src/netbios_ns.h Examining data/ipgrab-0.9.10/src/nntp.c Examining data/ipgrab-0.9.10/src/nntp.h Examining data/ipgrab-0.9.10/src/ns_labels.c Examining data/ipgrab-0.9.10/src/ns_labels.h Examining data/ipgrab-0.9.10/src/open_pcap.c Examining data/ipgrab-0.9.10/src/open_pcap.h Examining data/ipgrab-0.9.10/src/ospf.c Examining data/ipgrab-0.9.10/src/ospf.h Examining data/ipgrab-0.9.10/src/packet_manip.c Examining data/ipgrab-0.9.10/src/packet_manip.h Examining data/ipgrab-0.9.10/src/padding.c Examining data/ipgrab-0.9.10/src/padding.h Examining data/ipgrab-0.9.10/src/parse_cl.h Examining data/ipgrab-0.9.10/src/payload.c Examining data/ipgrab-0.9.10/src/payload.h Examining data/ipgrab-0.9.10/src/ppp.c Examining data/ipgrab-0.9.10/src/ppp.h Examining data/ipgrab-0.9.10/src/pppoe.c Examining data/ipgrab-0.9.10/src/pppoe.h Examining data/ipgrab-0.9.10/src/pptp.c Examining data/ipgrab-0.9.10/src/pptp.h Examining data/ipgrab-0.9.10/src/radius.c Examining data/ipgrab-0.9.10/src/radius.h Examining data/ipgrab-0.9.10/src/radius_3gpp2.c Examining data/ipgrab-0.9.10/src/radius_3gpp2.h Examining data/ipgrab-0.9.10/src/raw.c Examining data/ipgrab-0.9.10/src/raw.h Examining data/ipgrab-0.9.10/src/rip.c Examining data/ipgrab-0.9.10/src/rip.h Examining data/ipgrab-0.9.10/src/ripng.c Examining data/ipgrab-0.9.10/src/ripng.h Examining data/ipgrab-0.9.10/src/rsip.c Examining data/ipgrab-0.9.10/src/rsip.h Examining data/ipgrab-0.9.10/src/rsvp.c Examining data/ipgrab-0.9.10/src/rsvp.h Examining data/ipgrab-0.9.10/src/rtcp.c Examining data/ipgrab-0.9.10/src/rtcp.h Examining data/ipgrab-0.9.10/src/rtp.c Examining data/ipgrab-0.9.10/src/rtp.h Examining data/ipgrab-0.9.10/src/sdp.c Examining data/ipgrab-0.9.10/src/sdp.h Examining data/ipgrab-0.9.10/src/sip.c Examining data/ipgrab-0.9.10/src/sip.h Examining data/ipgrab-0.9.10/src/slip.c Examining data/ipgrab-0.9.10/src/slip.h Examining data/ipgrab-0.9.10/src/slp.c Examining data/ipgrab-0.9.10/src/slp.h Examining data/ipgrab-0.9.10/src/snmp.c Examining data/ipgrab-0.9.10/src/spx.c Examining data/ipgrab-0.9.10/src/spx.h Examining data/ipgrab-0.9.10/src/ssh.c Examining data/ipgrab-0.9.10/src/ssh.h Examining data/ipgrab-0.9.10/src/state.c Examining data/ipgrab-0.9.10/src/state.h Examining data/ipgrab-0.9.10/src/stats.c Examining data/ipgrab-0.9.10/src/stats.h Examining data/ipgrab-0.9.10/src/strmap.c Examining data/ipgrab-0.9.10/src/strmap.h Examining data/ipgrab-0.9.10/src/tcp.c Examining data/ipgrab-0.9.10/src/tcp.h Examining data/ipgrab-0.9.10/src/template.c Examining data/ipgrab-0.9.10/src/template.h Examining data/ipgrab-0.9.10/src/tftp.c Examining data/ipgrab-0.9.10/src/tftp.h Examining data/ipgrab-0.9.10/src/udp.c Examining data/ipgrab-0.9.10/src/udp.h Examining data/ipgrab-0.9.10/src/utilities.c Examining data/ipgrab-0.9.10/src/utilities.h Examining data/ipgrab-0.9.10/src/datalink.c Examining data/ipgrab-0.9.10/src/mobileip.c Examining data/ipgrab-0.9.10/src/icmp.c Examining data/ipgrab-0.9.10/src/icmpv6.c Examining data/ipgrab-0.9.10/src/parse_cl.c FINAL RESULTS: data/ipgrab-0.9.10/src/error.c:97:3: [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, fmt, args); data/ipgrab-0.9.10/src/netbios_ns.c:159:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, output); data/ipgrab-0.9.10/src/ns_labels.c:97:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(nslabels[current_label].label, s); data/ipgrab-0.9.10/src/ns_labels.c:131:2: [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(s, nslabels[i].label); data/ipgrab-0.9.10/src/getopt.c:76:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (argc, argv, options, long_options, opt_index) data/ipgrab-0.9.10/src/getopt.c:103:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (int argc, char * const * argv, const char * optstring) data/ipgrab-0.9.10/src/getopt.c:294: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. extern char * getenv(const char *); data/ipgrab-0.9.10/src/getopt.c:483:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = getenv ("POSIXLY_CORRECT"); data/ipgrab-0.9.10/src/getopt.h:134:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int __argc, char *const *__argv, const char *__shortopts); data/ipgrab-0.9.10/src/getopt.h:136:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/ipgrab-0.9.10/src/getopt.h:140:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, data/ipgrab-0.9.10/src/getopt.h:153:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/ipgrab-0.9.10/src/getopt.h:155:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (); data/ipgrab-0.9.10/src/parse_cl.c:227:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "abc:C:di:lmnP:pr:Ttw:xhv", long_options, &option_index)) != EOF) data/ipgrab-0.9.10/src/ah.c:48: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/bgp.c:532: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/bgp.c:574:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bgp_open_t open; data/ipgrab-0.9.10/src/bgp.c:580:41: [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 (get_packet_bytes((u_int8_t *) &open, pkt, sizeof(bgp_open_t)) data/ipgrab-0.9.10/src/bgp.c:585:6: [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). open.my_as = ntohs(open.my_as); data/ipgrab-0.9.10/src/bgp.c:585:25: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open.my_as = ntohs(open.my_as); data/ipgrab-0.9.10/src/bgp.c:586:6: [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). open.hold_time = ntohs(open.hold_time); data/ipgrab-0.9.10/src/bgp.c:586:29: [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). open.hold_time = ntohs(open.hold_time); data/ipgrab-0.9.10/src/bgp.c:596:36: [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). display(" My AS", (u_int8_t *) &open.my_as, 2, DISP_DEC); data/ipgrab-0.9.10/src/bgp.c:597:40: [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). display(" Hold time", (u_int8_t *) &open.hold_time, 2, data/ipgrab-0.9.10/src/bgp.c:599:42: [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). display_ipv4(" BGP ID", (u_int8_t *) &open.bgp_id); data/ipgrab-0.9.10/src/datalink.c:153: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(packet.contents, pkt, captured_length); data/ipgrab-0.9.10/src/dhcp.c:132: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 holder[HOLDER_SIZE]; /* this needs to be as big as the biggest option */ data/ipgrab-0.9.10/src/dhcp.h:163: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 chaddr [16]; data/ipgrab-0.9.10/src/dhcp.h:164: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 sname [64]; data/ipgrab-0.9.10/src/dhcp.h:165: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 file [128]; data/ipgrab-0.9.10/src/display.c:165: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 label_truncated[LABEL_LENGTH+1]; data/ipgrab-0.9.10/src/display.c:247: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(temp, content, length); data/ipgrab-0.9.10/src/display.c:374: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(ptr, content, length); data/ipgrab-0.9.10/src/display.c:461: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 holder[HOLDER_LEN]; data/ipgrab-0.9.10/src/display.c:481: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 holder[HOLDER_LEN]; data/ipgrab-0.9.10/src/dns.c:112: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/dns.c:173: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/dns.c:302: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/dynports.c:124: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). port = (u_int16_t) atoi(ptr+1); data/ipgrab-0.9.10/src/error.c:65:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ebuf[ERROR_BUF_SIZE]; data/ipgrab-0.9.10/src/error.c: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. return ((char *) sys_errlist[errnum]); data/ipgrab-0.9.10/src/file.c:92: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 errorbuf[PCAP_ERRBUF_SIZE]; data/ipgrab-0.9.10/src/file.c:121:8: [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(s, "r"); data/ipgrab-0.9.10/src/file.c:244:7: [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(s, "r"); data/ipgrab-0.9.10/src/ftpctrl.c:88:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char replycode_str[4]; data/ipgrab-0.9.10/src/ftpctrl.c:93: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). replycode = atoi(replycode_str); data/ipgrab-0.9.10/src/getopt.c:411: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 (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); data/ipgrab-0.9.10/src/getopt.c:523: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 (__getopt_nonoption_flags, orig_str, len); data/ipgrab-0.9.10/src/hexbuffer.c:86: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(&hexbuffer[current_ptr], bytes, length); data/ipgrab-0.9.10/src/http.c:47: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 line[LINE_SIZE]; data/ipgrab-0.9.10/src/icmp.c:297: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/icmpv6.c:81: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/igmp.c:58: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ip.c:153:7: [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(holder, "%d (%d bytes)", hlen, hlen*4); data/ipgrab-0.9.10/src/ip.c:161:4: [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(holder, "%d (%d bytes)", frag_off, frag_off*8); data/ipgrab-0.9.10/src/ip.c:236: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((u_int8_t *) &addr, rr+i, 4); data/ipgrab-0.9.10/src/ip.c:255: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ipcp.c:258:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *) &comp_type, (void *) &value, 2); data/ipgrab-0.9.10/src/ipv6.c:69: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ipx.c:63: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ipxrip.c:52: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/isakmp.c:48: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 i_cookie[8]; data/ipgrab-0.9.10/src/isakmp.c:49: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 r_cookie[8]; data/ipgrab-0.9.10/src/isakmp.c:444: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((void *) &type, (void * ) p, 2); data/ipgrab-0.9.10/src/isakmp.c:464: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((void *) &length, (void *) p, 2); data/ipgrab-0.9.10/src/isakmp.c:480: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((void *) value, (void *) p, length); data/ipgrab-0.9.10/src/l2tp.c:335: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((void *) &attr, (void *) attribute, 2); data/ipgrab-0.9.10/src/l2tp.c:354: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((void *) &attr, (void *) attribute, 2); data/ipgrab-0.9.10/src/l2tp.c:376: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((void *) &value, (void *) attribute, 2); data/ipgrab-0.9.10/src/l2tp.c:391: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((void *) &value, (void *) attribute, 4); data/ipgrab-0.9.10/src/netbios_ns.c:126: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 output[32]; data/ipgrab-0.9.10/src/netbios_ns.c:173: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/netbios_ns.c:249: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ns_labels.c:160: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 label[MAX_LABEL_SIZE]; data/ipgrab-0.9.10/src/ns_labels.h:44: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 label[MAX_LABEL_SIZE]; /* char string contents of label */ data/ipgrab-0.9.10/src/open_pcap.c:52: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 errorbuf[PCAP_ERRBUF_SIZE]; data/ipgrab-0.9.10/src/ospf.c:144: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/packet_manip.c:77:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, p->current, n); data/ipgrab-0.9.10/src/packet_manip.c:174:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, p->current, ptr - p->current); data/ipgrab-0.9.10/src/packet_manip.c:235:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, p->current, ptr - p->current); data/ipgrab-0.9.10/src/packet_manip.c:281:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, p->current, n); data/ipgrab-0.9.10/src/packet_manip.h:66: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 timestamp [PACKET_TIMESTAMP_LEN]; data/ipgrab-0.9.10/src/padding.c:42: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 holder[PADDING_SIZE]; data/ipgrab-0.9.10/src/parse_cl.c:240: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). my_args->c = atoi(optarg); data/ipgrab-0.9.10/src/payload.c:44: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 holder[PAYLOAD_SIZE]; data/ipgrab-0.9.10/src/rip.c:62: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/ripng.c:57: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/rsip.c:117: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((void *) &len, (void *) p+1, 2); data/ipgrab-0.9.10/src/rsip.c:132: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((void *) &clientid, (void *) p+3, 4); data/ipgrab-0.9.10/src/rsip.c:141: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((void *) &messageid, (void *) p+3, 4); data/ipgrab-0.9.10/src/sdp.c:47: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 line[LINE_SIZE]; data/ipgrab-0.9.10/src/sip.c: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 line[LINE_SIZE]; data/ipgrab-0.9.10/src/sip.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 temp[32]; data/ipgrab-0.9.10/src/sip.c:133: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). content_length = atoi(temp); data/ipgrab-0.9.10/src/slp.c:62: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/snmp.c:168: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 community[COMMUNITY_LENGTH + 1]; data/ipgrab-0.9.10/src/snmp.c:253:4: [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(community, "<indeterminate>"); data/ipgrab-0.9.10/src/ssh.c:103: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((void *) &packet_length, payload, 4); data/ipgrab-0.9.10/src/tcp.c:66: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 holder[HOLDER_SIZE]; data/ipgrab-0.9.10/src/tcp.c:130:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *) &mss, holder, 2); data/ipgrab-0.9.10/src/tcp.c:154: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((void *) &ts1, holder, 4); data/ipgrab-0.9.10/src/tcp.c:156: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((void *) &ts2, holder+4, 4); data/ipgrab-0.9.10/src/tcp.c:219: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 flag_str[8]; data/ipgrab-0.9.10/src/tcp.c:222: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 holder[64]; data/ipgrab-0.9.10/src/utilities.c:37: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 space_str[SPACESTR_SIZE]; data/ipgrab-0.9.10/src/utilities.c:56: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(s, temp, len); data/ipgrab-0.9.10/src/utilities.c:191: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 hexbuf [BUF_SIZE]; data/ipgrab-0.9.10/src/utilities.c:192: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 charbuf [BUF_SIZE]; data/ipgrab-0.9.10/src/ah.c:108: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). display("Next header", holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/dhcp.c:169:49: [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). display("Operation", (u_int8_t *) holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/dhcp.c:200:60: [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). display("Server host name", (u_int8_t *) dhcp.sname, strlen(dhcp.sname), data/ipgrab-0.9.10/src/dhcp.c:202: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). display("Boot file name", (u_int8_t *) dhcp.file, strlen(dhcp.file), data/ipgrab-0.9.10/src/dhcp.c:237: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). display("Option", (u_int8_t *) holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/dhcp.c:305: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). display(" Host name", (u_int8_t *) holder, strlen(holder), data/ipgrab-0.9.10/src/dhcp.c:314:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). display(" Domain name", (u_int8_t *) holder, strlen(holder), data/ipgrab-0.9.10/src/display.c:175: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). label_len = strlen(label); data/ipgrab-0.9.10/src/display.c:178:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(label_truncated, label, LABEL_LENGTH); data/ipgrab-0.9.10/src/display.c:378: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). len = strlen(ptr); data/ipgrab-0.9.10/src/display.c:431: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). display_minimal(content, strlen(content), DISP_STRING); data/ipgrab-0.9.10/src/display.c:446: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). display(label, content, strlen(content), DISP_STRING_MULTILINE); data/ipgrab-0.9.10/src/ftpctrl.c:61: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). ptr = payload + strlen(payload); data/ipgrab-0.9.10/src/ftpctrl.c:91:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(replycode_str, payload, 3); data/ipgrab-0.9.10/src/ftpctrl.c:134: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). ptr = payload + strlen(payload); data/ipgrab-0.9.10/src/ftpctrl.c:141:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(requestcode_str, payload, ptr - payload); data/ipgrab-0.9.10/src/getopt.c:316:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extern int strlen (const char *); data/ipgrab-0.9.10/src/getopt.c:514:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = nonoption_flags_max_len = strlen (orig_str); data/ipgrab-0.9.10/src/getopt.c:738:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). == (unsigned int) strlen (p->name)) data/ipgrab-0.9.10/src/getopt.c:762:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:795:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:811:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:816:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:927:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/ipgrab-0.9.10/src/getopt.c:950:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:970:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:984:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/getopt.c:988:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/ipgrab-0.9.10/src/http.c:91: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). if (isspace_str(line, strlen(line))) data/ipgrab-0.9.10/src/http.c:104:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i=0; i<strlen(line); i++) data/ipgrab-0.9.10/src/icmp.c:371: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). display("Type", (u_int8_t *) holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/icmp.c:382: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). display("Code", (u_int8_t *) &holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/icmp.c:388: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). display("Code", (u_int8_t *) &holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/ipv6.c:130: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). display("Next header", holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/ipx.c:117: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). display("Packet type", (u_int8_t *) holder, strlen(holder), data/ipgrab-0.9.10/src/ipxrip.c:89:49: [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). display("Operation", (u_int8_t *) holder, strlen(holder), DISP_STRING); data/ipgrab-0.9.10/src/netbios_ns.c:129: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). int input_length = strlen(s); data/ipgrab-0.9.10/src/netbios_ns.c:156:3: [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(output, " "); data/ipgrab-0.9.10/src/ns_labels.c:127:3: [1] (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 character. strcpy(s,"\0"); data/ipgrab-0.9.10/src/ns_labels.c:134:6: [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(s, "."); data/ipgrab-0.9.10/src/ns_labels.c:136: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). s+strlen(s)); data/ipgrab-0.9.10/src/ns_labels.c:138:2: [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(s, "\0"); data/ipgrab-0.9.10/src/sip.c:77: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). for (i=0; i<strlen(line); i++) data/ipgrab-0.9.10/src/sip.c:92: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). display("Header", (u_int8_t *) line, strlen(line), data/ipgrab-0.9.10/src/sip.c:99: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). for (i=0; i<strlen(line); i++) data/ipgrab-0.9.10/src/strmap.c:45: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). while(strlen(sm[i].string) != 0) data/ipgrab-0.9.10/src/tcp.c:264: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(flag_str, "S"); data/ipgrab-0.9.10/src/tcp.c:266: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(flag_str, "F"); data/ipgrab-0.9.10/src/tcp.c:268: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(flag_str, "R"); data/ipgrab-0.9.10/src/tcp.c:270: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(flag_str, "P"); data/ipgrab-0.9.10/src/tcp.c:272: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(flag_str, "A"); data/ipgrab-0.9.10/src/tcp.c:274: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(flag_str, "U"); data/ipgrab-0.9.10/src/tcp.c:287: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). display_minimal(flag_str, strlen(flag_str), DISP_STRING); data/ipgrab-0.9.10/src/tcp.c:317: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). display("Flags", (u_int8_t *) &flag_str, strlen(flag_str), data/ipgrab-0.9.10/src/utilities.c:123: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(*p++) + 1; data/ipgrab-0.9.10/src/utilities.c:247: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). return 15-strlen(ptr); ANALYSIS SUMMARY: Hits = 164 Lines analyzed = 25298 in approximately 0.63 seconds (40175 lines/second) Physical Source Lines of Code (SLOC) = 12642 Hits@level = [0] 287 [1] 56 [2] 94 [3] 10 [4] 4 [5] 0 Hits@level+ = [0+] 451 [1+] 164 [2+] 108 [3+] 14 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 35.6747 [1+] 12.9726 [2+] 8.54295 [3+] 1.10742 [4+] 0.316406 [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.