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/nmap-7.91+dfsg1/nse_nmaplib.cc
Examining data/nmap-7.91+dfsg1/protocols.cc
Examining data/nmap-7.91+dfsg1/idle_scan.cc
Examining data/nmap-7.91+dfsg1/NewTargets.cc
Examining data/nmap-7.91+dfsg1/scan_engine_connect.cc
Examining data/nmap-7.91+dfsg1/FPModel.h
Examining data/nmap-7.91+dfsg1/charpool.h
Examining data/nmap-7.91+dfsg1/charpool.cc
Examining data/nmap-7.91+dfsg1/nmap_error.h
Examining data/nmap-7.91+dfsg1/scan_lists.cc
Examining data/nmap-7.91+dfsg1/main.cc
Examining data/nmap-7.91+dfsg1/nse_fs.h
Examining data/nmap-7.91+dfsg1/NmapOps.cc
Examining data/nmap-7.91+dfsg1/nmap_ftp.cc
Examining data/nmap-7.91+dfsg1/nsock/include/nsock.h
Examining data/nmap-7.91+dfsg1/nsock/include/nsock_winconfig.h
Examining data/nmap-7.91+dfsg1/nsock/tests/tests_main.c
Examining data/nmap-7.91+dfsg1/nsock/tests/logs.c
Examining data/nmap-7.91+dfsg1/nsock/tests/test-common.h
Examining data/nmap-7.91+dfsg1/nsock/tests/ghheaps.c
Examining data/nmap-7.91+dfsg1/nsock/tests/basic.c
Examining data/nmap-7.91+dfsg1/nsock/tests/connect.c
Examining data/nmap-7.91+dfsg1/nsock/tests/cancel.c
Examining data/nmap-7.91+dfsg1/nsock/tests/ghlists.c
Examining data/nmap-7.91+dfsg1/nsock/tests/timer.c
Examining data/nmap-7.91+dfsg1/nsock/src/netutils.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_pool.c
Examining data/nmap-7.91+dfsg1/nsock/src/error.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_connect.c
Examining data/nmap-7.91+dfsg1/nsock/src/engine_iocp.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_pcap.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_proxy.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_write.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_log.c
Examining data/nmap-7.91+dfsg1/nsock/src/engine_poll.c
Examining data/nmap-7.91+dfsg1/nsock/src/engine_epoll.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_pcap.h
Examining data/nmap-7.91+dfsg1/nsock/src/gh_list.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_read.c
Examining data/nmap-7.91+dfsg1/nsock/src/engine_select.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_ssl.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_engines.c
Examining data/nmap-7.91+dfsg1/nsock/src/gh_heap.c
Examining data/nmap-7.91+dfsg1/nsock/src/filespace.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_timers.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_proxy.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_event.c
Examining data/nmap-7.91+dfsg1/nsock/src/proxy_socks4.c
Examining data/nmap-7.91+dfsg1/nsock/src/proxy_http.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_internal.h
Examining data/nmap-7.91+dfsg1/nsock/src/engine_kqueue.c
Examining data/nmap-7.91+dfsg1/nsock/src/filespace.h
Examining data/nmap-7.91+dfsg1/nsock/src/gh_heap.h
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_iod.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_ssl.c
Examining data/nmap-7.91+dfsg1/nsock/src/error.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_core.c
Examining data/nmap-7.91+dfsg1/nsock/src/netutils.c
Examining data/nmap-7.91+dfsg1/nsock/src/nsock_log.h
Examining data/nmap-7.91+dfsg1/nse_ssl_cert.h
Examining data/nmap-7.91+dfsg1/nse_ssl_cert.cc
Examining data/nmap-7.91+dfsg1/string_pool.cc
Examining data/nmap-7.91+dfsg1/xml.cc
Examining data/nmap-7.91+dfsg1/nse_nsock.h
Examining data/nmap-7.91+dfsg1/FingerPrintResults.h
Examining data/nmap-7.91+dfsg1/osscan2.cc
Examining data/nmap-7.91+dfsg1/lpeg.c
Examining data/nmap-7.91+dfsg1/nse_debug.h
Examining data/nmap-7.91+dfsg1/payload.cc
Examining data/nmap-7.91+dfsg1/nse_libssh2.cc
Examining data/nmap-7.91+dfsg1/nmap.h
Examining data/nmap-7.91+dfsg1/scan_engine_raw.cc
Examining data/nmap-7.91+dfsg1/portlist.h
Examining data/nmap-7.91+dfsg1/nse_main.cc
Examining data/nmap-7.91+dfsg1/osscan.h
Examining data/nmap-7.91+dfsg1/portreasons.cc
Examining data/nmap-7.91+dfsg1/nse_debug.cc
Examining data/nmap-7.91+dfsg1/portlist.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc
Examining data/nmap-7.91+dfsg1/libnetutil/PacketParser.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6Option.cc
Examining data/nmap-7.91+dfsg1/libnetutil/EthernetHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/TCPHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/RawData.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6RRBody.cc
Examining data/nmap-7.91+dfsg1/libnetutil/netutil.h
Examining data/nmap-7.91+dfsg1/libnetutil/PacketElement.h
Examining data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc
Examining data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ApplicationLayerElement.h
Examining data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.h
Examining data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/UDPHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv4Header.h
Examining data/nmap-7.91+dfsg1/libnetutil/PacketParser.h
Examining data/nmap-7.91+dfsg1/libnetutil/UDPHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/PacketElement.cc
Examining data/nmap-7.91+dfsg1/libnetutil/IPv6Header.h
Examining data/nmap-7.91+dfsg1/libnetutil/DestOptsHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv4Header.cc
Examining data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.h
Examining data/nmap-7.91+dfsg1/libnetutil/NetworkLayerElement.h
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6RRBody.h
Examining data/nmap-7.91+dfsg1/libnetutil/netutil.cc
Examining data/nmap-7.91+dfsg1/libnetutil/NetworkLayerElement.cc
Examining data/nmap-7.91+dfsg1/libnetutil/EthernetHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/IPv6ExtensionHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/FragmentHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ARPHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/npacket.h
Examining data/nmap-7.91+dfsg1/libnetutil/HopByHopHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/FragmentHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/HopByHopHeader.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPv6Option.h
Examining data/nmap-7.91+dfsg1/libnetutil/DataLinkLayerElement.h
Examining data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.cc
Examining data/nmap-7.91+dfsg1/libnetutil/ICMPHeader.h
Examining data/nmap-7.91+dfsg1/libnetutil/IPv4Header.h
Examining data/nmap-7.91+dfsg1/libnetutil/RawData.h
Examining data/nmap-7.91+dfsg1/libnetutil/DestOptsHeader.h
Examining data/nmap-7.91+dfsg1/NmapOutputTable.h
Examining data/nmap-7.91+dfsg1/timing.cc
Examining data/nmap-7.91+dfsg1/TargetGroup.h
Examining data/nmap-7.91+dfsg1/nmap_tty.h
Examining data/nmap-7.91+dfsg1/libssh2/include/libssh2_publickey.h
Examining data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h
Examining data/nmap-7.91+dfsg1/libssh2/include/libssh2.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/ccsid.c
Examining data/nmap-7.91+dfsg1/libssh2/os400/include/sys/socket.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/include/stdio.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/include/alloca.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c
Examining data/nmap-7.91+dfsg1/libssh2/os400/libssh2_ccsid.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/macros.h
Examining data/nmap-7.91+dfsg1/libssh2/os400/libssh2_config.h
Examining data/nmap-7.91+dfsg1/libssh2/win32/libssh2_config.h
Examining data/nmap-7.91+dfsg1/libssh2/nw/nwlib.c
Examining data/nmap-7.91+dfsg1/libssh2/nw/keepscreen.c
Examining data/nmap-7.91+dfsg1/libssh2/src/keepalive.c
Examining data/nmap-7.91+dfsg1/libssh2/src/blowfish.c
Examining data/nmap-7.91+dfsg1/libssh2/src/transport.h
Examining data/nmap-7.91+dfsg1/libssh2/src/session.c
Examining data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c
Examining data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h
Examining data/nmap-7.91+dfsg1/libssh2/src/sftp.c
Examining data/nmap-7.91+dfsg1/libssh2/src/mbedtls.h
Examining data/nmap-7.91+dfsg1/libssh2/src/publickey.c
Examining data/nmap-7.91+dfsg1/libssh2/src/transport.c
Examining data/nmap-7.91+dfsg1/libssh2/src/mac.h
Examining data/nmap-7.91+dfsg1/libssh2/src/global.c
Examining data/nmap-7.91+dfsg1/libssh2/src/misc.h
Examining data/nmap-7.91+dfsg1/libssh2/src/comp.h
Examining data/nmap-7.91+dfsg1/libssh2/src/channel.c
Examining data/nmap-7.91+dfsg1/libssh2/src/openssl.h
Examining data/nmap-7.91+dfsg1/libssh2/src/mac.c
Examining data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h
Examining data/nmap-7.91+dfsg1/libssh2/src/userauth.h
Examining data/nmap-7.91+dfsg1/libssh2/src/channel.h
Examining data/nmap-7.91+dfsg1/libssh2/src/knownhost.c
Examining data/nmap-7.91+dfsg1/libssh2/src/agent.c
Examining data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c
Examining data/nmap-7.91+dfsg1/libssh2/src/crypt.c
Examining data/nmap-7.91+dfsg1/libssh2/src/wincng.c
Examining data/nmap-7.91+dfsg1/libssh2/src/packet.c
Examining data/nmap-7.91+dfsg1/libssh2/src/comp.c
Examining data/nmap-7.91+dfsg1/libssh2/src/misc.c
Examining data/nmap-7.91+dfsg1/libssh2/src/userauth.c
Examining data/nmap-7.91+dfsg1/libssh2/src/blf.h
Examining data/nmap-7.91+dfsg1/libssh2/src/kex.c
Examining data/nmap-7.91+dfsg1/libssh2/src/openssl.c
Examining data/nmap-7.91+dfsg1/libssh2/src/packet.h
Examining data/nmap-7.91+dfsg1/libssh2/src/bcrypt_pbkdf.c
Examining data/nmap-7.91+dfsg1/libssh2/src/pem.c
Examining data/nmap-7.91+dfsg1/libssh2/src/wincng.h
Examining data/nmap-7.91+dfsg1/libssh2/src/hostkey.c
Examining data/nmap-7.91+dfsg1/libssh2/src/session.h
Examining data/nmap-7.91+dfsg1/libssh2/src/scp.c
Examining data/nmap-7.91+dfsg1/libssh2/src/crypto.h
Examining data/nmap-7.91+dfsg1/libssh2/src/version.c
Examining data/nmap-7.91+dfsg1/libssh2/src/sftp.h
Examining data/nmap-7.91+dfsg1/libssh2/vms/man2help.c
Examining data/nmap-7.91+dfsg1/libssh2/vms/libssh2_config.h
Examining data/nmap-7.91+dfsg1/osscan2.h
Examining data/nmap-7.91+dfsg1/nmap_amigaos.h
Examining data/nmap-7.91+dfsg1/xml.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_listen.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_core.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_listen.c
Examining data/nmap-7.91+dfsg1/ncat/sys_wrap.h
Examining data/nmap-7.91+dfsg1/ncat/http_digest.c
Examining data/nmap-7.91+dfsg1/ncat/base64.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_proxy.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_ssl.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c
Examining data/nmap-7.91+dfsg1/ncat/sys_wrap.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_proxy.c
Examining data/nmap-7.91+dfsg1/ncat/util.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_ssl.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_exec.h
Examining data/nmap-7.91+dfsg1/ncat/ncat.h
Examining data/nmap-7.91+dfsg1/ncat/test/test-uri.c
Examining data/nmap-7.91+dfsg1/ncat/test/test-wildcard.c
Examining data/nmap-7.91+dfsg1/ncat/test/test-cmdline-split.c
Examining data/nmap-7.91+dfsg1/ncat/test/addrset.c
Examining data/nmap-7.91+dfsg1/ncat/base64.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_core.h
Examining data/nmap-7.91+dfsg1/ncat/http.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_lua.c
Examining data/nmap-7.91+dfsg1/ncat/http.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_connect.c
Examining data/nmap-7.91+dfsg1/ncat/ncat_main.c
Examining data/nmap-7.91+dfsg1/ncat/util.h
Examining data/nmap-7.91+dfsg1/ncat/sockaddr_u.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_lua.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_config.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_win.c
Examining data/nmap-7.91+dfsg1/ncat/config_win.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_connect.h
Examining data/nmap-7.91+dfsg1/ncat/ncat_posix.c
Examining data/nmap-7.91+dfsg1/output.h
Examining data/nmap-7.91+dfsg1/scan_engine_connect.h
Examining data/nmap-7.91+dfsg1/nmap_ftp.h
Examining data/nmap-7.91+dfsg1/service_scan.h
Examining data/nmap-7.91+dfsg1/tests/nmap_dns_test.cc
Examining data/nmap-7.91+dfsg1/FPEngine.cc
Examining data/nmap-7.91+dfsg1/osscan.cc
Examining data/nmap-7.91+dfsg1/nmap_dns.h
Examining data/nmap-7.91+dfsg1/services.cc
Examining data/nmap-7.91+dfsg1/nmap_dns.cc
Examining data/nmap-7.91+dfsg1/nse_libssh2.h
Examining data/nmap-7.91+dfsg1/tcpip.cc
Examining data/nmap-7.91+dfsg1/probespec.h
Examining data/nmap-7.91+dfsg1/FPModel.cc
Examining data/nmap-7.91+dfsg1/nse_lua.h
Examining data/nmap-7.91+dfsg1/payload.h
Examining data/nmap-7.91+dfsg1/scan_engine.h
Examining data/nmap-7.91+dfsg1/nse_dnet.h
Examining data/nmap-7.91+dfsg1/output.cc
Examining data/nmap-7.91+dfsg1/nse_zlib.h
Examining data/nmap-7.91+dfsg1/nmap_tty.cc
Examining data/nmap-7.91+dfsg1/targets.cc
Examining data/nmap-7.91+dfsg1/tcpip.h
Examining data/nmap-7.91+dfsg1/utils.h
Examining data/nmap-7.91+dfsg1/MACLookup.cc
Examining data/nmap-7.91+dfsg1/nbase/getopt.h
Examining data/nmap-7.91+dfsg1/nbase/nbase.h
Examining data/nmap-7.91+dfsg1/nbase/nbase_misc.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_crc32ct.h
Examining data/nmap-7.91+dfsg1/nbase/nbase_winunix.h
Examining data/nmap-7.91+dfsg1/nbase/strcasecmp.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_time.c
Examining data/nmap-7.91+dfsg1/nbase/inet_ntop.c
Examining data/nmap-7.91+dfsg1/nbase/getnameinfo.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_memalloc.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_rnd.c
Examining data/nmap-7.91+dfsg1/nbase/snprintf.c
Examining data/nmap-7.91+dfsg1/nbase/getaddrinfo.c
Examining data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_str.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_ipv6.h
Examining data/nmap-7.91+dfsg1/nbase/nbase_winconfig.h
Examining data/nmap-7.91+dfsg1/nbase/nbase_winunix.c
Examining data/nmap-7.91+dfsg1/nbase/inet_pton.c
Examining data/nmap-7.91+dfsg1/nbase/nbase_addrset.c
Examining data/nmap-7.91+dfsg1/nbase/getopt.c
Examining data/nmap-7.91+dfsg1/traceroute.h
Examining data/nmap-7.91+dfsg1/nmap.cc
Examining data/nmap-7.91+dfsg1/nse_nsock.cc
Examining data/nmap-7.91+dfsg1/service_scan.cc
Examining data/nmap-7.91+dfsg1/FPEngine.h
Examining data/nmap-7.91+dfsg1/portreasons.h
Examining data/nmap-7.91+dfsg1/nmap_winconfig.h
Examining data/nmap-7.91+dfsg1/nse_main.h
Examining data/nmap-7.91+dfsg1/targets.h
Examining data/nmap-7.91+dfsg1/nse_utility.h
Examining data/nmap-7.91+dfsg1/NmapOps.h
Examining data/nmap-7.91+dfsg1/nse_zlib.cc
Examining data/nmap-7.91+dfsg1/TargetGroup.cc
Examining data/nmap-7.91+dfsg1/string_pool.h
Examining data/nmap-7.91+dfsg1/protocols.h
Examining data/nmap-7.91+dfsg1/MACLookup.h
Examining data/nmap-7.91+dfsg1/idle_scan.h
Examining data/nmap-7.91+dfsg1/services.h
Examining data/nmap-7.91+dfsg1/struct_ip.h
Examining data/nmap-7.91+dfsg1/utils.cc
Examining data/nmap-7.91+dfsg1/timing.h
Examining data/nmap-7.91+dfsg1/Target.cc
Examining data/nmap-7.91+dfsg1/scan_engine.cc
Examining data/nmap-7.91+dfsg1/nse_utility.cc
Examining data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c
Examining data/nmap-7.91+dfsg1/nse_pcrelib.cc
Examining data/nmap-7.91+dfsg1/traceroute.cc
Examining data/nmap-7.91+dfsg1/nse_dnet.cc
Examining data/nmap-7.91+dfsg1/scan_engine_raw.h
Examining data/nmap-7.91+dfsg1/nse_pcrelib.h
Examining data/nmap-7.91+dfsg1/FingerPrintResults.cc
Examining data/nmap-7.91+dfsg1/nse_nmaplib.h
Examining data/nmap-7.91+dfsg1/Target.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/rand.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/fw.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/eth.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/icmpv6.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/route.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/os.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/tcp.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/arp.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/icmp.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/addr.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/intf.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/sctp.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/blob.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/ip.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/udp.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/tun.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/ip6.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/err.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet_winconfig.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/include/queue.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/acconfig.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-util.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-snoop.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-win32.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/strsep.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/strlcat.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-ndd.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/crc32ct.h
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/err.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/route-win32.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/route-hpux.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/route-none.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/ip6.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-bsd.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-none.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-win32.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-win32.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/strlcpy.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-none.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-linux.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/fw-none.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/addr-util.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-none.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/ip.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-linux.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-pfilt.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-bsd.c
Examining data/nmap-7.91+dfsg1/libdnet-stripped/src/memcmp.c
Examining data/nmap-7.91+dfsg1/scan_lists.h
Examining data/nmap-7.91+dfsg1/nping/EchoServer.cc
Examining data/nmap-7.91+dfsg1/nping/NpingOps.h
Examining data/nmap-7.91+dfsg1/nping/ArgParser.cc
Examining data/nmap-7.91+dfsg1/nping/EchoServer.h
Examining data/nmap-7.91+dfsg1/nping/winfix.h
Examining data/nmap-7.91+dfsg1/nping/global_structures.h
Examining data/nmap-7.91+dfsg1/nping/utils_net.h
Examining data/nmap-7.91+dfsg1/nping/EchoClient.cc
Examining data/nmap-7.91+dfsg1/nping/NpingTargets.cc
Examining data/nmap-7.91+dfsg1/nping/NpingTargets.h
Examining data/nmap-7.91+dfsg1/nping/output.h
Examining data/nmap-7.91+dfsg1/nping/NpingTarget.h
Examining data/nmap-7.91+dfsg1/nping/common_modified.h
Examining data/nmap-7.91+dfsg1/nping/stats.cc
Examining data/nmap-7.91+dfsg1/nping/output.cc
Examining data/nmap-7.91+dfsg1/nping/utils.h
Examining data/nmap-7.91+dfsg1/nping/common.cc
Examining data/nmap-7.91+dfsg1/nping/nping.h
Examining data/nmap-7.91+dfsg1/nping/common.h
Examining data/nmap-7.91+dfsg1/nping/NEPContext.cc
Examining data/nmap-7.91+dfsg1/nping/ArgParser.h
Examining data/nmap-7.91+dfsg1/nping/stats.h
Examining data/nmap-7.91+dfsg1/nping/NpingOps.cc
Examining data/nmap-7.91+dfsg1/nping/NpingTarget.cc
Examining data/nmap-7.91+dfsg1/nping/utils.cc
Examining data/nmap-7.91+dfsg1/nping/Crypto.h
Examining data/nmap-7.91+dfsg1/nping/winfix.cc
Examining data/nmap-7.91+dfsg1/nping/EchoHeader.cc
Examining data/nmap-7.91+dfsg1/nping/ProbeMode.h
Examining data/nmap-7.91+dfsg1/nping/ProbeMode.cc
Examining data/nmap-7.91+dfsg1/nping/nping.cc
Examining data/nmap-7.91+dfsg1/nping/nping_winconfig.h
Examining data/nmap-7.91+dfsg1/nping/common_modified.cc
Examining data/nmap-7.91+dfsg1/nping/Crypto.cc
Examining data/nmap-7.91+dfsg1/nping/utils_net.cc
Examining data/nmap-7.91+dfsg1/nping/EchoHeader.h
Examining data/nmap-7.91+dfsg1/nping/EchoClient.h
Examining data/nmap-7.91+dfsg1/nping/NEPContext.h
Examining data/nmap-7.91+dfsg1/nse_openssl.h
Examining data/nmap-7.91+dfsg1/nse_fs.cc
Examining data/nmap-7.91+dfsg1/nse_openssl.cc
Examining data/nmap-7.91+dfsg1/nmap_error.cc
Examining data/nmap-7.91+dfsg1/NmapOutputTable.cc
Examining data/nmap-7.91+dfsg1/nse_lpeg.h
Examining data/nmap-7.91+dfsg1/NewTargets.h
Examining data/nmap-7.91+dfsg1/nse_lpeg.cc

FINAL RESULTS:

data/nmap-7.91+dfsg1/nbase/nbase_misc.c:764:7:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
  n = readlink("/proc/self/exe", buf, sizeof(buf));
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1684:25:  [5] (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 high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
                        strncat(final_output, hex, sizeof(final_output)-1);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1712:29:  [5] (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 high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
                            strncat(final_output, hex, sizeof(final_output)-1);
data/nmap-7.91+dfsg1/NmapOutputTable.h:106:35:  [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.
          __attribute__ ((format (printf, 5, 6))); // Offset by 1 to account for implicit "this" parameter.
data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet_winconfig.h:280:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet_winconfig.h:280:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:221:7:  [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.
		i = sscanf(buf, "%s 0x%x 0x%x %99s %99s %99s\n",
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:445:4:  [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((j % 2) ? "%02x " : "%02x", (u_int)p[i + j]);
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:448:4:  [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((j % 2) ? "   " : "  ");
data/nmap-7.91+dfsg1/libdnet-stripped/src/err.c:56:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		(void)vfprintf(stderr, fmt, ap);
data/nmap-7.91+dfsg1/libdnet-stripped/src/err.c:75:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		(void)vfprintf(stderr, fmt, ap);
data/nmap-7.91+dfsg1/libdnet-stripped/src/err.c:93:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		(void)vfprintf(stderr, fmt, ap);
data/nmap-7.91+dfsg1/libdnet-stripped/src/err.c:106:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		(void)vfprintf(stderr, fmt, ap);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:109:7:  [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.
		if (sscanf(p, "%s (PPA %d)\n", dev, &ppa) != 2)
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:295: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(orig->intf_name, entry->intf_name);
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:77:6:  [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.
	if (system(cmd) < 0)
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:162: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, str, list);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:181: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, str, list);
data/nmap-7.91+dfsg1/libnetutil/netutil.h:113:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/libnetutil/netutil.h:116:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/libssh2/os400/include/stdio.h:65:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define vsnprintf(dst, len, fmt, args)                                     \
data/nmap-7.91+dfsg1/libssh2/os400/include/stdio.h:67:10:  [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       _libssh2_os400_snprintf
data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c:152:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    i = vsprintf(buf, fmt, args);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:616:46:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->local.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:668:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->remote.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1307:46:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->local.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1357:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->remote.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2344:46:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->local.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2394:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->remote.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2953:46:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->local.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3003:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                init(session, session->remote.crypt, iv, &free_iv, secret,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3782:43:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
                           unsigned char *crypt,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3797:32:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            if(kex_agree_instr(crypt, crypt_len, s, method_len)) {
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3819:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        s = kex_agree_instr(crypt, crypt_len,
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:485:33:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    const LIBSSH2_CRYPT_METHOD *crypt;
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:925:11:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    int (*crypt) (LIBSSH2_SESSION * session, unsigned char *block,
data/nmap-7.91+dfsg1/libssh2/src/misc.c:481:15:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        len = vsnprintf(buffer + msglen, buflen, format, vargs);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:258:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            if(method->crypt(session, *data + len_decrypted, blocksize,
data/nmap-7.91+dfsg1/libssh2/src/pem.c:584:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            if(method->crypt(session, decrypted.data + len_decrypted,
data/nmap-7.91+dfsg1/libssh2/src/session.c:901:27:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        if(session->local.crypt && session->local.crypt->dtor) {
data/nmap-7.91+dfsg1/libssh2/src/session.c:917:28:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        if(session->remote.crypt && session->remote.crypt->dtor) {
data/nmap-7.91+dfsg1/libssh2/src/session.c:1204:56:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        method = (LIBSSH2_KEX_METHOD *) session->local.crypt;
data/nmap-7.91+dfsg1/libssh2/src/session.c:1208:57:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        method = (LIBSSH2_KEX_METHOD *) session->remote.crypt;
data/nmap-7.91+dfsg1/libssh2/src/transport.c:142:35:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        if(session->remote.crypt->crypt(session, source, blocksize,
data/nmap-7.91+dfsg1/libssh2/src/transport.c:879:38:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            if(session->local.crypt->crypt(session, ptr,
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:125:8:  [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(gevonden,strtok(gevonden_file," "));
data/nmap-7.91+dfsg1/libssh2/win32/libssh2_config.h:28:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/libssh2/win32/libssh2_config.h:28:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/libssh2/win32/libssh2_config.h:30:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf _vsnprintf
data/nmap-7.91+dfsg1/main.cc:148:7:  [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(command, argv[i]);
data/nmap-7.91+dfsg1/nbase/nbase.h:213:16:  [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.
extern "C" int snprintf (char *str, size_t sz, const char *format, ...)
data/nmap-7.91+dfsg1/nbase/nbase.h:214:30:  [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.
     __attribute__ ((format (printf, 3, 4)));
data/nmap-7.91+dfsg1/nbase/nbase.h:218:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
extern "C" int vsnprintf (char *str, size_t sz, const char *format,
data/nmap-7.91+dfsg1/nbase/nbase.h:220:29:  [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.
     __attribute__((format (printf, 3, 0)));
data/nmap-7.91+dfsg1/nbase/nbase.h:225:30:  [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.
     __attribute__ ((format (printf, 2, 3)));
data/nmap-7.91+dfsg1/nbase/nbase.h:230:29:  [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.
     __attribute__((format (printf, 2, 0)));
data/nmap-7.91+dfsg1/nbase/nbase.h:235:30:  [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.
     __attribute__ ((format (printf, 3, 4)));
data/nmap-7.91+dfsg1/nbase/nbase.h:241:29:  [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.
     __attribute__((format (printf, 3, 0)));
data/nmap-7.91+dfsg1/nbase/nbase.h:245:16:  [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.
extern "C" int snprintf (char *, size_t, const char *, ...);
data/nmap-7.91+dfsg1/nbase/nbase.h:249:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
extern "C" int vsnprintf (char *, size_t, const char *, va_list);
data/nmap-7.91+dfsg1/nbase/nbase.h:282: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.
#define access _access
data/nmap-7.91+dfsg1/nbase/nbase.h:296:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/nbase/nbase.h:296:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nmap-7.91+dfsg1/nbase/nbase.h:301:9:  [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.
#define execv _execv
data/nmap-7.91+dfsg1/nbase/nbase.h:425:30:  [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.
     __attribute__ ((format (printf, 3, 0)));
data/nmap-7.91+dfsg1/nbase/nbase.h:427:30:  [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.
     __attribute__ ((format (printf, 3, 4)));
data/nmap-7.91+dfsg1/nbase/nbase.h:432:30:  [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.
     __attribute__ ((format (printf, 2, 0)));
data/nmap-7.91+dfsg1/nbase/nbase_memalloc.c:72:27:  [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.
  __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nbase/nbase_memalloc.c:79: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, ap);
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:751:12:  [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.
  else if (access(pathname_buf, R_OK) != -1)
data/nmap-7.91+dfsg1/nbase/nbase_str.c:128:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  ret = vsnprintf(s, n, fmt, ap);
data/nmap-7.91+dfsg1/nbase/nbase_str.c:177:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    n = vsnprintf(s, size, fmt, va_tmp);
data/nmap-7.91+dfsg1/nbase/snprintf.c:485:1:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
snprintf (char *str, size_t sz, const char *format, ...)
data/nmap-7.91+dfsg1/nbase/snprintf.c:491:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  ret = vsnprintf (str, sz, format, args);
data/nmap-7.91+dfsg1/nbase/snprintf.c:502:12:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    ret2 = vsprintf (tmp, format, args);
data/nmap-7.91+dfsg1/nbase/snprintf.c:579:12:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    ret2 = vsprintf (tmp, format, args);
data/nmap-7.91+dfsg1/nbase/snprintf.c:609:12:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    ret2 = vsprintf (tmp, format, args);
data/nmap-7.91+dfsg1/nbase/snprintf.c:625:1:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
vsnprintf (char *str, size_t sz, const char *format, va_list args)
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:584:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(socks4msg.data, username);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:602:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(socks4msg.data + datalen, o.target);
data/nmap-7.91+dfsg1/ncat/ncat_main.c:1045:37:  [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 (o.execmode == EXEC_SHELL && access("/bin/sh", X_OK) == -1)
data/nmap-7.91+dfsg1/ncat/ncat_posix.c:174:13:  [4] (shell) execl:
  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.
            execl("/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
data/nmap-7.91+dfsg1/ncat/ncat_posix.c:183:13:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execv(cmdargs[0], cmdargs);
data/nmap-7.91+dfsg1/ncat/util.c:132: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, fmt, ap);
data/nmap-7.91+dfsg1/ncat/util.c:144: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, fmt, ap);
data/nmap-7.91+dfsg1/ncat/util.c:155: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, fmt, ap);
data/nmap-7.91+dfsg1/ncat/util.c:166: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, fmt, ap);
data/nmap-7.91+dfsg1/ncat/util.c:197: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, fmt, ap);
data/nmap-7.91+dfsg1/ncat/util.h:92:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/ncat/util.h:94:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/ncat/util.h:96:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/ncat/util.h:98:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/ncat/util.h:111:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/ncat/util.h:121:30:  [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.
     __attribute__ ((format (printf, 4, 5)));
data/nmap-7.91+dfsg1/nmap_dns.cc:970: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. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if (sscanf(tp, fmt, ipaddr) == 1) add_dns_server(ipaddr);
data/nmap-7.91+dfsg1/nmap_dns.cc:998: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. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if (sscanf(tp, pattern.str().c_str(), ipaddrstr, hname) == 2)
data/nmap-7.91+dfsg1/nmap_error.h:92:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nmap_error.h:94:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nmap_error.h:97:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nmap_error.h:99:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nping/output.cc:101: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, str, list);
data/nmap-7.91+dfsg1/nping/output.cc:145: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, str, list); /* Print to stderr */
data/nmap-7.91+dfsg1/nping/output.cc:186: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(stdout, str, list); /* Print to stderr */
data/nmap-7.91+dfsg1/nping/output.cc:209: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, str, list);
data/nmap-7.91+dfsg1/nping/output.cc:225: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, str, list);
data/nmap-7.91+dfsg1/nping/output.cc:241: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, str, list);
data/nmap-7.91+dfsg1/nping/output.h:89:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nping/output.h:92:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nping/output.h:96:30:  [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.
     __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nping/output.h:99:27:  [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.
    __attribute__((format(printf, 2, 3)));
data/nmap-7.91+dfsg1/nping/output.h:102:27:  [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.
    __attribute__((format(printf, 2, 3)));
data/nmap-7.91+dfsg1/nping/output.h:105:27:  [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.
    __attribute__((format(printf, 2, 3)));
data/nmap-7.91+dfsg1/nping/utils_net.cc:840:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo, "ARP who has %s? ", IPtoa(*tIP));
data/nmap-7.91+dfsg1/nping/utils_net.cc:841:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo+strlen(protoinfo),"Tell %s", IPtoa(*sIP) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:844:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo, "ARP reply %s ", IPtoa(*sIP));
data/nmap-7.91+dfsg1/nping/utils_net.cc:845:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo+strlen(protoinfo),"is at %s", MACtoa(sMAC) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:848:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo, "RARP who is %s? Tell %s", MACtoa(tMAC), MACtoa(sMAC) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:851:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo, "RARP reply: %s is at %s", MACtoa(tMAC), IPtoa(*tIP) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:854:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(protoinfo, "HTYPE:%04X PTYPE:%04X HLEN:%d PLEN:%d OP:%04X SMAC:%s SIP:%s DMAC:%s DIP:%s",
data/nmap-7.91+dfsg1/nping/winfix.cc:151:15:  [4] (shell) ShellExecute:
  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.
  ret = (int) ShellExecute(0, "runas", "net.exe", startsvc, 0, SW_HIDE);
data/nmap-7.91+dfsg1/nse_debug.cc:37:7:  [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(lua_toboolean(L, idx) ? "true" : "false");
data/nmap-7.91+dfsg1/nse_fs.cc:232:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (d->pattern, "%s/*", path);
data/nmap-7.91+dfsg1/nse_libssh2.cc:59: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 c99_snprintf
data/nmap-7.91+dfsg1/nse_libssh2.cc:60:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf c99_vsnprintf
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:64:4:  [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(file, format, argp);
data/nmap-7.91+dfsg1/nsock/src/error.c:69: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, ap);
data/nmap-7.91+dfsg1/nsock/src/error.c:81: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, ap);
data/nmap-7.91+dfsg1/nsock/src/error.h:86:27:  [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.
  __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nsock/src/error.h:89:27:  [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.
  __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/nsock/src/netutils.c:164:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buffer, "%s", get_unixsock_path(ss));
data/nmap-7.91+dfsg1/nsock/src/netutils.c:169:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buffer, "%s:%d", inet_ntop_ez(ss, sslen), get_port(ss));
data/nmap-7.91+dfsg1/nsock/src/nsock_log.h:116:50:  [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.
                          __attribute__((format (printf, 5, 6)));
data/nmap-7.91+dfsg1/nsock/tests/tests_main.c:123:7:  [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(TEST_FAILED " (%s)\n", socket_strerror(-rc));
data/nmap-7.91+dfsg1/nsock/tests/tests_main.c:126: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(TEST_OK "\n");
data/nmap-7.91+dfsg1/output.cc:737:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(protocol, IPPROTO2STR(current->proto));
data/nmap-7.91+dfsg1/output.cc:956:9:  [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(o.nmap_stdout, fmt, ap);
data/nmap-7.91+dfsg1/output.cc:961:9:  [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, ap);
data/nmap-7.91+dfsg1/output.h:151:30:  [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.
     __attribute__ ((format (printf, 2, 3)));
data/nmap-7.91+dfsg1/xml.h:67:65:  [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.
int xml_write_raw(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/xml.h:68:69:  [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.
int xml_write_escaped(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
data/nmap-7.91+dfsg1/xml.h:69:78:  [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.
int xml_write_escaped_v(const char *fmt, va_list va) __attribute__ ((format (printf, 1, 0)));
data/nmap-7.91+dfsg1/xml.h:85:83:  [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.
int xml_attribute(const char *name, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
data/nmap-7.91+dfsg1/NmapOps.cc:219:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("NMAP_PRIVILEGED"))
data/nmap-7.91+dfsg1/NmapOps.cc:221: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.
  else if (getenv("NMAP_UNPRIVILEGED"))
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4670:53:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
const char *grab_next_host_spec(FILE *inputfd, bool random, int argc, const char **argv) {
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4675:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  if (random) {
data/nmap-7.91+dfsg1/libnetutil/netutil.h:537:53:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
const char *grab_next_host_spec(FILE *inputfd, bool random, int argc, const char **fakeargv);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:154:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        path = getenv("SSH_AUTH_SOCK");
data/nmap-7.91+dfsg1/main.cc:141: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.
  if ((cptr = getenv("NMAP_ARGS"))) {
data/nmap-7.91+dfsg1/nbase/getopt.c:67:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if(getenv("POSIXLY_CORRECT")) colon_mode = mode = '+';
data/nmap-7.91+dfsg1/nbase/getopt.c:163:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if(getenv("POSIXLY_CORRECT")) colon_mode = mode = '+';
data/nmap-7.91+dfsg1/nbase/getopt.c:288:5:  [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.
int getopt(int argc, char * argv[], const char *opts)
data/nmap-7.91+dfsg1/nbase/getopt.c:294:5:  [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.
int getopt_long(int argc, char * argv[], const char *shortopts,
data/nmap-7.91+dfsg1/nbase/getopt.h:48: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 * argv[], const char *opts);
data/nmap-7.91+dfsg1/nbase/getopt.h:70: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 * argv[], const char *shortopts,
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:994:30:  [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 *tmpdir = getenv("TMPDIR");
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:1004:33:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
                if ((tmp_name = tempnam(NULL, "ncat.")) == NULL)
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:252:9:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    if (CreateProcess(NULL, cmdexec, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi) == 0) {
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:252:9:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    if (CreateProcess(NULL, cmdexec, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi) == 0) {
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:287: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.
    comspec = getenv("COMSPEC");
data/nmap-7.91+dfsg1/ncat/ncat_main.c:317:17:  [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.
        int c = getopt_long(argc, argv, "46UCc:e:g:G:i:km:hp:d:lo:x:ts:uvw:nz",
data/nmap-7.91+dfsg1/ncat/ncat_main.c:766:24:  [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.
        o.proxy_auth = getenv("NCAT_PROXY_AUTH");
data/nmap-7.91+dfsg1/nmap.cc:2617:36:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (!foundsomething && (dirptr = getenv("NMAPDIR"))) {
data/nmap-7.91+dfsg1/nping/NpingOps.cc:137:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("NMAP_PRIVILEGED") || getenv("NPING_PRIVILEGED"))
data/nmap-7.91+dfsg1/nping/NpingOps.cc:137:36:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("NMAP_PRIVILEGED") || getenv("NPING_PRIVILEGED"))
data/nmap-7.91+dfsg1/nping/NpingOps.cc:139: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.
  else if (getenv("NMAP_UNPRIVILEGED") || getenv("NPING_UNPRIVILEGED"))
data/nmap-7.91+dfsg1/nping/NpingOps.cc:139:43:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  else if (getenv("NMAP_UNPRIVILEGED") || getenv("NPING_UNPRIVILEGED"))
data/nmap-7.91+dfsg1/nse_main.cc:799:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(get_random_uint());
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:154:6:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if(!CreateProcess(NULL, lpAppPath, 0, &sa, sa.bInheritHandle, CREATE_NO_WINDOW, env, 0, &startupInfo, &processInformation))
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:154:6:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if(!CreateProcess(NULL, lpAppPath, 0, &sa, sa.bInheritHandle, CREATE_NO_WINDOW, env, 0, &startupInfo, &processInformation))
data/nmap-7.91+dfsg1/nsock/tests/timer.c:71:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(NULL));
data/nmap-7.91+dfsg1/FPEngine.cc:345: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 pcapdev[128];
data/nmap-7.91+dfsg1/FPEngine.cc:621: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 pcap_filter[2048];
data/nmap-7.91+dfsg1/FPEngine.cc:623: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 dst_hosts[1220];
data/nmap-7.91+dfsg1/FPEngine.cc:1704: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 payloadbuf[300];
data/nmap-7.91+dfsg1/FPEngine.cc:2498: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(this->eth_hdr.srcmac, src_mac, 6);
data/nmap-7.91+dfsg1/FPEngine.cc:2499: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(this->eth_hdr.dstmac, dst_mac, 6);
data/nmap-7.91+dfsg1/FPEngine.cc:2714: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(this->buf, buf, len);
data/nmap-7.91+dfsg1/FingerPrintResults.cc:133: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 reason[128];
data/nmap-7.91+dfsg1/FingerPrintResults.cc:187: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 reason[128];
data/nmap-7.91+dfsg1/MACLookup.cc:88: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[256];
data/nmap-7.91+dfsg1/MACLookup.cc:90: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[128];
data/nmap-7.91+dfsg1/MACLookup.cc:101: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(filename, "r");
data/nmap-7.91+dfsg1/NmapOps.cc:153: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(ss, &sourcesock, sourcesocklen);
data/nmap-7.91+dfsg1/NmapOps.cc:171: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(&sourcesock, ss, ss_len);
data/nmap-7.91+dfsg1/NmapOps.cc:189: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 percent_buffer[10];
data/nmap-7.91+dfsg1/NmapOps.cc:596: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 tmpxsl[MAXPATHLEN];
data/nmap-7.91+dfsg1/NmapOps.cc:613: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(spoof_mac, mac_data, 6);
data/nmap-7.91+dfsg1/NmapOps.h:168: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 device[64];
data/nmap-7.91+dfsg1/NmapOutputTable.cc:142: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(cell->str, item, itemlen);
data/nmap-7.91+dfsg1/NmapOutputTable.cc: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 buf[4096];
data/nmap-7.91+dfsg1/NmapOutputTable.cc:230: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(tableout + p, cell->str,  cell->strlength);
data/nmap-7.91+dfsg1/NmapOutputTable.cc:242:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(tableout + p, cell->str,  cell->strlength);
data/nmap-7.91+dfsg1/Target.cc:215: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(ss, &targetsock, targetsocklen);
data/nmap-7.91+dfsg1/Target.cc: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(&targetsock, ss, ss_len);
data/nmap-7.91+dfsg1/Target.cc:274: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(ss, &sourcesock, sourcesocklen);
data/nmap-7.91+dfsg1/Target.cc:288: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(&sourcesock, ss, ss_len);
data/nmap-7.91+dfsg1/Target.cc:381: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(next_hop, &nexthopsock, nexthopsocklen);
data/nmap-7.91+dfsg1/Target.cc:407: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(&nexthopsock, next_hop, next_hop_len);
data/nmap-7.91+dfsg1/Target.cc:464: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(MACaddress, addy, 6);
data/nmap-7.91+dfsg1/Target.cc:471: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(SrcMACaddress, addy, 6);
data/nmap-7.91+dfsg1/Target.cc:478: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(NextHopMACaddress, addy, 6);
data/nmap-7.91+dfsg1/Target.h:291:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char targetipstring[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/Target.h:292: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 sourceipstring[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/Target.h:298: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 devname[32];
data/nmap-7.91+dfsg1/Target.h:299: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 devfullname[32];
data/nmap-7.91+dfsg1/TargetGroup.cc:674: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(&ss, addr->ai_addr, addr->ai_addrlen);
data/nmap-7.91+dfsg1/charpool.cc:73:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *charpool[16];
data/nmap-7.91+dfsg1/idle_scan.cc:286:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              char straddr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/idle_scan.cc:362: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 filter[512]; /* Libpcap filter string */
data/nmap-7.91+dfsg1/idle_scan.cc:365: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 data[IP6_MTU_MIN - IPv6_HEADER_LEN - ETH_HDR_LEN - ICMPv6_MIN_HEADER_LEN];
data/nmap-7.91+dfsg1/idle_scan.cc:436: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(&data[4], ip, sizeof(data)-4);
data/nmap-7.91+dfsg1/idle_scan.cc:461: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(&data[4], ipv6_packet, sizeof(data)-4);
data/nmap-7.91+dfsg1/idle_scan.cc:489: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 filter[512]; /* Libpcap filter string */
data/nmap-7.91+dfsg1/idle_scan.cc:490:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[FQDN_LEN + 1];
data/nmap-7.91+dfsg1/idle_scan.cc:616: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(proxy->eth.srcmac, proxy->host.SrcMACAddress(), 6);
data/nmap-7.91+dfsg1/idle_scan.cc:617: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(proxy->eth.dstmac, proxy->host.NextHopMACAddress(), 6);
data/nmap-7.91+dfsg1/idle_scan.cc:1024: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(eth.srcmac, target->SrcMACAddress(), 6);
data/nmap-7.91+dfsg1/idle_scan.cc:1025: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(eth.dstmac, target->NextHopMACAddress(), 6);
data/nmap-7.91+dfsg1/idle_scan.cc:1342: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 lastproxy[FQDN_LEN + 1] = ""; /* The proxy used in any previous call */
data/nmap-7.91+dfsg1/idle_scan.cc:1347: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 scanname[128];
data/nmap-7.91+dfsg1/idle_scan.cc:1402: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 additional_info[14];
data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/fw.h:15: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		fw_device[INTF_NAME_LEN]; /* interface name */
data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/intf.h:21: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		intf_name[INTF_NAME_LEN];   /* interface name */
data/nmap-7.91+dfsg1/libdnet-stripped/include/dnet/route.h:18: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		intf_name[INTF_NAME_LEN];	/* interface name */
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr-util.c:230:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		} else p += sprintf(p, "%x:", data[i / 2]);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:96: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(b, a, sizeof(*b));
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:137: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(&b->addr_eth, ETH_ADDR_BROADCAST, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:152:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
				sprintf(dst + strlen(dst), "/%d",
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:159:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
				sprintf(dst + strlen(dst), "/%d",
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:175: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 *ep, tmp[300];
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:213: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->addr_ip, hp->h_addr, IP_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:233: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 *p, buf[BUFSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:264: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(LLADDR(&so->sdl), &a->addr_eth, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:272: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(sa->sa_data, &a->addr_eth, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:282: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(&so->sin6.sin6_addr, &a->addr_ip6, IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:317: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(&a->addr_eth, LLADDR(&so->sdl), ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:330: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(&a->addr_eth, sa->sa_data, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:337: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(&a->addr_eth, so->sr.sr_addr, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:344: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(&a->addr_ip6, &so->sin6.sin6_addr, IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-bsd.c:55:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((arp->fd = open("/dev/route", O_RDWR, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:61:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((a->fd = open(IP_DEV_NAME, O_RDWR)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:63:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((a->fd = open("/dev/route", O_WRONLY, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:118: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(ar.arp_ha.sa_data, &entry->arp_ha.addr_eth, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:213: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[BUFSIZ], ipbuf[100], macbuf[100], maskbuf[100], devbuf[100];
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:216:12:  [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(PROC_ARP_FILE, "r")) == NULL)
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:327:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(&entry.arp_ha.addr_eth,
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:378: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(&entry.arp_ha.addr_eth, arpentries[i].PhysAddr.o_bytes,
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:449:12:  [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).
	    (fd = open("/dev/kmem", O_RDONLY, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-win32.c:46: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(iprow.bPhysAddr, &entry->arp_ha.addr_eth, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-win32.c:129: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(&entry.arp_ha.addr_eth,
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:111: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(buf, b->base + b->off, len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:122: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(b->base + b->off, (u_char *)buf, len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:135: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(b->base + b->off, buf, len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:147: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(buf, b->base + b->off, len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c:36: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	device[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c:43: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 file[32];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c:54:12:  [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).
			e->fd = open(file, O_RDWR);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c:135: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(ea, &ha.addr_eth, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-bsd.c:157: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(&ha.addr_eth, ea, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:99: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 *p, dev[16], buf[256];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:137: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 *p, dev[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:145:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((e->fd = open("/dev/streams/dlb", O_RDWR)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:159:8:  [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).
	ppa = atoi(p);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:162:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((e->fd = open(dev, O_RDWR)) < 0) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:164:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((e->fd = open(dev, O_RDWR)) < 0) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:166: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).
			if ((e->fd = open(dev, O_RDWR)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:241: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(ctlbuf + dlen, sap, e->sap_len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:242: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(ctlbuf + dlen + e->sap_len,
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:245: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(ctlbuf + dlen, eth->eth_dst.data, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:246: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(ctlbuf + dlen + ETH_ADDR_LEN, sap, abs(e->sap_len));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:284: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(ea, buf + dlp->physaddr_ack.dl_addr_offset, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:300: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(buf + DL_SET_PHYS_ADDR_REQ_SIZE, ea, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-linux.c:102: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(ea, &ha.addr_eth, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-linux.c:113: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(&ha.addr_eth, ea, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-ndd.c:26: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	device[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-ndd.c:100: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(ea, nddp->ndd_addr, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-pfilt.c:30: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	device[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-pfilt.c:56: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(ea, ifd.current_pa, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-pfilt.c:66: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(ifd.current_pa, ea, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-snoop.c:74: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(ea, &ha.addr_eth, sizeof(*ea));
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-snoop.c:86: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(&ha.addr_eth, ea, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-win32.c:59: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 pcapdev[128];
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-win32.c:136: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(ea, data->Data, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-win32.c:150: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(data->Data, ea, ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:166: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(&entry->intf_link_addr.addr_eth, a->PhysicalAddress,
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:260: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 npcap_loopback_name[1024] = {0};
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:384:6:  [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).
	n = atoi(p);
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:551: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 errbuf[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:83: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		ifra_name[IFNAMSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:358: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(ifr.ifr_addr.sa_data, &entry->intf_link_addr.addr_eth,
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:661: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(&entry->intf_link_addr, ap, sizeof(*ap));
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:726: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(&entry->intf_link_addr, ap, sizeof(*ap));
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:773: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[256], s[8][5], name[INTF_NAME_LEN];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:776:12:  [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(PROC_INET6_FILE, "r")) != NULL) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:819: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 namebuf[IFNAMSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:850: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(save, entry, save->intf_len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:852: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(save, entry, entry->intf_len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:861: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(&entry->intf_addr, src, sizeof(*src));
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:906: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 *p, buf[BUFSIZ], ebuf[BUFSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:911:12:  [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(PROC_DEV_FILE, "r")) == NULL)
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:958: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 *p, ebuf[BUFSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:1034: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 *p, ebuf[BUFSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c:29: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			 name[INTF_NAME_LEN];
data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c:194: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(iph, buf, ip_hl);
data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c: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(ip_data, p, fraglen);
data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c:218: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(frame + ETH_HDR_LEN, buf, len);
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:82:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open("/dev/arandom", O_RDONLY)) != -1 ||
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:83:12:  [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).
	    (fd = open("/dev/urandom", O_RDONLY)) != -1) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:194: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(save, dst, size);
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:195: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(dst, src, size);
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:196: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(src, save, size);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:97:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
route_msg(route_t *r, int type, char intf_name[INTF_NAME_LEN], struct addr *dst, struct addr *gw)
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:176: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 namebuf[IF_NAMESIZE];
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:196:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((r->ip_fd = open(IP_DEV_NAME, O_RDWR)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:200:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((r->fd = open("/dev/route", O_RDWR, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:348: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 namebuf[IF_NAMESIZE];
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:665:12:  [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).
	    (fd = open("/dev/kmem", O_RDONLY, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-hpux.c:106: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(&rtr.rtr_destaddr, &entry->route_dst.addr_ip,
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-hpux.c:122: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(&entry->route_gw.addr_ip, &rtr.rtr_gwayaddr, IP_ADDR_LEN);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:161: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(RTA_DATA(rta), &i, alen);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:163: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(RTA_DATA(rta), entry->route_dst.addr_data8, alen);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c: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(entry->route_gw.addr_data8, RTA_DATA(rta), alen);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:204: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 ifbuf[IFNAMSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:228: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[BUFSIZ];
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:229: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 ifbuf[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:232:12:  [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(PROC_ROUTE_FILE, "r")) != NULL) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:262:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (ret == 0 && (fp = fopen(PROC_IPV6_ROUTE_FILE, "r")) != NULL) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:263: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 s[33], d[8][5], n[8][5];
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-bsd.c:36: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 dev[128];
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-bsd.c:58:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((tun->fd = open(dev, O_RDWR, 0)) != -1 &&
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-linux.c:44: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).
	if ((tun->fd = open("/dev/net/tun", O_RDWR, 0)) < 0 ||
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:36: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		 name[16];
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:43: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 cmd[512];
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:51: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).
	if ((tun->fd = open(DEV_TUN, O_RDWR, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:54:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((tun->ip_fd = open(DEV_IP, O_RDWR, 0)) < 0)
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-solaris.c:60:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((tun->if_fd = open(DEV_TUN, O_RDWR, 0)) < 0)
data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc:111: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(&(this->h), buf, ARP_HEADER_LEN);
data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc:262:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(this->h.data, val, ETH_ADDRESS_LEN);
data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc:276: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(this->h.data+6, &val.s_addr, 4);
data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc:293: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(this->h.data+10, val, ETH_ADDRESS_LEN);
data/nmap-7.91+dfsg1/libnetutil/ARPHeader.cc:307: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(this->h.data+16, &val.s_addr, 4);
data/nmap-7.91+dfsg1/libnetutil/EthernetHeader.cc:112: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(&(this->h), buf, ETH_HEADER_LEN);
data/nmap-7.91+dfsg1/libnetutil/EthernetHeader.cc:182: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(h.eth_smac, m, 6);
data/nmap-7.91+dfsg1/libnetutil/EthernetHeader.cc:200: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(h.eth_dmac, m, 6);
data/nmap-7.91+dfsg1/libnetutil/FragmentHeader.cc:112: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(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/HopByHopHeader.cc:112: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(&(this->h), buf, 4);
data/nmap-7.91+dfsg1/libnetutil/HopByHopHeader.cc:124:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&(this->h), buf, this->length);
data/nmap-7.91+dfsg1/libnetutil/HopByHopHeader.cc:357: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(curr_option+2, data, len);
data/nmap-7.91+dfsg1/libnetutil/ICMPv4Header.cc:128: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(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/ICMPv4Header.cc: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 auxstr[64];
data/nmap-7.91+dfsg1/libnetutil/ICMPv4Header.cc:436: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(buffer, &h, length);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:127: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(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:396:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(i6src.s6_addr, v6hdr->getSourceAddress(), 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:397:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(i6dst.s6_addr, v6hdr->getDestinationAddress(), 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:775:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->h_na->target_address, addr.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:779:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->h_ns->target_address, addr.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:783:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(this->h_r->target_address, addr.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:800:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(addr.s6_addr, this->h_na->target_address, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:804:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(addr.s6_addr, this->h_ns->target_address, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:808:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(addr.s6_addr, this->h_r->target_address, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:818:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(this->h_r->destination_address, addr.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:835:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(addr.s6_addr, this->h_r->destination_address, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:1057: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(&(this->h_ni->nonce), nonce, NI_NONCE_LEN);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:1079: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(this->h_mld->mcast_address, addr.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Header.cc:1099: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(addr.s6_addr, this->h_mld->mcast_address, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Option.cc:110:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Option.cc:167:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(this->h_la->link_addr, val, ICMPv6_OPTION_LINK_ADDRESS_LEN);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6Option.cc:260: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(this->h_pi->prefix, val, 16);
data/nmap-7.91+dfsg1/libnetutil/ICMPv6RRBody.cc:110:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:120: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(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:157: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 ipstring[256];
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:161: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 ipinfo[512] = "";                /* Temp info about IP.               */
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:162: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 fragnfo[64] = "";                /* Temp info about fragmentation.    */
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:584: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 errstr[256];
data/nmap-7.91+dfsg1/libnetutil/IPv4Header.cc:607: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(this->h.options, opts_buff, opts_len);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:117: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(&(this->h), buf, IPv6_HEADER_LEN);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:148: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 ipstring[256];
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:151: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 ipinfo[512] = "";                /* Temp info about IP.               */
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:442: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(this->h.ip6_src, val, 16);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:448: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(this->h.ip6_src, val.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:463: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(myaddr.s6_addr, this->h.ip6_src, 16);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:474: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(this->h.ip6_dst, val, 16);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:480: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(this->h.ip6_dst, val.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/IPv6Header.cc:496: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(myaddr.s6_addr, this->h.ip6_dst, 16);
data/nmap-7.91+dfsg1/libnetutil/PacketElement.h:155:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(totalbuff, ourbuff, length);
data/nmap-7.91+dfsg1/libnetutil/PacketElement.h:156:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(totalbuff+length, othersbuff, otherslen);
data/nmap-7.91+dfsg1/libnetutil/PacketElement.h:160:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
           memcpy(totalbuff, ourbuff, length);
data/nmap-7.91+dfsg1/libnetutil/PacketElement.h:175: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( dst, ourbuff, ourlength);
data/nmap-7.91+dfsg1/libnetutil/RawData.cc:153:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data, buf, len);
data/nmap-7.91+dfsg1/libnetutil/RawData.cc:162: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(this->data, buf, len);
data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc:111: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(&(this->h), buf, 4);
data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc:131:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(this->h), buf, this->length);
data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc:145:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(this->h), buf, ROUTING_TYPE_2_HEADER_LEN);
data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc:163:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(this->h), buf, this->length);
data/nmap-7.91+dfsg1/libnetutil/RoutingHeader.cc:307: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(this->curr_addr, val.s6_addr, 16);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:123: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(&(this->h), buf, stored_len);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:159: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 optinfo[256];
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:244: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(&tmpshort, q, 2);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:294:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&tmpword1, q + i, 4);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:295:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&tmpword2, q + i + 4, 4);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:309: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(&tmpword1, q, 4);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:310: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(&tmpword2, q + 4, 4);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:800: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(this->h.options, optsbuff, optslen);
data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.cc:106:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(i6src.s6_addr, v6hdr->getSourceAddress(), 16);
data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.cc:107:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(i6dst.s6_addr, v6hdr->getDestinationAddress(), 16);
data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.cc:116:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(i4src.s_addr), v4hdr->getSourceAddress(), 4);
data/nmap-7.91+dfsg1/libnetutil/TransportLayerElement.cc:117:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(i4dst.s_addr), v4hdr->getDestinationAddress(), 4);
data/nmap-7.91+dfsg1/libnetutil/UDPHeader.cc:115: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(&(this->h), buf, UDP_HEADER_LEN);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:154: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 errstr[NBASE_MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:173: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 errstr[NBASE_MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:220:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[32];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:360: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 portbuf[16];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:383: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(ss, result->ai_addr, *sslen);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:506:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(mac, Cache[i].mac, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:524: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(Cache[i].mac, mac, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:530: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(&Cache[i].ip, ss, sizeof(struct sockaddr_storage));
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:531: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(Cache[i].mac, mac, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:668: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(&sin6->sin6_addr, &ip6->ip6_src, IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:673: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(&sin6->sin6_addr, &ip6->ip6_dst, IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:968: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 etht_cache_device_name[64];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1121: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(&tmpshort, q, 2);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1171:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&tmpword1, q + i, 4);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1172:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&tmpword2, q + i + 4, 4);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1186: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(&tmpword1, q, 4);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1187: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(&tmpword2, q + 4, 4);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1249: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 canonical_ip_string[NI_MAXHOST];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1272: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(output, ai->ai_addr, ai->ai_addrlen);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1335: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(dcrn->ifaces[dcrn->numifaces].mac, &entry->intf_link_addr.addr_eth.data, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1499:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char netmask[IP6_ADDR_LEN];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1609: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 destbuf[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1610: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 gwbuf[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1727: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 dev[128];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1802: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 buffer[129];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1973:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[256];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2005: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 ipstring[32];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2207: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 protoinfo[1024] = "";     /* Stores final info string.         */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2208: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 ipinfo[512] = "";                /* Temp info about IP.               */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2209: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 icmpinfo[512] = "";              /* Temp info about ICMP.             */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2210: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 icmptype[128] = "";              /* Temp info about ICMP type & code  */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2211: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 icmpfields[256] = "";            /* Temp info for various ICMP fields */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2212: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 fragnfo[64] = "";                /* Temp info about fragmentation.    */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2213: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 srchost[INET6_ADDRSTRLEN] = "";  /* Src IP in dot-decimal notation.   */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2214: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 dsthost[INET6_ADDRSTRLEN] = "";  /* Dst IP in dot-decimal notation.   */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2320: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 tflags[10];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2321: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 tcpinfo[64] = "";
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2322: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[32];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2323: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 tcpoptinfo[256] = "";
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2622: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 auxbuff[128];    /* Aux buffer                                      */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2690:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Echo reply");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2759:15:  [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(icmptype, "Port unreachable");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2763:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Fragmentation required");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2768:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Source route failed");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2780:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Source host isolated");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2800:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Communication administratively prohibited by filtering");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2804:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Host precedence violation");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2808:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Precedence cutoff in effect");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2812:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(icmptype, "Destination unreachable (unknown code)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2820:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Source quench");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2826:11:  [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(icmptype, "Network redirect");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2828:11:  [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(icmptype, "Host redirect");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2830:11:  [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(icmptype, "Redirect (unknown code)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2838:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Echo request");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2845:11:  [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(icmptype, "Router advertisement (Mobile Agent Only)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2847:11:  [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(icmptype, "Router advertisement");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2857:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Router solicitation");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2863:11:  [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(icmptype, "TTL=0 during transit");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2865:11:  [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(icmptype, "TTL=0 during reassembly");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2867:11:  [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(icmptype, "TTL exceeded (unknown code)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2873:11:  [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(icmptype, "Parameter problem (pointer indicates error)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2875:11:  [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(icmptype, "Parameter problem (option missing)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2877:11:  [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(icmptype, "Parameter problem (bad length)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2879:11:  [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(icmptype, "Parameter problem (unknown code)");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2898:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Information request");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2904:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Information reply");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2920:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Traceroute");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2925:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Domain name request");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2930:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Domain name reply");
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2935:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Security failures"); /* rfc 2521 */
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2939:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(icmptype, "Unknown type"); break;
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2955:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(icmpinfo,"type=%d/code=%d", ping->type, ping->code);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3003: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(&sin->sin_addr.s_addr, data, IP_ADDR_LEN);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3006: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(sin6->sin6_addr.s6_addr, data, IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3061: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(RTA_DATA(*rtattr), addr, addrlen);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3092:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[512];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3184: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 namebuf[IFNAMSIZ];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3302: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 namebuf[32];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3303: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 errstr[256];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3504: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(eth_frame + 14, packet, packetlen);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3609: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(fpacket, packet, headerlen + mtu);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3624: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(fpacket + headerlen,
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3659: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(copy + sizeof(*eth_frame), packet, packetlen);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3727: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(CMSG_DATA(cm), data, len);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3906: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 dnetd[64];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3907: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 pcapd[128];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3912: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 dnetd[64];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3917: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 tmpdev[128];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3987: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 err0r[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:3989: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 pcapdev[128];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4070: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[3072];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4335: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(sendermac, p + offset + 8, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4337: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(&senderIP->s_addr, p + offset + 14, 4);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4389: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(sendermac, &na->icmpv6_mac, 6);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4395: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(&senderIP->sin6_addr.s6_addr, &na->icmpv6_target, 16);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4437: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 filterstr[256];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4447:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char ns_dst_mac[6] = {0x33, 0x33, 0xff};
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4453:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char multicast_prefix[13] = {0};
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4458: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(ns_dst_ip6.sin6_addr.s6_addr, multicast_prefix, sizeof(multicast_prefix));
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4557: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 filterstr[256];
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4671: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 host_spec[1024];
data/nmap-7.91+dfsg1/libnetutil/netutil.h:246: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 devname[16];
data/nmap-7.91+dfsg1/libnetutil/netutil.h:247: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 devfullname[16]; /* can include alias info, such as eth0:2. */
data/nmap-7.91+dfsg1/libnetutil/netutil.h:283: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 srcmac[6];
data/nmap-7.91+dfsg1/libnetutil/netutil.h:284: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 dstmac[6];
data/nmap-7.91+dfsg1/libnetutil/netutil.h:286: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 devname[16]; // Only needed if ethsd is NULL.
data/nmap-7.91+dfsg1/libssh2/os400/ccsid.c:62: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                    string[1];
data/nmap-7.91+dfsg1/libssh2/os400/ccsid.c:78:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAX_CHAR_SIZE];
data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c:95: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 *) dstaddr, (char *) srcaddr, srclen);
data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c:161:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, buf, len);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:181: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 buf[4];
data/nmap-7.91+dfsg1/libssh2/src/agent.c:289: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 mapname[23];
data/nmap-7.91+dfsg1/libssh2/src/agent.c:345:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(transctx->response, p + 4, transctx->response_len);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:485: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(*sig, s, *sig_len);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:584:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(identity->external.blob, s, identity->external.blob_len);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:616:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(identity->external.comment, s, comment_len);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:844:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(path_buf, path, path_len);
data/nmap-7.91+dfsg1/libssh2/src/bcrypt_pbkdf.c:127: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(countsalt, salt, saltlen);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:136:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] = {
data/nmap-7.91+dfsg1/libssh2/src/channel.c:177:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(session->open_channel->channel_type, channel_type,
data/nmap-7.91+dfsg1/libssh2/src/channel.c:321:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char channel_id[4];
data/nmap-7.91+dfsg1/libssh2/src/channel.c:464:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/channel.c:565:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(listener->host, host, session->fwdLstn_host_len);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:806:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/channel.c:934:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1133:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1178:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(s, auth_cookie, cookie_len);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1186:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char buffer[(LIBSSH2_X11_RANDOM_COOKIE_LEN / 2) + 1];
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1285:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1582:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(*exitsignal, channel->exit_signal, namelen);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1933:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&buf[bytes_read],
data/nmap-7.91+dfsg1/libssh2/src/channel.c:2245: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 packet[5];    /* packet_type(1) + channelno(4) */
data/nmap-7.91+dfsg1/libssh2/src/channel.c:2565: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 channel_id[4];
data/nmap-7.91+dfsg1/libssh2/src/crypt.c:259:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char block[8];
data/nmap-7.91+dfsg1/libssh2/src/hostkey.c:211: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/hostkey.c:430: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/hostkey.c:683:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char hash[SHA##digest_type##_DIGEST_LENGTH];           \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:301:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[50], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:329:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[64], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:578:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(session->session_id, exchange_state->h_sig_comp,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:992:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[50], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1020:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[64], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1271:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(session->session_id, exchange_state->h_sig_comp,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1509:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char p_value[128] = {
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1571:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char p_value[256] = {
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2079:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(session->server_hostkey, s, session->server_hostkey_len);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2099:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[50], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2127:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[64], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2308:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(session->session_id, exchange_state->h_sig_comp,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2648:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
curve25519_sha256(LIBSSH2_SESSION *session, unsigned char *data,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2650:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 public_key[LIBSSH2_ED25519_KEY_LEN],
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2651:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 private_key[LIBSSH2_ED25519_KEY_LEN],
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2704:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(session->server_hostkey, server_host_key,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2724:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[50], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2752:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint[64], *fprint = fingerprint;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:2917:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(session->session_id, exchange_state->h_sig_comp,
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3381:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, (*method)->name, mlen);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3400:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy((buf), (prefvar), (prefvarlen));                         \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4274: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, prefs, prefs_len + 1);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4283:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(s, p + 1, strlen(s) - method_len);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:169:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->name, host, hostlen + 1);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:203:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->key, key, keylen + 1);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:228:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->key_type_name, key_type_name, key_type_len);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:240:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->comment, comment, commentlen + 1);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:361:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hostbuff[270]; /* most host names can't be longer than like 256 */
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:421:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:639:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char hostbuf[256];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:649:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(hostbuf, name, namelen);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:679: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 saltbuf[32];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:680: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 hostbuf[256];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:698:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(saltbuf, salt, saltlen);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:715:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hostbuf, host, hostlen);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:958: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[2048];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:966:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(filename, FOPEN_READTEXT);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:1197:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[2048];
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:1207:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(filename, FOPEN_WRITETEXT);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:94: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:177:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, FOPEN_READTEXT);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:289:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, FOPEN_READTEXT);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:417: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(*signature, tmp, size);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:430: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 zhash[SHA_DIGEST_LENGTH + 1];
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:441: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(zhash + 1, hash, hash_len);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:477: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(sig + (20 - size), tmp, size);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:499: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(sig + 20 + (20 - size), tmp, size);
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.c:520: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 hash[SHA_DIGEST_LENGTH + 1];
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:81: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(out, gcry_md_read(ctx, 0), SHA_DIGEST_LENGTH), gcry_md_close(ctx)
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:92: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(out, gcry_md_read(ctx, 0), SHA256_DIGEST_LENGTH), gcry_md_close(ctx)
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:103: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(out, gcry_md_read(ctx, 0), SHA384_DIGEST_LENGTH), gcry_md_close(ctx)
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:114: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(out, gcry_md_read(ctx, 0), SHA512_DIGEST_LENGTH), gcry_md_close(ctx)
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:127: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(out, gcry_md_read(ctx, 0), MD5_DIGEST_LENGTH), gcry_md_close(ctx)
data/nmap-7.91+dfsg1/libssh2/src/libgcrypt.h:151: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(data, gcry_md_read(ctx, 0), \
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:254:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char h_sig_comp[MAX_SHA_DIGEST_LEN];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:282: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 request[256]; /* Must fit EC_MAX_POINT_LEN + data */
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:312: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 packet[17 + (sizeof(FwdNotReq) - 1)];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:330: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 packet[17 + (sizeof(X11FwdUnAvil) - 1)];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:393: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 setenv_local_channel[4];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:399: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 reqPTY_packet[41 + 256];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:401: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 reqPTY_local_channel[4];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:408: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 reqX11_local_channel[4];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:415: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 process_local_channel[4];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:425: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 adjust_adjust[9];     /* packet_type(1) + channel(4) +
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:435: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 write_packet[13];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:441: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 close_packet[5];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:507: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 buf[PACKETBUFSIZE];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:508: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 init[5];  /* first 5 bytes of the incoming data stream,
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:530: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 outbuf[MAX_SSH_PACKET_LEN]; /* area for the outgoing data */
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:562: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 listFetch_buffer[12];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:623: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 server_hostkey_md5[MD5_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:626: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 server_hostkey_sha1[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:629: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 server_hostkey_sha256[SHA256_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:672: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 banner_TxRx_banner[256];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:684: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 startup_service[sizeof("ssh-userauth") + 5 - 1];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:694: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 disconnect_data[256 + 13];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:786: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 pkeyInit_buffer[19];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:806: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 sftpInit_buffer[9];   /* sftp_header(5){excludes request_id}
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:815: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 scpRecv_response[LIBSSH2_SCP_RESPONSE_BUFLEN];
data/nmap-7.91+dfsg1/libssh2/src/libssh2_priv.h:837: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 scpSend_response[LIBSSH2_SCP_RESPONSE_BUFLEN];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:112: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 seqno_buf[4];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:157: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 seqno_buf[4];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:202: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 seqno_buf[4];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:242: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 temp[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:246:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, (char *) temp, 96 / 8);
data/nmap-7.91+dfsg1/libssh2/src/mac.c:275: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 seqno_buf[4];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:315: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 temp[MD5_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/mac.c:318:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, (char *) temp, 96 / 8);
data/nmap-7.91+dfsg1/libssh2/src/mac.c:348: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 seqno_buf[4];
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:161:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(block, output, olen);
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:432: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(filedata_nullterm, filedata, filedata_len);
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:464: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:545:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, "ssh-rsa", 7);
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:583:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(mth, "ssh-rsa", mthlen);
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:622: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/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:652: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/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:665: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(privatekeydata_nullterm, privatekeydata, privatekeydata_len);
data/nmap-7.91+dfsg1/libssh2/src/misc.c:78:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(copy, errmsg, len + 1);
data/nmap-7.91+dfsg1/libssh2/src/misc.c:243:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*buf, str, len);
data/nmap-7.91+dfsg1/libssh2/src/misc.c:338: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 ibuf[3];
data/nmap-7.91+dfsg1/libssh2/src/misc.c:339: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 obuf[4];
data/nmap-7.91+dfsg1/libssh2/src/misc.c:432:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1536];
data/nmap-7.91+dfsg1/libssh2/src/misc.c:801:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*outbuf, str, str_len);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:162: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:232: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 hash[SHA_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:343: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 hash[SHA##digest_type##_DIGEST_LENGTH];           \
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:420: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 buf[EVP_MAX_BLOCK_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:431:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(block, buf, blocksize);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:445: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 ctr[AES_BLOCK_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:500: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(c->ctr, iv, AES_BLOCK_SIZE);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:513: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 b1[AES_BLOCK_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:700:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, passphrase, passphrase_len);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:812:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, "ssh-rsa", 7);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:856: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(method_buf, "ssh-rsa", 7);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1070:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "r");
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1201:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, "ssh-dss", 7);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1247: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(method_buf, "ssh-dss", 7);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1372:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "r");
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1520:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*out_private_key, priv, LIBSSH2_ED25519_KEY_LEN);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1528:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*out_public_key, pub, LIBSSH2_ED25519_KEY_LEN);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1640:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(comment, buf, tmp_len);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1641:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(comment + tmp_len, "\0", 1);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1687:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(method_buf, "ssh-ed25519", 11);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1746:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "r");
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:1968: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(out_buffer, temp_buffer, out_buffer_len);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2263:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(method_buf, "ecdsa-sha2-nistp256", 19);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2265:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(method_buf, "ecdsa-sha2-nistp384", 19);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2267:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(method_buf, "ecdsa-sha2-nistp521", 19);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2451:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "r");
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2530: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 octal_value[EC_MAX_POINT_LEN];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2572:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*out_public_key_octal, octal_value, octal_len);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2710: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 out_shared_key[LIBSSH2_ED25519_KEY_LEN];
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:2825:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(privatekey, "r");
data/nmap-7.91+dfsg1/libssh2/src/packet.c:168:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(channel->channel_type, "forwarded-tcpip",
data/nmap-7.91+dfsg1/libssh2/src/packet.c:321:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(channel->channel_type, "x11",
data/nmap-7.91+dfsg1/libssh2/src/packet.c:841:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(channelp->exit_signal,
data/nmap-7.91+dfsg1/libssh2/src/packet.c:857:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 packet[5];
data/nmap-7.91+dfsg1/libssh2/src/packet.c:861:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(&packet[1], data + 1, 4);
data/nmap-7.91+dfsg1/libssh2/src/packet.c:1179: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 i, all_packets[255];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:87:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(line, filedata + off, len);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:113: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 line[LINE_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:114: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 iv[LINE_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:149:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(iv, line + strlen(method->pem_annotation) + 1,
data/nmap-7.91+dfsg1/libssh2/src/pem.c:182:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmp + b64datalen, line, linelen);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:210:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char secret[2*MD5_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:297: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 line[LINE_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:325:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmp + b64datalen, line, linelen);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:566:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key_part, key, keylen);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:567:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(iv_part, key + keylen, ivlen);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:629:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(out_buf->data, decrypted.data, decrypted.len);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:665: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 line[LINE_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:696:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmp + b64datalen, line, linelen);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:735: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 line[LINE_SIZE];
data/nmap-7.91+dfsg1/libssh2/src/pem.c:772:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmp + b64datalen, line, linelen);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:138: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 buffer[4];
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:384:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(s, "version", sizeof("version") - 1);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:619:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    comment = (unsigned char *) attrs[i].value;
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:646:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pkey->add_s, "add", sizeof("add") - 1);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:652:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(pkey->add_s, comment, comment_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:658:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pkey->add_s, name, name_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:662:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pkey->add_s, blob, blob_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:670:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pkey->add_s, name, name_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:674:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pkey->add_s, blob, blob_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:682:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(pkey->add_s, attrs[i].name, attrs[i].name_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:686:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(pkey->add_s, attrs[i].value, attrs[i].value_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:765:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pkey->remove_s, "remove", sizeof("remove") - 1);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:769:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pkey->remove_s, name, name_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:773:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pkey->remove_s, blob, blob_len);
data/nmap-7.91+dfsg1/libssh2/src/publickey.c:842:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pkey->listFetch_s, "list", sizeof("list") - 1);
data/nmap-7.91+dfsg1/libssh2/src/session.c:181: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(session->remote.banner, session->banner_TxRx_banner, banner_len);
data/nmap-7.91+dfsg1/libssh2/src/session.c:205: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 banner_dup[256];
data/nmap-7.91+dfsg1/libssh2/src/session.c:217:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(banner_dup, banner, banner_len - 2);
data/nmap-7.91+dfsg1/libssh2/src/session.c:221:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(banner_dup, banner, 255);
data/nmap-7.91+dfsg1/libssh2/src/session.c:441: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(session->local.banner, banner, banner_len);
data/nmap-7.91+dfsg1/libssh2/src/session.c:757:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(session->startup_service + 5, "ssh-userauth",
data/nmap-7.91+dfsg1/libssh2/src/session.c:1297:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(*errmsg, error, msglen);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1190:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static const unsigned char fopen_responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1295:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(fp->handle, data + 9, fp->handle_len);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1393:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer, &filep->data[ filep->data_len - filep->data_left],
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1566:35:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            static const unsigned char read_responses[2] = {
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1681:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(sliding_bufferp, data + 9, rc32);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1759:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char read_responses[2] = {
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1796:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(buffer, s, filename_len);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:1825:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(longentry, s, longentry_len);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:2358:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char fstat_responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:2960:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:3096:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:3452:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char stat_responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:3589:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char link_responses[2] =
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:3705:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(target, data + 13, link_len);
data/nmap-7.91+dfsg1/libssh2/src/sftp.h:62: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 packet[1]; /* data */
data/nmap-7.91+dfsg1/libssh2/src/sftp.h:92: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 handle[SFTP_HANDLE_MAXLEN];
data/nmap-7.91+dfsg1/libssh2/src/sftp.h:156: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 partial_size[4];      /* buffer for size field   */
data/nmap-7.91+dfsg1/libssh2/src/transport.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[256];  /* Must be enough for width*4 + about 30 or so */
data/nmap-7.91+dfsg1/libssh2/src/transport.c:151:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dest, source, blocksize);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:167: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 macbuf[MAX_MACSIZE];
data/nmap-7.91+dfsg1/libssh2/src/transport.c:281: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 block[MAX_BLOCKSIZE];
data/nmap-7.91+dfsg1/libssh2/src/transport.c:426:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(p->init, block, 5);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:431:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(block, &p->buf[p->readidx], blocksize);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:487:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(p->wptr, &block[5], blocksize - 5);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:570:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(p->wptr, &p->buf[p->readidx], numbytes);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:808:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&p->outbuf[5], data, data_len);
data/nmap-7.91+dfsg1/libssh2/src/transport.c:810:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&p->outbuf[5 + data_len], data2, data2_len);
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:66:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:216:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[4] =
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:506: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(pubkey, pubkeyfiledata, pubkeyfiledata_len);
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:581:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(pubkeyfile, FOPEN_READTEXT);
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:843:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char buf[5];
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1016:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static const unsigned char reply_codes[3] =
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1090: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 reply_codes[4] =
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1135:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(session->userauth_pblc_method, pubkeydata + 4,
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1294:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(s, session->userauth_pblc_packet,
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1638:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char reply_codes[4] = {
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1793:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(session->userauth_kybd_auth_name, s,
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1833:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(session->userauth_kybd_auth_instruction, s,
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1943:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(session->userauth_kybd_prompts[i].text, s,
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:507: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(data, m, datalen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:534: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(data, sig, datalen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:558:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, FOPEN_READTEXT);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:890: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(key + offset, edata, elen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:894:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset + mlen - nlen, ndata, nlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:896:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset, ndata + nlen - mlen, mlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:902:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + p1len - plen, pdata, plen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:904:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, pdata + plen - p1len, p1len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:908:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + p2len - qlen, qdata, qlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:910:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, qdata + qlen - p2len, p2len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:914:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + p1len - e1len, e1data, e1len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:916:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, e1data + e1len - p1len, p1len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:920:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + p2len - e2len, e2data, e2len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:922:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, e2data + e2len - p2len, p2len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:926:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + p1len - coefflen, coeffdata, coefflen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:928:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, coeffdata + coefflen - p1len, p1len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:932:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + mlen - dlen, ddata, dlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:934:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, ddata + dlen - mlen, mlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1120: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(data, hash, datalen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1213:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dsakey->q + 20 - qlen, qdata, qlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1215:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dsakey->q, qdata + qlen - 20, 20);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1218:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset + length - plen, pdata, plen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1220:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset, pdata + plen - length, length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1224:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset + length - glen, gdata, glen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1226:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset, gdata + glen - length, length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1230:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset + length - ylen, ydata, ylen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1232:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(key + offset, ydata + ylen - length, length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1238:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset + 20 - xlen, xdata, xlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1240:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(key + offset, xdata + xlen - 20, 20);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1410: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(data, hash, datalen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1422:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(sig_fixed, sig, siglen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1469: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(key + offset, bignum, length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1505:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(mth, "ssh-rsa", mthlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1534:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(mth, "ssh-dss", mthlen);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1732: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(key + sizeof(BCRYPT_KEY_DATA_BLOB_HEADER),
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1757:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pbIVCopy, iv, dwBlockLength);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1829:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(block, pbOutput, cbOutput);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1977: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(key + offset, p->bignum, p->length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1980: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(key + offset, m->bignum, m->length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:1996:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(bignum + offset, a->bignum, a->length);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:2086: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(bn->bignum, bin, len);
data/nmap-7.91+dfsg1/libssh2/src/wincng.c:2112:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(bin, bn->bignum, bn->length);
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:22: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   expanded_filename[NAM$C_MAXRSS + 1]; 
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:52: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    ipart[6][256], *i, *p;
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:110: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    gevonden_file[NAM$C_MAXRSS + 1];
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:174: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    gevonden[NAM$C_MAXRSS + 1];
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:203: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 subjectname[ NAM$C_MAXRSS + 1 ];
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:210: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).
man = fopen( filespec, "r");
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:419: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).
    hlp = fopen( hlpfilename,"a+");
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:421: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).
    hlp = fopen( hlpfilename,"w");
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:479:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                        base_level = atoi( argv[ i + 1 ] );
data/nmap-7.91+dfsg1/lpeg.c:666:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  assert(captype(open) == Cgroup);
data/nmap-7.91+dfsg1/lpeg.c:667:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  id = finddyncap(open, close);  /* get first dynamic capture argument */
data/nmap-7.91+dfsg1/lpeg.c:670:13:  [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).
  cs->cap = open; cs->valuecached = 0;  /* prepare capture state */
data/nmap-7.91+dfsg1/lpeg.c:685:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  return close - open;  /* number of captures of all kinds removed */
data/nmap-7.91+dfsg1/lpeg.c:2317: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(sib1(tree), sib, sibsize * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2561: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(sib1(tree), tree1, s1 * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2578: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(sib1(tree), tree1, s1 * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2579: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(sib2(tree), tree2, s2 * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2649: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(sib1(tree), tree1, size1 * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2664: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(sib1(tree), tree1, size1 * sizeof(TTree));
data/nmap-7.91+dfsg1/lpeg.c:2707: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(sib1(sib1(tree)), t2, s2 * sizeof(TTree));  /* ...t2 */
data/nmap-7.91+dfsg1/lpeg.c:2708: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(sib2(tree), t1, s1 * sizeof(TTree));  /* ... and t1 */
data/nmap-7.91+dfsg1/lpeg.c:2997: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(sib1(nd), rn, rulesize * sizeof(TTree));  /* copy rule */
data/nmap-7.91+dfsg1/lpeg.c:3394: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(newc, cap, captop * sizeof(Capture));
data/nmap-7.91+dfsg1/lpeg.c:3416: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(newstack, stack, n * sizeof(Stack));
data/nmap-7.91+dfsg1/main.cc: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 command[2048];
data/nmap-7.91+dfsg1/nbase/getaddrinfo.c:90: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 customerr[64];
data/nmap-7.91+dfsg1/nbase/getaddrinfo.c:157: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).
    portno = htons(atoi(service));
data/nmap-7.91+dfsg1/nbase/inet_ntop.c:155:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
data/nmap-7.91+dfsg1/nbase/inet_pton.c:117: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 tmp[INADDRSZ], *tp;
data/nmap-7.91+dfsg1/nbase/inet_pton.c:147: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(dst, tmp, INADDRSZ);
data/nmap-7.91+dfsg1/nbase/inet_pton.c:170: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 tmp[IN6ADDRSZ], *tp, *endp, *colonp;
data/nmap-7.91+dfsg1/nbase/inet_pton.c:244: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(dst, tmp, IN6ADDRSZ);
data/nmap-7.91+dfsg1/nbase/nbase.h:290:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define open _open
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:191: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.
static const char LogTable256[256] = {
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:638:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char addr_string[128];
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:692:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char addr_string[128];
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:738: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/nmap-7.91+dfsg1/nbase/nbase_misc.c:112: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];
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:171: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 str[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:268:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char padded[sizeof(int)];
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:642: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 asciify[257];          /* Stores character table           */
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:649: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 line2print[LINE_LEN];         /* Stores current line              */
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:650: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 printbyte[16];                /* For byte conversion              */
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:694: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(current_line, line2print, LINE_LEN);
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:760:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:769: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(path, buf, n);
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:780:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:793:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/nmap-7.91+dfsg1/nbase/nbase_rnd.c:157:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open("/dev/urandom", O_RDONLY)) != -1 ||
data/nmap-7.91+dfsg1/nbase/nbase_rnd.c:158:13:  [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).
      (fd = open("/dev/arandom", O_RDONLY)) != -1) {
data/nmap-7.91+dfsg1/nbase/nbase_str.c:73:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];
data/nmap-7.91+dfsg1/nbase/nbase_str.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(s, start, end - start);
data/nmap-7.91+dfsg1/nbase/nbase_winunix.c:109:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[BUFSIZ];
data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c:45:12:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    size = MultiByteToWideChar(CP_UTF8, 0, s, -1, NULL, 0);
data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c:51:11:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    ret = MultiByteToWideChar(CP_UTF8, 0, s, -1, result, size);
data/nmap-7.91+dfsg1/ncat/http.c:104: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(out, buf->p, i);
data/nmap-7.91+dfsg1/ncat/http.c:156:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(line + *n, buf->p, count);
data/nmap-7.91+dfsg1/ncat/http.c:188:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(out + n, buf->p, i);
data/nmap-7.91+dfsg1/ncat/http.c:192:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(out + n, buf->p, size - n);
data/nmap-7.91+dfsg1/ncat/http.c:911:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(header + n, line, count);
data/nmap-7.91+dfsg1/ncat/http.h:75:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[BUFSIZ];
data/nmap-7.91+dfsg1/ncat/http_digest.c:89:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char secret[SECRET_LENGTH];
data/nmap-7.91+dfsg1/ncat/http_digest.c:141: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 hashbuf[MD5_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/ncat/http_digest.c:142: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 hash_hex[MD5_DIGEST_LENGTH * 2 + 1];
data/nmap-7.91+dfsg1/ncat/http_digest.c:143: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 time_buf[32];
data/nmap-7.91+dfsg1/ncat/http_digest.c:166:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 void make_response(char buf[MD5_DIGEST_LENGTH * 2 + 1],
data/nmap-7.91+dfsg1/ncat/http_digest.c:171: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 HA1_hex[MD5_DIGEST_LENGTH * 2 + 1], HA2_hex[MD5_DIGEST_LENGTH * 2 + 1];
data/nmap-7.91+dfsg1/ncat/http_digest.c:172: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 hashbuf[MD5_DIGEST_LENGTH];
data/nmap-7.91+dfsg1/ncat/http_digest.c:261: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 response_hex[MD5_DIGEST_LENGTH * 2 + 1];
data/nmap-7.91+dfsg1/ncat/http_digest.c:262: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 cnonce[CNONCE_LENGTH];
data/nmap-7.91+dfsg1/ncat/http_digest.c:263: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 cnonce_buf[CNONCE_LENGTH * 2 + 1];
data/nmap-7.91+dfsg1/ncat/http_digest.c:264: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 nc_buf[8 + 1];
data/nmap-7.91+dfsg1/ncat/http_digest.c:324: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 response_hex[MD5_DIGEST_LENGTH * 2 + 1];
data/nmap-7.91+dfsg1/ncat/ncat.h:107:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char data[SOCKS_BUFF_SIZE]; // this has to be able to hold FQDN and username
data/nmap-7.91+dfsg1/ncat/ncat.h:113: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 methods[3];
data/nmap-7.91+dfsg1/ncat/ncat.h:118: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 data[SOCKS_BUFF_SIZE];
data/nmap-7.91+dfsg1/ncat/ncat.h:126: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[SOCKS_BUFF_SIZE]; // addr/name and port info
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:129:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char digest_buf[SHA1_STRING_LENGTH + 1];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:234:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char digest_buf[SHA1_STRING_LENGTH + 1];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:245:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buf[256];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:292: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[512];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:389: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 addrstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:548: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 socksbuf[8];
data/nmap-7.91+dfsg1/ncat/ncat_connect.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 socksbuf[8];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:655: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 addrstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:754:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(socks5auth.data + authlen, uptr, ulen);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:758:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(socks5auth.data + authlen, pptr, plen);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:816:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(socks5msg2.dst + dstlen, o.target, targetlen);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:834:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(socks5msg2.dst, addrbuf, addrlen);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:841: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(socks5msg2.dst + dstlen, &proxyport, 2);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:998:19:  [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 (mkstemp(tmp_name) == -1) {
data/nmap-7.91+dfsg1/ncat/ncat_core.c:170: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 portbuf[16];
data/nmap-7.91+dfsg1/ncat/ncat_core.c:198:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&new_item->addr.storage, next->ai_addr, next->ai_addrlen);
data/nmap-7.91+dfsg1/ncat/ncat_core.c:455: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 tbuf[3];
data/nmap-7.91+dfsg1/ncat/ncat_core.c:558: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 ip[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/ncat/ncat_core.c:559:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char port[16];
data/nmap-7.91+dfsg1/ncat/ncat_core.c:574:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char char_u32[11];
data/nmap-7.91+dfsg1/ncat/ncat_core.c:603:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char char_u32[11];
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:191:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pipe_name[32];
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:329:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char exepath[8192];
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:396: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 pipe_buffer[BUFSIZ];
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:420:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[BUFSIZ];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:213:12:  [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).
      rc = open("/dev/null", O_RDONLY);
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:535: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[DEFAULT_TCP_BUF_LEN];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:576: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[DEFAULT_TCP_BUF_LEN];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:630: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[DEFAULT_UDP_BUF_LEN] = { 0 };
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:672:11:  [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).
      i = open("/dev/null", O_RDONLY);
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:979:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[DEFAULT_TCP_BUF_LEN];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:1127: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[128];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:1159:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char repl[32];
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:1173:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(result + i, repl, repl_len);
data/nmap-7.91+dfsg1/ncat/ncat_main.c:196:18:  [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).
            fd = fopen(node->spec, "r");
data/nmap-7.91+dfsg1/ncat/ncat_main.c:377: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).
            o.srcrteptr = atoi(optarg);
data/nmap-7.91+dfsg1/ncat/ncat_main.c:385: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).
            o.conn_limit = atoi(optarg);
data/nmap-7.91+dfsg1/ncat/ncat_posix.c:126: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[DEFAULT_TCP_BUF_LEN];
data/nmap-7.91+dfsg1/ncat/ncat_proxy.c:466:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[DEFAULT_TCP_BUF_LEN];
data/nmap-7.91+dfsg1/ncat/ncat_proxy.c:579: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[BUFSIZ];
data/nmap-7.91+dfsg1/ncat/ncat_ssl.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.
        char digest_buf[SHA1_STRING_LENGTH + 1];
data/nmap-7.91+dfsg1/ncat/ncat_ssl.c:456: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 dNSName[128];
data/nmap-7.91+dfsg1/ncat/ncat_ssl.c:571: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 binbuf[SHA1_BYTES];
data/nmap-7.91+dfsg1/ncat/ncat_win.c:90:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/nmap-7.91+dfsg1/ncat/sys_wrap.c:120:11:  [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).
    ret = open(pathname, flags, mode);
data/nmap-7.91+dfsg1/ncat/test/addrset.c:55: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 line[1024];
data/nmap-7.91+dfsg1/ncat/test/test-cmdline-split.c:73:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        const char *args[10];
data/nmap-7.91+dfsg1/ncat/test/test-wildcard.c:208:10:  [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).
    fd = mkstemp(name);
data/nmap-7.91+dfsg1/ncat/util.c:222:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(*buf + *offset, s, n);
data/nmap-7.91+dfsg1/ncat/util.c:270: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 hostname[128];
data/nmap-7.91+dfsg1/ncat/util.c:302:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&addr_su, addr->ai_addr, addr->ai_addrlen);
data/nmap-7.91+dfsg1/ncat/util.c:325: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[INET6_ADDRSTRLEN + 1];
data/nmap-7.91+dfsg1/ncat/util.c:529:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(p, &routes[x], sizeof(routes[x]));
data/nmap-7.91+dfsg1/ncat/util.c:533:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, &dstaddr, sizeof(dstaddr));
data/nmap-7.91+dfsg1/ncat/util.c:711:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(*dst + j, "\r\n", 2);
data/nmap-7.91+dfsg1/ncat/util.c:714:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(*dst + j, src + i, 1);
data/nmap-7.91+dfsg1/nmap.cc:509: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 errstr[256];
data/nmap-7.91+dfsg1/nmap.cc:651:15:  [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).
          l = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:683:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          o.setMaxHostGroupSz(atoi(optarg));
data/nmap-7.91+dfsg1/nmap.cc:685:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          o.setMinHostGroupSz(atoi(optarg));
data/nmap-7.91+dfsg1/nmap.cc:686:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          if (atoi(optarg) > 100)
data/nmap-7.91+dfsg1/nmap.cc:705:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          o.min_parallelism = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:720:19:  [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).
          o.ttl = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:743:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          o.version_intensity = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:769:45:  [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).
          delayed_options.pre_max_retries = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:808:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(o.extra_payload, tempbuff, len);
data/nmap-7.91+dfsg1/nmap.cc:876: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.
          char buf[MAXPATHLEN];
data/nmap-7.91+dfsg1/nmap.cc:897:25:  [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).
            o.inputfd = fopen(optarg, "r");
data/nmap-7.91+dfsg1/nmap.cc:927: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).
          o.fragscan = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:1015:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int i = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:1042: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).
      o.magic_port = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:1067:21:  [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).
        o.inputfd = fopen(optarg, "r");
data/nmap-7.91+dfsg1/nmap.cc:1074:45:  [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).
      delayed_options.pre_max_parallelism = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:1108: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.
          char buf[4];
data/nmap-7.91+dfsg1/nmap.cc:1120: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.
          char buf[4];
data/nmap-7.91+dfsg1/nmap.cc:1361:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int i = atoi(optarg);
data/nmap-7.91+dfsg1/nmap.cc:1364:27:  [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).
          o.nmap_stdout = fopen(DEVNULL, "w");
data/nmap-7.91+dfsg1/nmap.cc:1384: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 tbuf[128];
data/nmap-7.91+dfsg1/nmap.cc:1469: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[256]; // 256 > 5*40
data/nmap-7.91+dfsg1/nmap.cc:1581: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 tmphex[3];
data/nmap-7.91+dfsg1/nmap.cc:1679: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).
    o.excludefd = fopen(delayed_options.exclude_file, "r");
data/nmap-7.91+dfsg1/nmap.cc:1703:15:  [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).
          i = atoi(&p[4]);
data/nmap-7.91+dfsg1/nmap.cc:1773: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 mytime[128];
data/nmap-7.91+dfsg1/nmap.cc:1783: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 myname[FQDN_LEN + 1];
data/nmap-7.91+dfsg1/nmap.cc:1787:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[FQDN_LEN + 1] = "";
data/nmap-7.91+dfsg1/nmap.cc:1876:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&ftp.server, target->h_addr_list[0], 4);
data/nmap-7.91+dfsg1/nmap.cc:2316: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 nmap_arg_buffer[4096]; /* roughly aligned with arg_parse limit */
data/nmap-7.91+dfsg1/nmap.cc:2377: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(nmap_arg_buffer + 21, p, q - p);
data/nmap-7.91+dfsg1/nmap.cc:2386: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(nmap_arg_buffer, unescaped, strlen(unescaped) + 1);
data/nmap-7.91+dfsg1/nmap.cc:2560: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 appdata[MAX_PATH];
data/nmap-7.91+dfsg1/nmap.cc:2607: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 dot_buffer[512];
data/nmap-7.91+dfsg1/nmap_dns.cc:401: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(&now, nsock_gettimeofday(), sizeof(struct timeval));
data/nmap-7.91+dfsg1/nmap_dns.cc:490: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(&now, nsock_gettimeofday(), sizeof(struct timeval));
data/nmap-7.91+dfsg1/nmap_dns.cc:492: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(&req->timeout, &timeout, sizeof(struct timeval));
data/nmap-7.91+dfsg1/nmap_dns.cc:511: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(&now, nsock_gettimeofday(), sizeof(struct timeval));
data/nmap-7.91+dfsg1/nmap_dns.cc:628: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(&tpreq->timeout, nsock_gettimeofday(), sizeof(struct timeval));
data/nmap-7.91+dfsg1/nmap_dns.cc:729:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char ipstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nmap_dns.cc:749:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              char ipstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nmap_dns.cc:770:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char ipstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nmap_dns.cc:816: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(&tpserv.addr, &addr, sizeof(addr));
data/nmap-7.91+dfsg1/nmap_dns.cc:863: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 pcap_name[1024];
data/nmap-7.91+dfsg1/nmap_dns.cc:883: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 keybasebuf[2048];
data/nmap-7.91+dfsg1/nmap_dns.cc:884: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[2048], keyname[2048], *p;
data/nmap-7.91+dfsg1/nmap_dns.cc:947: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[2048], *tp;
data/nmap-7.91+dfsg1/nmap_dns.cc:948: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 fmt[32];
data/nmap-7.91+dfsg1/nmap_dns.cc:949: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 ipaddr[INET6_ADDRSTRLEN+1];
data/nmap-7.91+dfsg1/nmap_dns.cc:951: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("/etc/resolv.conf", "r");
data/nmap-7.91+dfsg1/nmap_dns.cc:979: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[2048], hname[256], ipaddrstr[INET6_ADDRSTRLEN+1], *tp;
data/nmap-7.91+dfsg1/nmap_dns.cc:982: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(fname, "r");
data/nmap-7.91+dfsg1/nmap_dns.cc:1015: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 windows_dir[1024];
data/nmap-7.91+dfsg1/nmap_dns.cc:1016: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 tpbuf[2048];
data/nmap-7.91+dfsg1/nmap_dns.cc:1076: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 spmobuf[1024];
data/nmap-7.91+dfsg1/nmap_dns.cc:1172: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 hostname[FQDN_LEN + 1] = "";
data/nmap-7.91+dfsg1/nmap_dns.cc:1206:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[FQDN_LEN + 1] = "";
data/nmap-7.91+dfsg1/nmap_dns.cc:1207: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 spmobuf[1024];
data/nmap-7.91+dfsg1/nmap_dns.cc:1304: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 ipv4_c[INET_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nmap_dns.cc:1330:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char tmp[3];
data/nmap-7.91+dfsg1/nmap_dns.cc:1331:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(tmp, "%02x", ipv6[i]);
data/nmap-7.91+dfsg1/nmap_dns.cc:1493: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(buf+offset+ret, accumulator.c_str(), length);
data/nmap-7.91+dfsg1/nmap_error.cc:90:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[1024];
data/nmap-7.91+dfsg1/nmap_error.cc:91:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buf, "your system is too old for strerror of errno %d\n", errnum);
data/nmap-7.91+dfsg1/nmap_error.cc:119:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errbuf[1024];
data/nmap-7.91+dfsg1/nmap_error.cc:159:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errbuf[1024], *strerror_s;
data/nmap-7.91+dfsg1/nmap_ftp.cc:107:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ftp->port = atoi(s);
data/nmap-7.91+dfsg1/nmap_ftp.cc:121: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 recvbuf[2048];
data/nmap-7.91+dfsg1/nmap_ftp.cc:122: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 command[512];
data/nmap-7.91+dfsg1/nmap_ftp.cc:212: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 recvbuf[2048];
data/nmap-7.91+dfsg1/nmap_ftp.cc:213: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 targetstr[20];
data/nmap-7.91+dfsg1/nmap_ftp.cc:214: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 command[512];
data/nmap-7.91+dfsg1/nmap_ftp.h:78: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 user[64];
data/nmap-7.91+dfsg1/nmap_ftp.h:79: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 pass[256]; /* methinks you're paranoid if you need this much space */
data/nmap-7.91+dfsg1/nmap_ftp.h:80: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 server_name[FQDN_LEN + 1];
data/nmap-7.91+dfsg1/nmap_tty.cc:227:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((tty_fd = open("/dev/tty", O_RDONLY | O_NONBLOCK)) < 0) return;
data/nmap-7.91+dfsg1/nping/ArgParser.cc:103: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 errstr[256];
data/nmap-7.91+dfsg1/nping/ArgParser.cc:408:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                 char wrongopt[4];
data/nmap-7.91+dfsg1/nping/ArgParser.cc:409:18:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                 memcpy(wrongopt, (optarg+f), 3);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:784:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buff, tempbuff, len);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:822:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(auxbuff, optarg, plen);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1261: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 first[256];
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1262: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 last[256];
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1289: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(first, str, aux-str);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1290: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(last, aux+1, len-(aux-str) );
data/nmap-7.91+dfsg1/nping/Crypto.cc:116:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst_buff, result, 256/8);
data/nmap-7.91+dfsg1/nping/Crypto.cc:276:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hash, next, SHA256_HASH_LEN);
data/nmap-7.91+dfsg1/nping/EchoClient.cc:828:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->lasthdr+this->readbytes, recvbuff, recvbytes);
data/nmap-7.91+dfsg1/nping/EchoClient.cc:839:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->lasthdr, recvbuff, recvbytes);
data/nmap-7.91+dfsg1/nping/EchoClient.cc:847: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(this->lasthdr+this->readbytes, recvbuff, plen-this->readbytes);
data/nmap-7.91+dfsg1/nping/EchoClient.cc:917:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->lasthdr, recvbuff, recvbytes);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:119: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(&(this->h), buf, len);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:349: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(mac_backup, aux, MAC_LENGTH);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:362: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(aux, mac_backup, MAC_LENGTH);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:375:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsserv->server_nonce, nonce, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:379:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsclnt->server_nonce, nonce, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:411:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsclnt->client_nonce, nonce, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:415:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsfinal->client_nonce , nonce, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:447:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsclnt->partner_ip , &val, sizeof(struct in_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:452:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsfinal->partner_ip , &val, sizeof(struct in_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:468:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsclnt->partner_ip , &val, sizeof(struct in6_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:473:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(this->data_hsfinal->partner_ip , &val, sizeof(struct in6_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:488:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, this->data_hsclnt->partner_ip,sizeof(struct in_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:492:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, this->data_hsfinal->partner_ip,sizeof(struct in_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:506:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, this->data_hsclnt->partner_ip,sizeof(struct in6_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:510:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, this->data_hsfinal->partner_ip,sizeof(struct in6_addr));
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:694:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(this->fs_off+2, val, flen);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:701:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(this->fs_off+1, val, flen);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:734:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(dst_buff, this->fs_off+2, nlen);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:743:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(dst_buff, this->fs_off+1, nlen);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:787: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(this->data_echo->payload_and_mac, pkt, pktlen);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:939:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(start, &this->h_tmp, len);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:962: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(lastblock, start+len-CIPHER_BLOCK_SIZE, CIPHER_BLOCK_SIZE);
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:966:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(start, &this->h_tmp, len);
data/nmap-7.91+dfsg1/nping/EchoServer.cc:1345:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new_pkt, pkt, offset);
data/nmap-7.91+dfsg1/nping/EchoServer.cc:1349:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new_pkt, pkt, MIN(pktlen, PAYLOAD_ECHO_BYTES_IN_DOUBT));
data/nmap-7.91+dfsg1/nping/EchoServer.cc:1375: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 pcapdev[128];               /**< Device name passed to pcap_open_live */
data/nmap-7.91+dfsg1/nping/NEPContext.cc:152: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(this->next_iv_enc, block, CIPHER_BLOCK_SIZE);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:174: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(this->next_iv_dec, block, CIPHER_BLOCK_SIZE);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:252: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 key_type_id[128+1];
data/nmap-7.91+dfsg1/nping/NEPContext.cc:258: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(data, passphrase, plen);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:262:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(data+len, this->getServerNonce(), NONCE_LEN );
data/nmap-7.91+dfsg1/nping/NEPContext.cc:268: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(data+len, this->getClientNonce(), NONCE_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:295: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(data+len, key_type_id, strlen(key_type_id));
data/nmap-7.91+dfsg1/nping/NEPContext.cc:307: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(this->nep_key_mac_c2s, key, MAC_KEY_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:342: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(this->nep_key_mac_s2c, key, MAC_KEY_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:387: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(this->nep_key_ciphertext_c2s, key, CIPHER_KEY_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:422: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(this->nep_key_ciphertext_s2c, key, CIPHER_KEY_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:474: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(this->client_nonce, buff, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:487: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(this->server_nonce, buff, NONCE_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:513: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(t.value, value, t.len);
data/nmap-7.91+dfsg1/nping/NpingOps.cc:375: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 buff[24];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:379:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "TCP-Connect");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:383:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "TCP");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:387:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "UDP");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:391:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "UDP-Unprivileged");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:395:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "ICMP");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:399:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "ARP");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:403:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buff, "Unknown mode");
data/nmap-7.91+dfsg1/nping/NpingOps.cc:1343: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(this->ipv6_src_address.s6_addr, val, 16);
data/nmap-7.91+dfsg1/nping/NpingOps.cc:1920: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(this->src_mac, val, 6);
data/nmap-7.91+dfsg1/nping/NpingOps.cc:1941: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(this->dst_mac, val, 6);
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2091: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(this->arp_sha, val, 6); /* MAC Address (6 bytes) */
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2112: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(this->arp_tha, val, 6); /* MAC Address (6 bytes) */
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2339: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 devbuff[32];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2345: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 hostname[128];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2367:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char errbuf[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2644: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 auxbuff[256];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2756:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errbuf[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2796:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( &devaddr4, curraddr->addr, sizeof(struct sockaddr_in));
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2799:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( &devaddr6, curraddr->addr, sizeof(struct sockaddr_in6));
data/nmap-7.91+dfsg1/nping/NpingOps.h:150:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char device[MAX_DEV_LEN]; /* Network interface                     */
data/nmap-7.91+dfsg1/nping/NpingOps.h:283: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 echo_passphrase[1024]; /* User passphrase                     */
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:181: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(ss, &targetsock, targetsocklen);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:194: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(&targetsock, ss, ss_len);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:256:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ss, &sourcesock, sourcesocklen);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:268: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(&sourcesock, ss, ss_len);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:279: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(&spoofedsrcsock, ss, ss_len);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:292: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(ss, &spoofedsrcsock, spoofedsrcsocklen);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:402: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(next_hop, &nexthopsock, nexthopsocklen);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:413: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(&nexthopsock, next_hop, next_hop_len);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:423: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(NextHopMACaddress, addy, 6);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:441: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(MACaddress, addy, 6);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:460: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(SrcMACaddress, addy, 6);
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:594: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 buffer[256];
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:618: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 buffer[256];
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:638: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 buffer[256];
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:657: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 buffer[256];
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:659:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x", (u8)mac[0],(u8)mac[1],
data/nmap-7.91+dfsg1/nping/NpingTarget.cc:821:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(MACaddress, NextHopMACaddress, 6);
data/nmap-7.91+dfsg1/nping/NpingTarget.h:80: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 devname[32];       /**< Net interface normal name                   */
data/nmap-7.91+dfsg1/nping/NpingTarget.h:81: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 devfullname[32];   /**< Net interface full name                     */
data/nmap-7.91+dfsg1/nping/NpingTarget.h:105:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char targetipstring[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nping/NpingTargets.cc:164: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( t, &next, sizeof( struct sockaddr_storage ) );
data/nmap-7.91+dfsg1/nping/NpingTargets.cc:182: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 buff[257];
data/nmap-7.91+dfsg1/nping/NpingTargets.cc: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 buff[MAX_NPING_HOSTNAME_LEN+1];
data/nmap-7.91+dfsg1/nping/NpingTargets.h:78:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *specs[1024];
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:162: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 pcapdev[128];               /**< Device name passed to pcap_open_live */
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1251: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 ipstring[128];
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1252: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 filterstring[1024];
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1289:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(filterstring, "ip and ( not (tcp and (dst port %d or src port %d) ) )", o.getEchoPort(), o.getEchoPort() );
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1296: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( &srcss, o.getSourceSockAddr(), sizeof(struct sockaddr_storage) );
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1334:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ipstring,"127.0.0.1");
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1565: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 final_output[65535];
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1839: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 ipstring[128];              /**< To print IP Addresses.                */
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:2074: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 ipstring[128];              /**< To print IP Addresses.                */
data/nmap-7.91+dfsg1/nping/common_modified.cc:272: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(sin6->sin6_addr.s6_addr, ip6.sin6_addr.s6_addr, 16);
data/nmap-7.91+dfsg1/nping/common_modified.cc:342: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 *addy[5];
data/nmap-7.91+dfsg1/nping/common_modified.cc:411:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&(startaddr), target->h_addr_list[0], sizeof(struct in_addr));
data/nmap-7.91+dfsg1/nping/common_modified.cc:468: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).
            else end = atoi(addy[i]+ 1);
data/nmap-7.91+dfsg1/nping/common_modified.cc:471: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).
            start = end = atoi(addy[i]);
data/nmap-7.91+dfsg1/nping/common_modified.cc:472:61:  [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 ((r = strchr(addy[i],'-')) && *(r+1) ) end = atoi(r + 1);
data/nmap-7.91+dfsg1/nping/common_modified.cc:515:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&ip6, sin6, sizeof(struct sockaddr_in6));
data/nmap-7.91+dfsg1/nping/common_modified.cc:766:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(addr, s, sizeof(struct sockaddr_storage));
data/nmap-7.91+dfsg1/nping/nping.cc:102: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 tbuf[128];   /* Stores current time as a string */
data/nmap-7.91+dfsg1/nping/output.cc:83: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 errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/output.cc:120: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 errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/output.cc:162: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 errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/output.cc:204: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 errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/output.cc:220:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/output.cc:236: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 errstr[MAX_ERR_STR_LEN];
data/nmap-7.91+dfsg1/nping/utils.cc:142: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 auxbuff[1024];
data/nmap-7.91+dfsg1/nping/utils.cc:197:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char twobytes[3];
data/nmap-7.91+dfsg1/nping/utils.cc:290: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 asciify[257];          /* Stores character table           */
data/nmap-7.91+dfsg1/nping/utils.cc:296: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 line2print[LINE_LEN];         /* Stores current line              */
data/nmap-7.91+dfsg1/nping/utils.cc: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 printbyte[16];                /* For byte conversion              */
data/nmap-7.91+dfsg1/nping/utils.cc:317:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(printbyte,"%02x", current_char);    
data/nmap-7.91+dfsg1/nping/utils_net.cc:99: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 buffer[24];
data/nmap-7.91+dfsg1/nping/utils_net.cc:122: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 ipstring[256];
data/nmap-7.91+dfsg1/nping/utils_net.cc:161: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 ipstring[256];
data/nmap-7.91+dfsg1/nping/utils_net.cc:171: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 ipstring[256];
data/nmap-7.91+dfsg1/nping/utils_net.cc:181: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 ipstring[256];
data/nmap-7.91+dfsg1/nping/utils_net.cc:184: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(s6.s6_addr, ipv6addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:514:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[MAX_CACHED_HOSTNAME_LEN];
data/nmap-7.91+dfsg1/nping/utils_net.cc:542: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(ss, &(archive[i].ss) , *sslen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:563: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(&(archive[current_index].ss), ss, *sslen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:610:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[MAX_CACHED_HOSTNAME_LEN];
data/nmap-7.91+dfsg1/nping/utils_net.cc:766: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 tmphex[3];
data/nmap-7.91+dfsg1/nping/utils_net.cc:801: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(targetbuff, mac_data, 6);
data/nmap-7.91+dfsg1/nping/utils_net.cc:808: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 macinfo[24];
data/nmap-7.91+dfsg1/nping/utils_net.cc:810:3:  [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(macinfo,"%02X:%02X:%02X:%02X:%02X:%02X",
data/nmap-7.91+dfsg1/nping/utils_net.cc:824: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 protoinfo[512];
data/nmap-7.91+dfsg1/nping/utils_net.cc:891: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 protoinfo[1024] = "";     /* Stores final info string.         */
data/nmap-7.91+dfsg1/nping/utils_net.cc:892: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 tflags[10];
data/nmap-7.91+dfsg1/nping/utils_net.cc:893: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 tcpinfo[64] = "";
data/nmap-7.91+dfsg1/nping/utils_net.cc:894: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[32];
data/nmap-7.91+dfsg1/nping/utils_net.cc:895: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 tcpoptinfo[256] = "";
data/nmap-7.91+dfsg1/nping/utils_net.cc:900: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 srcipstring[128];
data/nmap-7.91+dfsg1/nping/utils_net.cc:901: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 dstipstring[128];
data/nmap-7.91+dfsg1/nping/utils_net.cc:922:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(dstipstring, "unknown_addr_family");
data/nmap-7.91+dfsg1/nping/utils_net.cc:925:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(srcipstring, "this_host");
data/nmap-7.91+dfsg1/nping/utils_net.cc:936:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(dstipstring, "unknown_addr_family");
data/nmap-7.91+dfsg1/nping/utils_net.cc:939:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(dstipstring, "unknown_host");
data/nmap-7.91+dfsg1/nping/utils_net.cc:1010: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 protoinfo[1024] = "";     /* Stores final info string.         */
data/nmap-7.91+dfsg1/nping/utils_net.cc:1015: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 srcipstring[128];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1016: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 dstipstring[128];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1037:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(dstipstring, "unknown_addr_family");
data/nmap-7.91+dfsg1/nping/utils_net.cc:1040:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(srcipstring, "this_host");
data/nmap-7.91+dfsg1/nping/utils_net.cc:1051:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(dstipstring, "unknown_addr_family");
data/nmap-7.91+dfsg1/nping/utils_net.cc:1054:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(dstipstring, "unknown_host");
data/nmap-7.91+dfsg1/nping/utils_net.cc:1086: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 buffer[512+1];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1087: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.
  const char letters[26]={'a','b','c','d','e','f','g','h','i','j','k',
data/nmap-7.91+dfsg1/nping/utils_net.cc:1217: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_ip4->sin_addr.s_addr), pkt+12, 4);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1223: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_ip6->sin6_addr.s6_addr, pkt+8, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1476: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[2048];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1477: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 twobytes[3];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1486: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( (if6file=fopen(PATH_PROC_IFINET6, "r"))==NULL )
data/nmap-7.91+dfsg1/nping/utils_net.cc:1580: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 devname[DEVNAMELEN];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1593: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( ifbuf[parsed_ifs].devname, devname, DEVNAMELEN);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1596: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(s6->sin6_addr.s6_addr, ipv6addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1597: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(ifbuf[parsed_ifs].addr, ipv6addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1670: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[2048];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1671: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 twobytes[3];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1680: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( (route6file=fopen(PATH_PROC_IPV6ROUTE, "r"))==NULL )
data/nmap-7.91+dfsg1/nping/utils_net.cc:1799: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 devname[DEVNAMELEN];
data/nmap-7.91+dfsg1/nping/utils_net.cc:1811: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(rtbuf[parsed_routes].dst_net.s6_addr, dst_addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1813: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(rtbuf[parsed_routes].src_net.s6_addr, src_addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1815: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(rtbuf[parsed_routes].next_hop.s6_addr, nh_addr, 16);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1833: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(&rtbuf[parsed_routes].metric, metric, 4);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1835: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(&rtbuf[parsed_routes].ref_count, ref_count, 4);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1837: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(&rtbuf[parsed_routes].use_count, use_count, 4);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1839: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(&rtbuf[parsed_routes].flags, flags, 4);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1841: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(rtbuf[parsed_routes].devname, devname, DEVNAMELEN);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1918:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&theone, &routes6[i], sizeof(route6_t));
data/nmap-7.91+dfsg1/nping/utils_net.cc:1939:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&theone, def_gw, sizeof(route6_t));
data/nmap-7.91+dfsg1/nping/utils_net.h: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 devname[DEVNAMELEN];            /* Interface name                    */
data/nmap-7.91+dfsg1/nping/utils_net.h:151: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 devname[DEVNAMELEN];            /* Device name                       */
data/nmap-7.91+dfsg1/nping/winfix.cc:90: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 pcaplist[4096];
data/nmap-7.91+dfsg1/nping/winfix.cc:114: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 startsvc[32];
data/nmap-7.91+dfsg1/nping/winfix.cc:176: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 nmapdir[MAX_PATH];
data/nmap-7.91+dfsg1/nping/winfix.cc:197: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 sysdir_name[512];
data/nmap-7.91+dfsg1/nping/winfix.cc:208:3:  [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(sysdir_name, "\\Npcap");
data/nmap-7.91+dfsg1/nse_dnet.cc: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 ipstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nse_dnet.cc:218:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char dev[16];
data/nmap-7.91+dfsg1/nse_fs.cc:65: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 pattern[MAX_PATH+1];
data/nmap-7.91+dfsg1/nse_libssh2.cc:239:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char data[4096];
data/nmap-7.91+dfsg1/nse_libssh2.cc:421:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char byte[3]; /* with space for NULL */
data/nmap-7.91+dfsg1/nse_libssh2.cc:534:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(publickeyfile, "r");
data/nmap-7.91+dfsg1/nse_libssh2.cc:676: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[2048];
data/nmap-7.91+dfsg1/nse_libssh2.cc:704: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[2048];
data/nmap-7.91+dfsg1/nse_main.cc:273:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[MAXPATHLEN];
data/nmap-7.91+dfsg1/nse_main.cc:576: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 path[MAXPATHLEN];
data/nmap-7.91+dfsg1/nse_nmaplib.cc:728: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[FILENAME_MAX];
data/nmap-7.91+dfsg1/nse_nmaplib.cc:837: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(&ss, addr->ai_addr, addr->ai_addrlen);
data/nmap-7.91+dfsg1/nse_nmaplib.cc:875: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 errstr[256];
data/nmap-7.91+dfsg1/nse_nmaplib.cc:877: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 ipstr[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nse_nmaplib.cc:904:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          lua_pushlstring(L, (const char *) iflist[i].mac, 6);
data/nmap-7.91+dfsg1/nse_nsock.cc:306: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 ipstring_local[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nse_nsock.cc:307: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 ipstring_remote[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/nse_nsock.cc:403:72:  [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).
static nse_nsock_udata *check_nsock_udata (lua_State *L, int idx, bool open)
data/nmap-7.91+dfsg1/nse_nsock.cc:407:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (open && nu->nsiod == NULL) {
data/nmap-7.91+dfsg1/nse_nsock.cc:881: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(&nu->source_addr, results->ai_addr, nu->source_addrlen);
data/nmap-7.91+dfsg1/nse_nsock.cc:981: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 pcapdev[4096];
data/nmap-7.91+dfsg1/nse_openssl.cc:281:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[16];
data/nmap-7.91+dfsg1/nse_openssl.cc:291:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[16];
data/nmap-7.91+dfsg1/nse_openssl.cc:301:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[20];
data/nmap-7.91+dfsg1/nse_openssl.cc:311:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[20];
data/nmap-7.91+dfsg1/nse_openssl.cc:323:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[EVP_MAX_MD_SIZE];
data/nmap-7.91+dfsg1/nse_openssl.cc:358:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char digest[EVP_MAX_MD_SIZE];
data/nmap-7.91+dfsg1/nse_pcrelib.cc:40:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[256];
data/nmap-7.91+dfsg1/nse_pcrelib.cc:84:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char old_locale[256];
data/nmap-7.91+dfsg1/nse_pcrelib.cc:104:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[256];
data/nmap-7.91+dfsg1/nse_ssl_cert.cc:122:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[256];
data/nmap-7.91+dfsg1/nse_ssl_cert.cc:167: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(lua_touserdata(L, -1), lua_touserdata(L, -2), lua_rawlen(L, -2));
data/nmap-7.91+dfsg1/nse_ssl_cert.cc:233: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 objname[256];
data/nmap-7.91+dfsg1/nse_ssl_cert.cc:269: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[32];
data/nmap-7.91+dfsg1/nse_ssl_cert.cc:279:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, s, len);
data/nmap-7.91+dfsg1/nse_zlib.cc:84: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 o_buffer[LZ_BUFFER_SIZE];
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.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 buffer[1024];
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:199: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[1024];
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:275: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).
	count             = atoi(argv[3]);
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:276: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).
	logging           = atoi(argv[4]);
data/nmap-7.91+dfsg1/nsock/src/engine_iocp.c:781:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, eov->wsabuf.buf, dwRes);
data/nmap-7.91+dfsg1/nsock/src/filespace.c:103: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(tmpstr, fs->str, fs->current_size);
data/nmap-7.91+dfsg1/nsock/src/filespace.c:112: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(fs->str + fs->current_size, str, len);
data/nmap-7.91+dfsg1/nsock/src/netutils.c:160: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 buffer[PEER_STR_LEN];
data/nmap-7.91+dfsg1/nsock/src/nsock_connect.c:209: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(&iod->px_ctx->target_ss, ss, sslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_connect.c:261: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(&iod->peer, ss, sslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_connect.c:610: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(remote, &(nsi->peer), MIN((unsigned)socklen, nsi->peerlen));
data/nmap-7.91+dfsg1/nsock/src/nsock_connect.c:626:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(local, &ss, MIN((unsigned)slen, socklen));
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:604: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[READ_BUFFER_SZ];
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:651:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&iod->peer, &peer, peerlen);
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:1347: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 displaystr[256];
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:1348: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 errstr[256];
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:1378:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(displaystr, ": ", 2);
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:1379:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(displaystr + 2, str, strlength);
data/nmap-7.91+dfsg1/nsock/src/nsock_iod.c:395: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(&nsi->local, ss, sslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_iod.c:412: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(nsi->ipopts, opts, optslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_pcap.c:218:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errbuf[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/nsock/src/nsock_pcap.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 bpf[4096];
data/nmap-7.91+dfsg1/nsock/src/nsock_pcap.c:428: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(&npp.ts, nsock_gettimeofday(), sizeof(struct timeval));
data/nmap-7.91+dfsg1/nsock/src/nsock_ssl.c:118: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 rndbuf[128];
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:72: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 displaystr[256];
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:97: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(&nse->writeinfo.dest, saddr, sslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:101: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(&nse->iod->peer, saddr, sslen);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:108: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(displaystr, ": ", 2);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:109:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(displaystr + 2, data, datalen);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:135: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 displaystr[256];
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:146: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(displaystr, ": ", 2);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:147: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(displaystr + 2, data, datalen);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:171: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[4096];
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:176: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 displaystr[256];
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:221: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(displaystr, ": ", 2);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:222: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(displaystr + 2, buf2, strlength);
data/nmap-7.91+dfsg1/osscan.cc:453: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 dsbuf[10], otbuf[8], ctbuf[8], cubuf[8], dcbuf[8];
data/nmap-7.91+dfsg1/osscan.cc:454: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 macbuf[16];
data/nmap-7.91+dfsg1/osscan.cc:508: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(p, test->name, len);
data/nmap-7.91+dfsg1/osscan.cc: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(p, av->attribute, len);
data/nmap-7.91+dfsg1/osscan.cc:531:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, av->value, len);
data/nmap-7.91+dfsg1/osscan.cc:655: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 str[10240];
data/nmap-7.91+dfsg1/osscan.cc:656: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 wrapstr[10240];
data/nmap-7.91+dfsg1/osscan.cc:707:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[200];
data/nmap-7.91+dfsg1/osscan.cc:759:7:  [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(p1, "OS:"); p1 += 3; len +=3;
data/nmap-7.91+dfsg1/osscan.cc:777: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 str[2048];
data/nmap-7.91+dfsg1/osscan.cc:909:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(FP->match.OS_name, p, q - p + 1);
data/nmap-7.91+dfsg1/osscan.cc:960: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[2048];
data/nmap-7.91+dfsg1/osscan.cc:968: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(fname, "r");
data/nmap-7.91+dfsg1/osscan.cc:1013: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(current->match.OS_name, p, q - p + 1);
data/nmap-7.91+dfsg1/osscan.cc:1065: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[256];
data/nmap-7.91+dfsg1/osscan2.cc:142:63:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 struct AVal *make_aval_ipid_seq(struct AVal *av, const char *attribute,
data/nmap-7.91+dfsg1/osscan2.cc:394: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 pcap_filter[2048];
data/nmap-7.91+dfsg1/osscan2.cc:396: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 dst_hosts[1200];
data/nmap-7.91+dfsg1/osscan2.cc:825: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(&(hsi->target->seq), &hsi->hss->si, sizeof(struct seq_info));
data/nmap-7.91+dfsg1/osscan2.cc:867: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(&(hsi->target->seq), &hsi->hss->si, sizeof(struct seq_info));
data/nmap-7.91+dfsg1/osscan2.cc:1196: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(eth->dstmac, target->NextHopMACAddress(), sizeof(eth->srcmac));
data/nmap-7.91+dfsg1/osscan2.cc:2064:19:  [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).
            ttl = atoi(it->value);
data/nmap-7.91+dfsg1/osscan2.cc:2720: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 ops_buf[256];
data/nmap-7.91+dfsg1/osscan2.cc:2801: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 ops_buf[256];
data/nmap-7.91+dfsg1/osscan2.cc:2802: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 quirks_buf[10];
data/nmap-7.91+dfsg1/osscan2.cc:2900: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 flags_buf[10];
data/nmap-7.91+dfsg1/osscan2.cc:2901: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 quirks_buf[10];
data/nmap-7.91+dfsg1/osscan2.cc:3007: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 ops_buf[256];
data/nmap-7.91+dfsg1/osscan2.cc:3229: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(hss->icmpEchoReply, ip, ntohs(ip->ip_len));
data/nmap-7.91+dfsg1/osscan2.cc:3347: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(&tmpshort, q, 2);
data/nmap-7.91+dfsg1/osscan2.cc:3350: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(p, "%hX", ntohs(tmpshort));
data/nmap-7.91+dfsg1/osscan2.cc:3374: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(&tmpword, q, 4);
data/nmap-7.91+dfsg1/osscan2.cc:3380: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(&tmpword, q, 4);
data/nmap-7.91+dfsg1/osscan2.cc:3665: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 targetstr[128];
data/nmap-7.91+dfsg1/output.cc:96: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.
static const char *logtypes[LOG_NUM_FILES] = LOG_NAMES;
data/nmap-7.91+dfsg1/output.cc:246:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errbuf[PCAP_ERRBUF_SIZE];
data/nmap-7.91+dfsg1/output.cc:269: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 pcap_name[1024];
data/nmap-7.91+dfsg1/output.cc:316: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 errstr[256];
data/nmap-7.91+dfsg1/output.cc:412: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[5];
data/nmap-7.91+dfsg1/output.cc:435: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[5];
data/nmap-7.91+dfsg1/output.cc:502: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 protocol[MAX_IPPROTOSTRLEN + 1];
data/nmap-7.91+dfsg1/output.cc:503: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 portinfo[64];
data/nmap-7.91+dfsg1/output.cc:504: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 grepvers[256];
data/nmap-7.91+dfsg1/output.cc:507: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 serviceinfo[64];
data/nmap-7.91+dfsg1/output.cc:513:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[1200];
data/nmap-7.91+dfsg1/output.cc:586: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 tbufs[128];
data/nmap-7.91+dfsg1/output.cc:619: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 desc[32];
data/nmap-7.91+dfsg1/output.cc:709:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&ss, &current->reason.ip_addr, sizeof(current->reason.ip_addr));
data/nmap-7.91+dfsg1/output.cc:728: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 fullversion[160];
data/nmap-7.91+dfsg1/output.cc:796:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&ss, &current->reason.ip_addr, sizeof(current->reason.ip_addr));
data/nmap-7.91+dfsg1/output.cc:870: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 tbuf[10];
data/nmap-7.91+dfsg1/output.cc:1097:21:  [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).
    o.nmap_stdout = fopen(DEVNULL, "w");
data/nmap-7.91+dfsg1/output.cc:1102:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      o.logfd[i] = fopen(filename, "a");
data/nmap-7.91+dfsg1/output.cc:1104:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      o.logfd[i] = fopen(filename, "w");
data/nmap-7.91+dfsg1/output.cc:1274: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 macascii[32];
data/nmap-7.91+dfsg1/output.cc:1388:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[32];
data/nmap-7.91+dfsg1/output.cc:1531: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.
  const char *types[MAX_OS_CLASSMEMBERS];
data/nmap-7.91+dfsg1/output.cc:1532: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.
  const char *cpes[MAX_OS_CLASSMEMBERS];
data/nmap-7.91+dfsg1/output.cc:1533: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 fullfamily[MAX_OS_CLASSMEMBERS][128];    // "[vendor] [os family]"
data/nmap-7.91+dfsg1/output.cc:1535: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 familygenerations[MAX_OS_CLASSMEMBERS][96];      // example: "4.X|5.X|6.X"
data/nmap-7.91+dfsg1/output.cc:1537: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 tmpbuf[1024];
data/nmap-7.91+dfsg1/output.cc:1650: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 macascii[32];
data/nmap-7.91+dfsg1/output.cc:1724:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char fillbuf[16];
data/nmap-7.91+dfsg1/output.cc:1783: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 str[10240];
data/nmap-7.91+dfsg1/output.cc:1853: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 numlst[512];             /* For creating lists of numbers */
data/nmap-7.91+dfsg1/output.cc:1988:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmbuf[128];
data/nmap-7.91+dfsg1/output.cc:2028: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(p, "%X", currenths->seq.seqs[i]);
data/nmap-7.91+dfsg1/output.cc:2052: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(p, "%hX", currenths->seq.ipids[i]);
data/nmap-7.91+dfsg1/output.cc:2073: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(p, "%X", currenths->seq.timestamps[i]);
data/nmap-7.91+dfsg1/output.cc:2102:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname_tbl[MAX_SERVICE_INFO_FIELDS][FQDN_LEN+1];
data/nmap-7.91+dfsg1/output.cc:2103: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 ostype_tbl[MAX_SERVICE_INFO_FIELDS][64];
data/nmap-7.91+dfsg1/output.cc:2104: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 devicetype_tbl[MAX_SERVICE_INFO_FIELDS][64];
data/nmap-7.91+dfsg1/output.cc:2105: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 cpe_tbl[MAX_SERVICE_INFO_FIELDS][80];
data/nmap-7.91+dfsg1/output.cc: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 namebuf[256];
data/nmap-7.91+dfsg1/output.cc:2481: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 mytime[128];
data/nmap-7.91+dfsg1/output.cc:2520: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 mytime[128];
data/nmap-7.91+dfsg1/output.cc:2523: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 statbuf[128];
data/nmap-7.91+dfsg1/payload.cc:118: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 text[1024];
data/nmap-7.91+dfsg1/payload.cc:284: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[256];
data/nmap-7.91+dfsg1/payload.cc:298: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(filename, "r");
data/nmap-7.91+dfsg1/portlist.cc:298: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(result, string, slen);
data/nmap-7.91+dfsg1/portreasons.cc:479:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char reason[128];
data/nmap-7.91+dfsg1/portreasons.cc:489:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char reason[128];
data/nmap-7.91+dfsg1/portreasons.cc:495:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&ss, &r.ip_addr, sizeof(r.ip_addr));
data/nmap-7.91+dfsg1/protocols.cc:79: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[512];
data/nmap-7.91+dfsg1/protocols.cc: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 protocolname[128];
data/nmap-7.91+dfsg1/protocols.cc:84: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[1024];
data/nmap-7.91+dfsg1/protocols.cc:91:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(filename, "/etc/protocols");
data/nmap-7.91+dfsg1/protocols.cc:94: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(filename, "r");
data/nmap-7.91+dfsg1/scan_engine.cc:174: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 flagbuf[32];
data/nmap-7.91+dfsg1/scan_engine.cc:1194: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.
          char tmpbuf[64];
data/nmap-7.91+dfsg1/scan_engine.cc:2046: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[64];
data/nmap-7.91+dfsg1/scan_engine.cc:2152: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[64];
data/nmap-7.91+dfsg1/scan_engine.cc:2257: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 tmpbuf[64];
data/nmap-7.91+dfsg1/scan_engine.cc:2285: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 tmpbuf[64];
data/nmap-7.91+dfsg1/scan_engine.cc:2695: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 targetstr[128];
data/nmap-7.91+dfsg1/scan_engine.cc:2744: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 additional_info[128];
data/nmap-7.91+dfsg1/scan_engine_raw.cc:938: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 macstring[2 * ETH_ADDR_LEN + 1];
data/nmap-7.91+dfsg1/scan_engine_raw.cc:958: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 filterstr[256];
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1059: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 ns_dst_mac[6] = {0x33, 0x33, 0xff};
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1064: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(eth.srcmac, hss->target->SrcMACAddress(), 6);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1065: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(eth.dstmac, ns_dst_mac, 6);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1071:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char multicast_prefix[13] = {0};
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1076: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(&ns_dst_ip6, multicast_prefix, sizeof(multicast_prefix));
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1088: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(&ns_msg.icmpv6_target, hss->target->v6hostip(), IP6_ADDR_LEN);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1091: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(&ns_msg.icmpv6_mac, hss->target->SrcMACAddress(), ETH_ADDR_LEN);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1257: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(eth.srcmac, hss->target->SrcMACAddress(), 6);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:1258: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(eth.dstmac, hss->target->NextHopMACAddress(), 6);
data/nmap-7.91+dfsg1/scan_lists.cc:325: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 servmask[128];  // A protocol name can be up to 127 chars + nul byte
data/nmap-7.91+dfsg1/service_scan.cc:139: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 product_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:140: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 version_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:141: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 extrainfo_matched[256];
data/nmap-7.91+dfsg1/service_scan.cc:142:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:143: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 ostype_matched[32];
data/nmap-7.91+dfsg1/service_scan.cc: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 devicetype_matched[32];
data/nmap-7.91+dfsg1/service_scan.cc:145: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 cpe_a_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:146: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 cpe_h_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:147: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 cpe_o_matched[80];
data/nmap-7.91+dfsg1/service_scan.cc:227: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 str_args[SUBSTARGS_MAX_ARGS][SUBSTARGS_STRLEN];
data/nmap-7.91+dfsg1/service_scan.cc:378: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(servicename, matchtext, p - matchtext);
data/nmap-7.91+dfsg1/service_scan.cc:497: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 product[80];
data/nmap-7.91+dfsg1/service_scan.cc:498: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 version[80];
data/nmap-7.91+dfsg1/service_scan.cc:499: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 info[256];  /* We will truncate with ... later */
data/nmap-7.91+dfsg1/service_scan.cc:500: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 hostname[80];
data/nmap-7.91+dfsg1/service_scan.cc:501: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 ostype[32];
data/nmap-7.91+dfsg1/service_scan.cc:502: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 devicetype[32];
data/nmap-7.91+dfsg1/service_scan.cc:503: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 cpe_a[80], cpe_h[80], cpe_o[80];
data/nmap-7.91+dfsg1/service_scan.cc:636:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(*buf + *len, from, fromlen);
data/nmap-7.91+dfsg1/service_scan.cc:655: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[32];
data/nmap-7.91+dfsg1/service_scan.cc:688: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 substcommand[16];
data/nmap-7.91+dfsg1/service_scan.cc:711: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(substcommand, tmplvar, commandlen);
data/nmap-7.91+dfsg1/service_scan.cc:791: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[24]; //0xffffffffffffffff = 18446744073709551615, 20 chars
data/nmap-7.91+dfsg1/service_scan.cc:889:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, srcstart, newlen);
data/nmap-7.91+dfsg1/service_scan.cc:909: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(dst, subst, newlen);
data/nmap-7.91+dfsg1/service_scan.cc:1121: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(probename, pd, len);
data/nmap-7.91+dfsg1/service_scan.cc:1143: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(probestring, ps, stringlen);
data/nmap-7.91+dfsg1/service_scan.cc:1254:8:  [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).
  tp = atoi(portstr);
data/nmap-7.91+dfsg1/service_scan.cc:1284: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[2048];
data/nmap-7.91+dfsg1/service_scan.cc:1289: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(filename, "r");
data/nmap-7.91+dfsg1/service_scan.cc:1371: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[256];
data/nmap-7.91+dfsg1/service_scan.cc:1632: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(servicefp + servicefplen, "\nSF:", 4);
data/nmap-7.91+dfsg1/service_scan.cc:1662: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[128];
data/nmap-7.91+dfsg1/service_scan.cc:1900: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(currentresp + currentresplen, respstr, respstrlen);
data/nmap-7.91+dfsg1/service_scan.cc:1985: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 host[128];
data/nmap-7.91+dfsg1/service_scan.cc:2769: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 targetstr[128];
data/nmap-7.91+dfsg1/service_scan.cc:2816: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 additional_info[128];
data/nmap-7.91+dfsg1/services.cc:116: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[512];
data/nmap-7.91+dfsg1/services.cc:118: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 servicename[128], proto[16];
data/nmap-7.91+dfsg1/services.cc:121: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[1024];
data/nmap-7.91+dfsg1/services.cc: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 ratio_str[32];
data/nmap-7.91+dfsg1/services.cc:138:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(filename, "/etc/services");
data/nmap-7.91+dfsg1/services.cc:152:25:  [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(filename + len, "\\drivers\\etc\\services");
data/nmap-7.91+dfsg1/services.cc:154:25:  [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(filename + len, "\\services");
data/nmap-7.91+dfsg1/services.cc:159: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(filename, "r");
data/nmap-7.91+dfsg1/targets.cc:155: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 host_spec[1024];
data/nmap-7.91+dfsg1/targets.cc:201: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 prev_device_name[16] = "";
data/nmap-7.91+dfsg1/targets.cc:326:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[1024];
data/nmap-7.91+dfsg1/tcpip.cc:119: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 sendbytesasc[16], recvbytesasc[16];
data/nmap-7.91+dfsg1/tcpip.cc:146: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 arpdesc[128];
data/nmap-7.91+dfsg1/tcpip.cc:147: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 who_has[INET_ADDRSTRLEN], tell[INET_ADDRSTRLEN];
data/nmap-7.91+dfsg1/tcpip.cc:199: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 src[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/tcpip.cc:200: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 who_has[INET6_ADDRSTRLEN], tgt_is[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/tcpip.cc:201: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 desc[128];
data/nmap-7.91+dfsg1/tcpip.cc:334:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errbuf[64] = "";
data/nmap-7.91+dfsg1/tcpip.cc:335: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 targetipstr[INET6_ADDRSTRLEN] = "";
data/nmap-7.91+dfsg1/tcpip.cc:390:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/tcpip.cc:548: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((u8 *) ip + sizeof(struct ip), ipopt, ipoptlen);
data/nmap-7.91+dfsg1/tcpip.cc:601: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((u8 *) ip + sizeof(struct ip) + ipoptlen, data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:623: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 + sizeof(struct ip6_hdr), data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:672: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(packet + sizeof(*tcp), tcpopt, tcpoptlen);
data/nmap-7.91+dfsg1/tcpip.cc:676: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(packet + sizeof(*tcp) + tcpoptlen, data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:807: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(packet + sizeof(*udp), data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:922: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(packet + sizeof(*sctp), chunks, chunkslen);
data/nmap-7.91+dfsg1/tcpip.cc:925: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(packet + sizeof(*sctp) + chunkslen, data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:1035: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(datastart, data, MIN(dlen, datalen));
data/nmap-7.91+dfsg1/tcpip.cc:1079: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 + icmplen, data, datalen);
data/nmap-7.91+dfsg1/tcpip.cc:1144: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(datastart, data, MIN(dlen, datalen));
data/nmap-7.91+dfsg1/tcpip.cc:1167: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 sourcehost[16];
data/nmap-7.91+dfsg1/tcpip.cc:1243: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 sourcehost[16];
data/nmap-7.91+dfsg1/tcpip.cc:1693:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dstmac, ae.arp_ha.addr_eth.data, 6);
data/nmap-7.91+dfsg1/tcpip.cc:1817:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy((char *) timestamp, p, 4);
data/nmap-7.91+dfsg1/tcpip.cc:1822:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy((char *) echots, p, 4);
data/nmap-7.91+dfsg1/tests/nmap_dns_test.cc:134: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 ar_ipp[INET6_ADDRSTRLEN];
data/nmap-7.91+dfsg1/timing.cc:188: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(tv, &lastcall, sizeof(struct timeval));
data/nmap-7.91+dfsg1/timing.cc:201: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(&lastcall, &now, sizeof(struct timeval));
data/nmap-7.91+dfsg1/timing.cc:203: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(tv, &lastcall, sizeof(struct timeval));
data/nmap-7.91+dfsg1/traceroute.cc:600: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(eth.srcmac, host->target->SrcMACAddress(), 6);
data/nmap-7.91+dfsg1/traceroute.cc:601: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(eth.dstmac, host->target->NextHopMACAddress(), 6);
data/nmap-7.91+dfsg1/traceroute.cc:838: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 pcap_filter[128];
data/nmap-7.91+dfsg1/utils.cc:198: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(tmp, arr + elem_sz * i, elem_sz);
data/nmap-7.91+dfsg1/utils.cc:199: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(arr + elem_sz * i, arr + elem_sz * pos, elem_sz);
data/nmap-7.91+dfsg1/utils.cc:200: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(arr + elem_sz * pos, tmp, elem_sz);
data/nmap-7.91+dfsg1/utils.cc:252: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 mycommand[4096];
data/nmap-7.91+dfsg1/utils.cc:443: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 auxbuff[4096];
data/nmap-7.91+dfsg1/utils.cc:498: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 twobytes[3];
data/nmap-7.91+dfsg1/utils.cc:565:8:  [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).
  fd = open(fname, openflags);
data/nmap-7.91+dfsg1/xml.cc:152: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[32];
data/nmap-7.91+dfsg1/xml.cc:195: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(result + i, repl, len);
data/nmap-7.91+dfsg1/xml.cc:221: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[32];
data/nmap-7.91+dfsg1/xml.cc:254: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(result + i, repl, len);
data/nmap-7.91+dfsg1/FPEngine.cc:2502:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(this->eth_hdr.devname, devname, sizeof(this->eth_hdr.devname)-1);
data/nmap-7.91+dfsg1/NewTargets.cc:121:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
std::string NewTargets::read (void) {
data/nmap-7.91+dfsg1/NewTargets.cc:163:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(target) >= 1024) {
data/nmap-7.91+dfsg1/NewTargets.h:77:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  static std::string read (void);
data/nmap-7.91+dfsg1/NmapOps.cc:206: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).
    i += strlen(percent_buffer);
data/nmap-7.91+dfsg1/NmapOutputTable.cc:129: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).
    itemlen = strlen(item);
data/nmap-7.91+dfsg1/TargetGroup.cc:181: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).
    slash = expr + strlen(expr);
data/nmap-7.91+dfsg1/idle_scan.cc:466:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(10000);
data/nmap-7.91+dfsg1/idle_scan.cc:542:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, proxyName, sslen);
data/nmap-7.91+dfsg1/idle_scan.cc:548:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, strchr(proxyName, '[') + 1, sslen);
data/nmap-7.91+dfsg1/idle_scan.cc:552:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, proxyName, sizeof(name));
data/nmap-7.91+dfsg1/idle_scan.cc:664:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(30000);
data/nmap-7.91+dfsg1/idle_scan.cc:865:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(50000);
data/nmap-7.91+dfsg1/idle_scan.cc:892:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(300000);
data/nmap-7.91+dfsg1/idle_scan.cc:1035:45:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    else if (proxy->senddelay && pr0be > 0) usleep(proxy->senddelay);
data/nmap-7.91+dfsg1/idle_scan.cc:1092:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(sleeptime);
data/nmap-7.91+dfsg1/idle_scan.cc:1373:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(lastproxy, proxyName, sizeof(lastproxy));
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:152: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).
				sprintf(dst + strlen(dst), "/%d",
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:159: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).
				sprintf(dst + strlen(dst), "/%d",
data/nmap-7.91+dfsg1/libdnet-stripped/src/addr.c:241:8:  [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).
		p += strlen(p) + 1;
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-bsd.c:85:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((len = read(arp->fd, msg, sizeof(*msg))) > 0) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/arp-ioctl.c:396:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return (read(fd, buf, len) == len ? 0 : -1);
data/nmap-7.91+dfsg1/libdnet-stripped/src/blob.c:404: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).
			len = strlen(p) + 1;
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:107:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (p = buf; p < buf + len; p += strlen(p) + 1) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/eth-dlpi.c:122: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).
	p = dev + strlen(dev);
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:279: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).
		else if (strcmp(a->AdapterName, npcap_loopback_name + strlen(_DEVICE_PREFIX) - 1) == 0) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf-win32.c:582: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 (pdev->name == NULL || strlen(pdev->name) < sizeof(_DEVICE_PREFIX))
data/nmap-7.91+dfsg1/libdnet-stripped/src/intf.c:780:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
				sscanf(buf, "%04s%04s%04s%04s%04s%04s%04s%04s %x %02x %02x %02x %15s\n",
data/nmap-7.91+dfsg1/libdnet-stripped/src/ip-cooked.c:178:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(usec);
data/nmap-7.91+dfsg1/libdnet-stripped/src/rand.c:84:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(fd, seed + sizeof(*tv), sizeof(seed) - sizeof(*tv));
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:151:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (type == RTM_GET && (len = read(r->fd, buf, sizeof(buf))) > 0) {
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-bsd.c:612:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return (read(fd, buf, len) == len ? 0 : -1);
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:237:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			i = sscanf(buf, "%15s %X %X %X %d %d %d %X %d %d %d\n",
data/nmap-7.91+dfsg1/libdnet-stripped/src/route-linux.c:268:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			i = sscanf(buf, "%04s%04s%04s%04s%04s%04s%04s%04s %02x "
data/nmap-7.91+dfsg1/libdnet-stripped/src/strlcat.c:62:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return(dlen + strlen(s));
data/nmap-7.91+dfsg1/libdnet-stripped/src/tun-bsd.c:130:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return (read(tun->fd, buf, size));
data/nmap-7.91+dfsg1/libnetutil/RawData.cc:172: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).
    return this->store((const u8*)str, strlen(str));
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:228: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:229: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:235: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:236: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:247: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:248: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:259: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:260: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:269: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:270: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:287: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).
        bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:288: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).
        p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:291: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).
        bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:292: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).
        p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:297: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).
          bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:298: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).
          p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:314: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/TCPHeader.cc:315: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1105: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1106: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1112: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1113: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1124: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1125: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1136: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1137: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1146: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1147: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1164: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).
        bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1165: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).
        p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1168: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).
        bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1169: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).
        p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1174: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).
          bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1175: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).
          p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1191: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).
      bufsize -= strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1192: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).
      p += strlen(p);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1612:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(destbuf, inet_ntop_ez(&dcrn->routes[i].dest, sizeof(dcrn->routes[i].dest)), sizeof(destbuf));
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1613:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(gwbuf, inet_ntop_ez(&dcrn->routes[i].gw, sizeof(dcrn->routes[i].gw)), sizeof(gwbuf));
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1807:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, acronym ? short_name : long_name, 128);\
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:1960:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, acronym ? "unknown" : "Unknown protocol", 128);\
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2469:11:  [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(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2469: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).
          strncat(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2523:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2523: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).
        strncat(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:2957:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(icmpinfo,"type=?/code=?", sizeof(icmpinfo));
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4639:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ch = getc(fp);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4643:20:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((ch = getc(fp)) != EOF && ch != '\n')
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4646:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ch = getc(fp);
data/nmap-7.91+dfsg1/libnetutil/netutil.cc:4653:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = getc(fp);
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:627:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              (unsigned int)strlen(username),  \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:628: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).
                              (password), (unsigned int)strlen(password), NULL)
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:641:58:  [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(username), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:669:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                        (unsigned int)strlen(username), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:673:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                        (unsigned int)strlen(hostname), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:675:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                        (unsigned int)strlen(username))
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:703: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).
                                             (unsigned int)strlen(username), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:761:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              (unsigned int)strlen(varname), (value),   \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:762:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              (unsigned int)strlen(value))
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:773: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).
                                   (unsigned int)strlen(term),          \
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:805: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).
                                  (command), (unsigned int)strlen(command))
data/nmap-7.91+dfsg1/libssh2/include/libssh2.h:809: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).
                                  (unsigned int)strlen(subsystem))
data/nmap-7.91+dfsg1/libssh2/include/libssh2_publickey.h:75: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).
  { (name), strlen(name), (value), strlen(value), (mandatory) },
data/nmap-7.91+dfsg1/libssh2/include/libssh2_publickey.h:75:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  { (name), strlen(name), (value), strlen(value), (mandatory) },
data/nmap-7.91+dfsg1/libssh2/include/libssh2_publickey.h:97: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).
  libssh2_publickey_add_ex((pkey), (name), strlen(name), (blob), (blob_len), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_publickey.h:106:47:  [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).
  libssh2_publickey_remove_ex((pkey), (name), strlen(name), (blob), (blob_len))
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:234:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_open_ex((sftp), (filename), strlen(filename), (flags), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:237: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).
    libssh2_sftp_open_ex((sftp), (path), strlen(path), 0, 0, \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:284: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).
    libssh2_sftp_rename_ex((sftp), (sourcefile), strlen(sourcefile), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:285: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).
                           (destfile), strlen(destfile),                \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:294: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).
    libssh2_sftp_unlink_ex((sftp), (filename), strlen(filename))
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:308:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_mkdir_ex((sftp), (path), strlen(path), (mode))
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:314:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_rmdir_ex((sftp), (path), strlen(path))
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:322: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).
    libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_STAT, \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:325: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).
    libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_LSTAT, \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:328: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).
    libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_SETSTAT, \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:338:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:339: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).
                            strlen(linkpath), LIBSSH2_SFTP_SYMLINK)
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:341:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \
data/nmap-7.91+dfsg1/libssh2/include/libssh2_sftp.h:344:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \
data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c:191: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).
    i = strlen(version);
data/nmap-7.91+dfsg1/libssh2/os400/os400sys.c:209: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).
    i = strlen(version);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:166:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s_un.sun_path, path, sizeof s_un.sun_path);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:325: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).
    cds.cbData = 1 + strlen(mapname);
data/nmap-7.91+dfsg1/libssh2/src/agent.c:782:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                             strlen(username),
data/nmap-7.91+dfsg1/libssh2/src/agent.c:841: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).
        size_t path_len = strlen(path);
data/nmap-7.91+dfsg1/libssh2/src/blowfish.c:685: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).
    blf_key(&c, (uint8_t *) key2, strlen(key2));
data/nmap-7.91+dfsg1/libssh2/src/channel.c:386:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        session->direct_host_len = strlen(host);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:387:37:  [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).
        session->direct_shost_len = strlen(shost);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:472:37:  [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).
        session->fwdLstn_host_len = strlen(host);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:640:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t host_len = strlen(listener->host);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1136: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).
        auth_proto ? strlen(auth_proto) : (sizeof("MIT-MAGIC-COOKIE-1") - 1);
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1138: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).
        auth_cookie ? strlen(auth_cookie) : LIBSSH2_X11_RANDOM_COOKIE_LEN;
data/nmap-7.91+dfsg1/libssh2/src/channel.c:1575: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).
            namelen = strlen(channel->exit_signal);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:427:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                             strlen((char *) session->local.banner) - 2);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:432: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).
                                strlen((char *) session->local.banner) - 2);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:446: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).
                         strlen((char *) session->remote.banner));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:451: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).
                            strlen((char *) session->remote.banner));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1117:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                             strlen((char *) session->local.banner) - 2);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1122: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).
                                  strlen((char *) session->local.banner) - 2);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1136: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).
                         strlen((char *) session->remote.banner));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1141:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              strlen((char *) session->remote.banner));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1945: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).
                         strlen((char *) session->local.banner) - 2);   \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1950:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                          strlen((char *)               \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1966: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).
                     strlen((char *) session->remote.banner));          \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:1971:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                      strlen((char *)                   \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3356:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len += strlen((*method)->name) + 1;
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3380: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).
        int mlen = strlen((*method)->name);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3393: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).
    ((prefvar) ? strlen(prefvar) :                              \
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3613:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if((strlen((*methodlist)->name) == name_len) &&
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3639:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3676: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).
                            strlen((*hostkeyp)->name));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3716:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3753: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).
                            strlen((*kexp)->name));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3795:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3821: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).
                            strlen((*cryptp)->name));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3850:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3874: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).
                            strlen((*macp)->name));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3903:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:3928: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).
                            strlen((*compp)->name));
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4208:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int prefs_len = strlen(prefs);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4278:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int method_len = p ? (p - s) : (int) strlen(s);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4283: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).
                memcpy(s, p + 1, strlen(s) - method_len);
data/nmap-7.91+dfsg1/libssh2/src/kex.c:4299:8:  [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(newprefs) == 0) {
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:142:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t hostlen = strlen(host);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:181: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).
                                   salt, strlen(salt));
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:196: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).
            keylen = strlen(key);
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:433: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).
                                        strlen(host));
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:969:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(libssh2_knownhost_readline(hosts, buf, strlen(buf), type)) {
data/nmap-7.91+dfsg1/libssh2/src/knownhost.c:1078: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).
    required_size = strlen(node->key);
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:436:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pwd_len = passphrase != NULL ? strlen((const char *)passphrase) : 0;
data/nmap-7.91+dfsg1/libssh2/src/mbedtls.c:669:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pwd_len = passphrase != NULL ? strlen((const char *)passphrase) : 0;
data/nmap-7.91+dfsg1/libssh2/src/misc.c:75:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(errmsg);
data/nmap-7.91+dfsg1/libssh2/src/misc.c:350: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).
        insize = strlen(indata);
data/nmap-7.91+dfsg1/libssh2/src/misc.c:400: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).
    return strlen(base64data); /* return the length of the new data */
data/nmap-7.91+dfsg1/libssh2/src/misc.c:763:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(_libssh2_get_string(buf, &out, &len) || len != strlen(match) ||
data/nmap-7.91+dfsg1/libssh2/src/misc.c:764:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strncmp((char *)out, match, strlen(match)) != 0) {
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:288:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(name == NULL || strlen(name) != 19)
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:694: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 passphrase_len = strlen(passphrase);
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:3022: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(key_type != NULL && (strlen(key_type) > 11 || strlen(key_type) < 7)) {
data/nmap-7.91+dfsg1/libssh2/src/openssl.c:3022:54:  [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(key_type != NULL && (strlen(key_type) > 11 || strlen(key_type) < 7)) {
data/nmap-7.91+dfsg1/libssh2/src/packet.c:124: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).
                (strlen(listn->host) == listen_state->host_len) &&
data/nmap-7.91+dfsg1/libssh2/src/packet.c:1092:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i, packet_types_len = strlen((char *) packet_types);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:54: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).
        len = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:61: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).
        len = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:134: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).
            memcmp(line, crypt_annotation, strlen(crypt_annotation)) == 0) {
data/nmap-7.91+dfsg1/libssh2/src/pem.c:147: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).
                           strlen(cur_method->pem_annotation)) == 0) {
data/nmap-7.91+dfsg1/libssh2/src/pem.c:149: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).
                memcpy(iv, line + strlen(method->pem_annotation) + 1,
data/nmap-7.91+dfsg1/libssh2/src/pem.c:176: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).
            linelen = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:219: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).
                           strlen((char *)passphrase));
data/nmap-7.91+dfsg1/libssh2/src/pem.c:229:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                               strlen((char *)passphrase));
data/nmap-7.91+dfsg1/libssh2/src/pem.c:319: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).
            linelen = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:400: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(decoded.len < strlen(AUTH_MAGIC)) {
data/nmap-7.91+dfsg1/libssh2/src/pem.c:406: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).
               strlen(AUTH_MAGIC)) != 0) {
data/nmap-7.91+dfsg1/libssh2/src/pem.c:412:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    decoded.dataptr += strlen(AUTH_MAGIC) + 1;
data/nmap-7.91+dfsg1/libssh2/src/pem.c:439:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if((passphrase == NULL || strlen((const char *)passphrase) == 0) &&
data/nmap-7.91+dfsg1/libssh2/src/pem.c:492:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                       strlen(cur_method->name)) == 0) {
data/nmap-7.91+dfsg1/libssh2/src/pem.c:533: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).
                                     strlen((const char *)passphrase),
data/nmap-7.91+dfsg1/libssh2/src/pem.c:690: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).
            linelen = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/pem.c:766: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).
            linelen = strlen(line);
data/nmap-7.91+dfsg1/libssh2/src/scp.c:48:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define _libssh2_shell_quotedsize(s)     (3 * strlen(s) + 2)
data/nmap-7.91+dfsg1/libssh2/src/scp.c:301: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).
        cmd_len = strlen((char *)session->scpRecv_command);
data/nmap-7.91+dfsg1/libssh2/src/scp.c:859: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).
        cmd_len = strlen((char *)session->scpSend_command);
data/nmap-7.91+dfsg1/libssh2/src/session.c:211: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).
            banner_len = strlen((char *) session->local.banner);
data/nmap-7.91+dfsg1/libssh2/src/session.c:425: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).
    size_t banner_len = banner ? strlen(banner) : 0;
data/nmap-7.91+dfsg1/libssh2/src/session.c:1132: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).
            descr_len = strlen(description);
data/nmap-7.91+dfsg1/libssh2/src/session.c:1135:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            lang_len = strlen(lang);
data/nmap-7.91+dfsg1/libssh2/src/session.c:1291: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).
        msglen = strlen(error);
data/nmap-7.91+dfsg1/libssh2/src/sftp.c:823: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).
                                                   strlen("sftp"));
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:756: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).
                                strlen(pk_file->filename),
data/nmap-7.91+dfsg1/libssh2/src/userauth.c:1615:61:  [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).
                 _libssh2_userauth_publickey(session, user, strlen(user),
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:71: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).
pf->dnam.naml$l_long_filename_size = strlen( inputfile);
data/nmap-7.91+dfsg1/libssh2/vms/man2help.c:112: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).
filespec.dsc$w_length = strlen(filename);
data/nmap-7.91+dfsg1/main.cc:146: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).
    for (i = 1; i < argc && strlen(command) + strlen(argv[i]) + 1 < sizeof(command); i++) {
data/nmap-7.91+dfsg1/main.cc:146:47:  [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 = 1; i < argc && strlen(command) + strlen(argv[i]) + 1 < sizeof(command); i++) {
data/nmap-7.91+dfsg1/main.cc:147:7:  [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(command, " ");
data/nmap-7.91+dfsg1/nbase/getopt.c:228: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).
      if((strlen(longopts[ind].name) == (size_t) (charind - offset)) &&
data/nmap-7.91+dfsg1/nbase/inet_ntop.c:229: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).
            tp += strlen(tp);
data/nmap-7.91+dfsg1/nbase/inet_ntop.c:250:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dst, tmp, size);
data/nmap-7.91+dfsg1/nbase/nbase.h:386:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
void usleep(unsigned long usec);
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:743:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((c = getc(fd)) != EOF) {
data/nmap-7.91+dfsg1/nbase/nbase_addrset.c:752:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((c = getc(fd)) != EOF) {
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:271: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).
  len = strlen(device) + 1;
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:280:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(padded, device, sizeof(padded));
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:391:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(tv->tv_sec * 1000000UL + tv->tv_usec);
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:448:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(stv.tv_sec * 1000000UL + stv.tv_usec);
data/nmap-7.91+dfsg1/nbase/nbase_misc.c:740:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int pathname_len = strlen(pathname_buf);
data/nmap-7.91+dfsg1/nbase/nbase_rnd.c:162:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      n = read(fd, seed + sizeof(*tv) + sizeof(*pid),
data/nmap-7.91+dfsg1/nbase/nbase_str.c:84: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).
  needlelen = (unsigned int)strlen(pneedle);
data/nmap-7.91+dfsg1/nbase/nbase_str.c:118:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(dest, src, n);
data/nmap-7.91+dfsg1/nbase/nbase_str.c:282: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).
  p = path + strlen(path) - 1;
data/nmap-7.91+dfsg1/nbase/nbase_str.c:307:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, path, i);
data/nmap-7.91+dfsg1/nbase/nbase_time.c:76:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
void usleep(unsigned long usec) {
data/nmap-7.91+dfsg1/nbase/snprintf.c:250: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).
    width -= strlen((char *)arg);
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:77: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).
    cp1 = safe_malloc(strlen(s1) + 1);
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:78: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).
    cp2 = safe_malloc(strlen(s2) + 1);
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:80: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(s1) + 1; i++)
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:82: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(s2) + 1; i++)
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:100: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).
    cp1 = safe_malloc(strlen(s1) + 1);
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:101: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).
    cp2 = safe_malloc(strlen(s2) + 1);
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:103: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(s1) + 1; i++)
data/nmap-7.91+dfsg1/nbase/strcasecmp.c:105: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(s2) + 1; i++)
data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c:109: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).
    plen = strlen(p);
data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c:110: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).
    slen = strlen(s);
data/nmap-7.91+dfsg1/nbase/test/test-escape_windows_command_arg.c:115:12:  [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.
    return strncat(p, s, plen+slen);
data/nmap-7.91+dfsg1/ncat/http.c:1085: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).
    if (memcmp(p, PREFIX, strlen(PREFIX)) != 0)
data/nmap-7.91+dfsg1/ncat/http.c:1087: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).
    p += strlen(PREFIX);
data/nmap-7.91+dfsg1/ncat/http_digest.c:155:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, time_buf, strlen(time_buf));
data/nmap-7.91+dfsg1/ncat/http_digest.c:177:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, username, strlen(username));
data/nmap-7.91+dfsg1/ncat/http_digest.c:179: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).
    MD5_Update(&md5, realm, strlen(realm));
data/nmap-7.91+dfsg1/ncat/http_digest.c:181:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, password, strlen(password));
data/nmap-7.91+dfsg1/ncat/http_digest.c:187:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, method, strlen(method));
data/nmap-7.91+dfsg1/ncat/http_digest.c:189: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).
    MD5_Update(&md5, uri, strlen(uri));
data/nmap-7.91+dfsg1/ncat/http_digest.c:195:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, HA1_hex, strlen(HA1_hex));
data/nmap-7.91+dfsg1/ncat/http_digest.c:197: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).
    MD5_Update(&md5, nonce, strlen(nonce));
data/nmap-7.91+dfsg1/ncat/http_digest.c:200:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        MD5_Update(&md5, nc, strlen(nc));
data/nmap-7.91+dfsg1/ncat/http_digest.c:202: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).
        MD5_Update(&md5, cnonce, strlen(cnonce));
data/nmap-7.91+dfsg1/ncat/http_digest.c:204: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).
        MD5_Update(&md5, "auth", strlen("auth"));
data/nmap-7.91+dfsg1/ncat/http_digest.c:207:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    MD5_Update(&md5, HA2_hex, strlen(HA2_hex));
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:336:59:  [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).
        auth_str = b64enc((unsigned char *) o.proxy_auth, strlen(o.proxy_auth));
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:579:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(username) >= sizeof(socks4msg.data)) {
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:585: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).
    datalen = strlen(username) + 1;
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:597: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).
        if (datalen + strlen(o.target) >= sizeof(socks4msg.data)) {
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:603: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).
        datalen += strlen(o.target) + 1;
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:724: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).
            plen = strlen(pptr);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:808: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).
        targetlen=strlen(o.target);
data/nmap-7.91+dfsg1/ncat/ncat_connect.c:1009:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(srcaddr.un.sun_path, tmp_name, sizeof(srcaddr.un.sun_path));
data/nmap-7.91+dfsg1/ncat/ncat_core.c:520: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).
    Write(logfd, str, strlen(str));
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:173: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(name) + strlen(value) + 2; /* 1 for '\0', 1 for =. */
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:173: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).
    len = strlen(name) + strlen(value) + 2; /* 1 for '\0', 1 for =. */
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:324: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).
        cmdlen = strlen(shell) + strlen(cmdexec) + 32;
data/nmap-7.91+dfsg1/ncat/ncat_exec_win.c:324: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).
        cmdlen = strlen(shell) + strlen(cmdexec) + 32;
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:538:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nbytes = read(STDIN_FILENO, buf, sizeof(buf));
data/nmap-7.91+dfsg1/ncat/ncat_listen.c:987:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = read(recv_fd, buf, sizeof(buf));
data/nmap-7.91+dfsg1/ncat/ncat_main.c:797:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(srcaddr.un.sun_path, source, sizeof(srcaddr.un.sun_path));
data/nmap-7.91+dfsg1/ncat/ncat_main.c:847:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(targetaddrs->addr.un.sun_path, argv[optind], sizeof(targetaddrs->addr.un.sun_path));
data/nmap-7.91+dfsg1/ncat/ncat_main.c:874: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 (strspn(argv[optind], "0123456789") != strlen(argv[optind])) {
data/nmap-7.91+dfsg1/ncat/ncat_posix.c:230:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n_r = read(child_stdout[0], buf, sizeof(buf));
data/nmap-7.91+dfsg1/ncat/ncat_posix.c:289:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cur_arg = (char *) Calloc(sizeof(char), strlen(cmdexec) + 1);
data/nmap-7.91+dfsg1/ncat/ncat_proxy.c:84:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return fdinfo_send(fdn, s, strlen(s));
data/nmap-7.91+dfsg1/ncat/ncat_proxy.c:807:59:  [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).
        expected = b64enc((unsigned char *) o.proxy_auth, strlen(o.proxy_auth));
data/nmap-7.91+dfsg1/ncat/ncat_ssl.c:222: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).
        return len == strlen(h) + (p - pattern) && strcmp(p, h) == 0;
data/nmap-7.91+dfsg1/ncat/ncat_ssl.c:227: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).
        return len == strlen(hostname) && strcmp(pattern, hostname) == 0;
data/nmap-7.91+dfsg1/ncat/ncat_win.c:102: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).
    offset = strlen(bundlename);
data/nmap-7.91+dfsg1/ncat/sys_wrap.c:131:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(fd, buf, count);
data/nmap-7.91+dfsg1/ncat/util.c:232: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).
    return strbuf_append(buf, size, offset, s, strlen(s));
data/nmap-7.91+dfsg1/ncat/util.c:738: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(in);
data/nmap-7.91+dfsg1/ncat/util.c:742: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).
    out = (unsigned char *)safe_malloc(strlen(in) + 1);
data/nmap-7.91+dfsg1/nmap.cc:816:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          o.extra_payload_length = strlen(optarg);
data/nmap-7.91+dfsg1/nmap.cc:911: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).
          if (strlen(o.idleProxy) > FQDN_LEN) {
data/nmap-7.91+dfsg1/nmap.cc:1702:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(p) > 4)
data/nmap-7.91+dfsg1/nmap.cc:2374:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  strncpy(nmap_arg_buffer, "nmap --append-output ", sizeof(nmap_arg_buffer));
data/nmap-7.91+dfsg1/nmap.cc:2384:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if (sizeof(nmap_arg_buffer) < strlen(unescaped) + 1)
data/nmap-7.91+dfsg1/nmap.cc:2386: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).
     memcpy(nmap_arg_buffer, unescaped, strlen(unescaped) + 1);
data/nmap-7.91+dfsg1/nmap_dns.cc:1023:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  has_backslash = (windows_dir[strlen(windows_dir)-1] == '\\');
data/nmap-7.91+dfsg1/nmap_ftp.cc:93:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(ftp->pass, s, 255);
data/nmap-7.91+dfsg1/nmap_ftp.cc:99:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ftp->user, p, 63);
data/nmap-7.91+dfsg1/nmap_ftp.cc:110:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ftp->server_name, q, FQDN_LEN+1);
data/nmap-7.91+dfsg1/nmap_ftp.cc:153: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).
  send(sd, command, strlen(command), 0);
data/nmap-7.91+dfsg1/nmap_ftp.cc:173: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).
  send(sd, command, strlen(command), 0);
data/nmap-7.91+dfsg1/nmap_ftp.cc:241: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).
    if (send(sd, command, strlen(command), 0) < 0 ) {
data/nmap-7.91+dfsg1/nmap_tty.cc:153:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                numChars = read(tty_fd, &c, 1);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:392: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).
            if( ((strlen(optarg)+1)%4)  !=0 )
data/nmap-7.91+dfsg1/nping/ArgParser.cc:395: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).
            for( size_t f=0; f< strlen(optarg); f+=4 ){
data/nmap-7.91+dfsg1/nping/ArgParser.cc:420:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if( strlen(optarg) == 3 ){
data/nmap-7.91+dfsg1/nping/ArgParser.cc:435: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).
            }else if( strlen(optarg) == 0 ){
data/nmap-7.91+dfsg1/nping/ArgParser.cc:443: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).
                for(size_t f=0; f<strlen(optarg); f++){
data/nmap-7.91+dfsg1/nping/ArgParser.cc:812: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).
        int plen=strlen(optarg);  
data/nmap-7.91+dfsg1/nping/ArgParser.cc:819: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).
             plen=strlen((char*)auxbuff);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1008: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).
        if(strlen(optarg)==0)
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1269:8:  [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(str);
data/nmap-7.91+dfsg1/nping/ArgParser.cc:1272: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).
  if ( len < strlen("a,1") )
data/nmap-7.91+dfsg1/nping/EchoHeader.cc:848:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)this->data_error->errmsg, err, ERROR_MSG_LEN);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:257: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).
  size_t plen=strlen(passphrase);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:275:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(key_type_id, "NEPkeyforMACServer2ClientInitial", 128);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:278:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(key_type_id, "NEPkeyforMACServer2Client", 128);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:281:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(key_type_id, "NEPkeyforMACClient2Server", 128);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:284:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(key_type_id, "NEPkeyforCiphertextClient2Server", 128);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:287:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(key_type_id, "NEPkeyforCiphertextServer2Client", 128);
data/nmap-7.91+dfsg1/nping/NEPContext.cc:295: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).
  memcpy(data+len, key_type_id, strlen(key_type_id));
data/nmap-7.91+dfsg1/nping/NEPContext.cc:296:8:  [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(key_type_id);
data/nmap-7.91+dfsg1/nping/NpingOps.cc:2194:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(this->echo_passphrase, str, sizeof(echo_passphrase)-1);
data/nmap-7.91+dfsg1/nping/NpingTargets.cc:168:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(hname, specs[ current_spec ], hlen);  
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:726:75:  [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 (setsockopt(rawfd, SOL_SOCKET, SO_BINDTODEVICE, o.getDevice(), strlen(o.getDevice())+1) == -1) {
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1279:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filterstring, buffer, sizeof(filterstring)-1);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1281:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
        strncpy(filterstring, "", 2);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1343: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).
    buffer=filterstring+strlen(filterstring);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1349:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        Snprintf(buffer, 1024-strlen(filterstring), "(tcp and dst port %d) ", o.getSourcePort());
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1353:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        Snprintf(buffer, 1024-strlen(filterstring), "(udp and dst port %d) ", o.getSourcePort());
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1399: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).
            Snprintf(buffer, 1024-strlen(filterstring), "(icmp and icmp[icmptype] = %d) ", icmp_recv_type);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1405: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).
            Snprintf(buffer, 1024-strlen(filterstring), "(icmp and icmp[icmptype] != %d) ", icmp_send_type);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1446:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                Snprintf(buffer, 1024-strlen(filterstring),  "arp and arp[6]==0x00 and (arp[7]==0x%02X or arp[7]==0x%02X)", (u8)arp_recv_type, (u8)OP_DRARP_ERROR);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1448:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                Snprintf(buffer, 1024-strlen(filterstring),  "arp and arp[6]==0x00 and arp[7]==0x%02X", (u8)arp_recv_type);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1451: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).
            Snprintf(buffer, 1024-strlen(filterstring),  "arp and arp[6]==0x00 and arp[7]!=0x%02X", (u8)arp_send_type);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1458: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).
    buffer=filterstring+strlen(filterstring);
data/nmap-7.91+dfsg1/nping/ProbeMode.cc:1459: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).
    Snprintf(buffer, 1024-strlen(filterstring), "or (icmp and (icmp[icmptype] = %d or icmp[icmptype] = %d or icmp[icmptype] = %d or icmp[icmptype] = %d or icmp[icmptype] = %d)) )" ,
data/nmap-7.91+dfsg1/nping/utils.cc:151: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).
  if(strlen(str) == 0)
data/nmap-7.91+dfsg1/nping/utils.cc:162:8:  [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(str) == 2)
data/nmap-7.91+dfsg1/nping/utils.cc:169:8:  [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(str) == 2)
data/nmap-7.91+dfsg1/nping/utils.cc:172: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(str) && j<1023; i++){
data/nmap-7.91+dfsg1/nping/utils.cc:187: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).
  for(i=0; i<strlen(start); i++){
data/nmap-7.91+dfsg1/nping/utils.cc:192:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( strlen(start)%2 != 0 )
data/nmap-7.91+dfsg1/nping/utils.cc:196:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for(i=0, j=0; j<dstlen && i<strlen(start)-1; i+=2){
data/nmap-7.91+dfsg1/nping/utils.cc:242:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return equal;
data/nmap-7.91+dfsg1/nping/utils.cc:244:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal;  
data/nmap-7.91+dfsg1/nping/utils_net.cc:109:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buffer, aux, 23);
data/nmap-7.91+dfsg1/nping/utils_net.cc:400:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)dstbuff, b, dstlen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:487:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( dev,  rnfo.ii.devname, 16 );
data/nmap-7.91+dfsg1/nping/utils_net.cc:508:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( dev,  rnfo.ii.devname, 16 );
data/nmap-7.91+dfsg1/nping/utils_net.cc:561:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(archive[current_index].hostname, host, MAX_CACHED_HOSTNAME_LEN);
data/nmap-7.91+dfsg1/nping/utils_net.cc:653:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(archive[current_index].hostname, host, MAX_CACHED_HOSTNAME_LEN);
data/nmap-7.91+dfsg1/nping/utils_net.cc:784:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( strlen(txt)!=17 )
data/nmap-7.91+dfsg1/nping/utils_net.cc:841: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).
    sprintf(protoinfo+strlen(protoinfo),"Tell %s", IPtoa(*sIP) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:845: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).
    sprintf(protoinfo+strlen(protoinfo),"is at %s", MACtoa(sMAC) );
data/nmap-7.91+dfsg1/nping/utils_net.cc:879:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char*)dstbuff, b, dstlen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:952:5:  [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(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/nping/utils_net.cc:952:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(tcpinfo, buf, sizeof(tcpinfo) - strlen(tcpinfo) - 1);
data/nmap-7.91+dfsg1/nping/utils_net.cc:997:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char*)dstbuff, protoinfo, dstlen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1069:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char*)dstbuff, protoinfo, dstlen);
data/nmap-7.91+dfsg1/nping/utils_net.cc:1509:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if( strlen(buffer) < strlen("00000000000000000000000000000001 01 80 10 80       lo") ){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1509: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).
    if( strlen(buffer) < strlen("00000000000000000000000000000001 01 80 10 80       lo") ){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1537: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).
    for(i=44; i<strlen(buffer); i++){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1582: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).
    for(i=44, j=0; i<strlen(buffer) && j<DEVNAMELEN-1; i++){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1706:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if( strlen(buffer) < min_len ){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1728: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).
    for(i=140; i<strlen(buffer); i++){
data/nmap-7.91+dfsg1/nping/utils_net.cc:1801: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).
    for(i=140, j=0; i<strlen(buffer) && j<DEVNAMELEN-1; i++){
data/nmap-7.91+dfsg1/nse_dnet.cc:307:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(dev) > 0)
data/nmap-7.91+dfsg1/nse_fs.cc:229:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(path) > MAX_PATH-2)
data/nmap-7.91+dfsg1/nse_libssh2.cc:254:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc = read(sshu->sp[1], data, sizeof(data));
data/nmap-7.91+dfsg1/nse_main.cc:286:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (input[strlen(input) - 1] == '/') {
data/nmap-7.91+dfsg1/nse_pcrelib.cc:90:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(old_locale, setlocale(LC_CTYPE, NULL), 255); /* store the locale */
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:74:5:  [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(enc_key) == 0)
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:78:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	enc_key_loc = (enc_key_loc + 1) % strlen(enc_key);
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:88: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).
		length = strlen(str);
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:178:8:  [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(readfile) == 0)
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:184:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if(strlen(readfile) > 0)
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:186:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				FILE *read;
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:190:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				err = fopen_s(&read, readfile, "rb");
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:202:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					count = fread(buf, 1, 1024, read);
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:206:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						count = fread(buf, 1, 1024, read);
data/nmap-7.91+dfsg1/nselib/data/psexec/nmap_service.c:209:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fclose(read);
data/nmap-7.91+dfsg1/nsock/include/nsock.h:87: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).
                      + strlen((ptr)->sun_path))
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:624:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        buflen = read(iod->sd, buf, sizeof(buf));
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:637:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            buflen = read(iod->sd, buf, sizeof(buf));
data/nmap-7.91+dfsg1/nsock/src/nsock_core.c:1184:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read)
data/nmap-7.91+dfsg1/nsock/src/nsock_proxy.c:355:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncasecmp(proxystr, pspec->prefix, strlen(pspec->prefix)) == 0) {
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:105: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).
    datalen = (int) strlen(data);
data/nmap-7.91+dfsg1/nsock/src/nsock_write.c:143: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).
    datalen = (int)strlen(data);
data/nmap-7.91+dfsg1/osscan.cc:504: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).
  len = strlen(test->name);
data/nmap-7.91+dfsg1/osscan.cc:520: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(av->attribute);
data/nmap-7.91+dfsg1/osscan.cc:528: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(av->value);
data/nmap-7.91+dfsg1/osscan.cc:720: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).
  p = p + strlen(str);
data/nmap-7.91+dfsg1/osscan.cc:904: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).
          q = p + strlen(p);
data/nmap-7.91+dfsg1/osscan2.cc:505:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(timeToSleep);
data/nmap-7.91+dfsg1/osscan2.cc:675:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(timeToSleep);
data/nmap-7.91+dfsg1/osscan2.cc:3351: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).
      p += strlen(p); /* max movement of p is 4 (0xFFFF) */
data/nmap-7.91+dfsg1/osscan2.cc:3360: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).
      p += strlen(p); /* max movement of p is 2 (max WScale value is 0xFF) */
data/nmap-7.91+dfsg1/osscan2.cc:3663:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(1500000); /* Try waiting a little longer just in case it matters */
data/nmap-7.91+dfsg1/output.cc:151:37:  [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 *temp = (char *) safe_malloc(strlen(str) + 1);
data/nmap-7.91+dfsg1/output.cc:871: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).
  int retlen = strlen(str) * 6 + 1;
data/nmap-7.91+dfsg1/output.cc:924: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).
      p += strlen(tbuf);
data/nmap-7.91+dfsg1/output.cc:932:37:  [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 (char *) safe_realloc(ret, strlen(ret) + 1);
data/nmap-7.91+dfsg1/output.cc:1583:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int flen = strlen(familygenerations[familyno]);
data/nmap-7.91+dfsg1/output.cc:1585:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (flen + 2 + strlen(OSR->OSC[classno]->OS_Generation) >=
data/nmap-7.91+dfsg1/output.cc:1589:15:  [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(familygenerations[familyno], "|");
data/nmap-7.91+dfsg1/output.cc:1590:13:  [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(familygenerations[familyno],
data/nmap-7.91+dfsg1/output.cc:1712: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).
  prefixlen = strlen(prefix);
data/nmap-7.91+dfsg1/output.cc:2127:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(&hostname_tbl[i][0], sd.hostname, sizeof(hostname_tbl[i]));
data/nmap-7.91+dfsg1/output.cc:2140:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(&ostype_tbl[i][0], sd.ostype, sizeof(ostype_tbl[i]));
data/nmap-7.91+dfsg1/output.cc:2153:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(&devicetype_tbl[i][0], sd.devicetype, sizeof(devicetype_tbl[i]));
data/nmap-7.91+dfsg1/output.cc:2173:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(&cpe_tbl[i][0], *it, sizeof(cpe_tbl[i]));
data/nmap-7.91+dfsg1/payload.cc:135:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (isspace(c = fgetc(fp)) && c != '\n')
data/nmap-7.91+dfsg1/payload.cc:144:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = fgetc(fp)) != EOF && c != '\n')
data/nmap-7.91+dfsg1/payload.cc:154:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = fgetc(fp)) != EOF && c != '\n' && c != '"') {
data/nmap-7.91+dfsg1/payload.cc:161:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/nmap-7.91+dfsg1/payload.cc:177:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = fgetc(fp)) != EOF && (isalnum(c) || c == ',' || c == '-')) {
data/nmap-7.91+dfsg1/portlist.cc:199: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).
    if (spaceleft < strlen(product)) {
data/nmap-7.91+dfsg1/portlist.cc:200:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, product, spaceleft - 3);  // Leave room for "..."
data/nmap-7.91+dfsg1/portlist.cc:201:7:  [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(dst, "...", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:205:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, product, spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:206: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).
      spaceleft -= strlen(product);
data/nmap-7.91+dfsg1/portlist.cc:213:7:  [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 character.
      strncat(dst, " ", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:217: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).
    if (spaceleft < strlen(version)) {
data/nmap-7.91+dfsg1/portlist.cc:218:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, version, spaceleft - 3);
data/nmap-7.91+dfsg1/portlist.cc:219:7:  [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(dst, "...", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:223:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, version, spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:224: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).
      spaceleft -= strlen(version);
data/nmap-7.91+dfsg1/portlist.cc:231:7:  [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 character.
      strncat(dst, " ", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:235:5:  [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 character.
    strncat(dst, "(", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:236: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 (spaceleft - 2 < strlen(extrainfo)) {
data/nmap-7.91+dfsg1/portlist.cc:237:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, extrainfo, spaceleft - 5);
data/nmap-7.91+dfsg1/portlist.cc:238:7:  [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(dst, "...", spaceleft - 2);
data/nmap-7.91+dfsg1/portlist.cc:242:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(dst, extrainfo, spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:243: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).
      spaceleft -= (strlen(extrainfo) + 2);
data/nmap-7.91+dfsg1/portlist.cc:245:5:  [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 character.
    strncat(dst, ")", spaceleft);
data/nmap-7.91+dfsg1/portlist.cc:295: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).
  slen = strlen(string);
data/nmap-7.91+dfsg1/portlist.cc:522: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).
  len = strlen(id);
data/nmap-7.91+dfsg1/protocols.cc:110:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    res = sscanf(line, "%127s %hu", protocolname, &protno);
data/nmap-7.91+dfsg1/scan_engine_connect.cc:461:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(timeleft * 1000);
data/nmap-7.91+dfsg1/scan_engine_raw.cc:694:11:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
          usleep(50000);
data/nmap-7.91+dfsg1/service_scan.cc:282: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).
    slen = strlen(string);
data/nmap-7.91+dfsg1/service_scan.cc:283: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).
    plen = strlen(prefix);
data/nmap-7.91+dfsg1/service_scan.cc:672: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).
    repllen = strlen(repl);
data/nmap-7.91+dfsg1/service_scan.cc:904: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).
      newlen = strlen(subst);
data/nmap-7.91+dfsg1/service_scan.cc:1657:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int spaceneeded = respused * 5 + strlen(probeName) + 128;
data/nmap-7.91+dfsg1/services.cc:174:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    res = sscanf(line, "%127s %hu/%15s %31s", servicename, &portno, proto, ratio_str);
data/nmap-7.91+dfsg1/targets.cc:332:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      expr_string = new_targets->read().c_str();
data/nmap-7.91+dfsg1/tcpip.cc:1180:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sourcehost, inet_ntoa(bullshit), 16);
data/nmap-7.91+dfsg1/tcpip.cc:1256:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sourcehost, inet_ntoa(bullshit), 16);
data/nmap-7.91+dfsg1/timing.cc:198:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep((o.scan_delay - time_diff) * 1000);
data/nmap-7.91+dfsg1/utils.cc:136: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(string);
data/nmap-7.91+dfsg1/utils.cc:452: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).
  if(strlen(str) == 0)
data/nmap-7.91+dfsg1/utils.cc:463:8:  [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(str) == 2)
data/nmap-7.91+dfsg1/utils.cc:470:8:  [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(str) == 2)
data/nmap-7.91+dfsg1/utils.cc:473: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(str) && j<4095; i++) {
data/nmap-7.91+dfsg1/utils.cc:488: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).
  for(i=0; i<strlen(start); i++) {
data/nmap-7.91+dfsg1/utils.cc:493:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( strlen(start)%2 != 0 )
data/nmap-7.91+dfsg1/utils.cc:497:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for(i=0, j=0; j<dstlen && i<strlen(start)-1; i+=2) {
data/nmap-7.91+dfsg1/utils.cc:515:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strncmp(cpe, PREFIX, strlen(PREFIX)) != 0)
data/nmap-7.91+dfsg1/utils.cc:519: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).
  part = cpe[strlen(PREFIX)];
data/nmap-7.91+dfsg1/xml.cc:189: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(repl);
data/nmap-7.91+dfsg1/xml.cc:248: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(repl);

ANALYSIS SUMMARY:

Hits = 1940
Lines analyzed = 186720 in approximately 7.78 seconds (24009 lines/second)
Physical Source Lines of Code (SLOC) = 120630
Hits@level = [0] 436 [1] 458 [2] 1311 [3]  29 [4] 139 [5]   3
Hits@level+ = [0+] 2376 [1+] 1940 [2+] 1482 [3+] 171 [4+] 142 [5+]   3
Hits/KSLOC@level+ = [0+] 19.6966 [1+] 16.0822 [2+] 12.2855 [3+] 1.41756 [4+] 1.17715 [5+] 0.0248694
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.