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/guessnet-0.56/src/options.cc Examining data/guessnet-0.56/src/options.h Examining data/guessnet-0.56/src/nettypes.h Examining data/guessnet-0.56/src/parser.h Examining data/guessnet-0.56/src/GuessnetParser.cc Examining data/guessnet-0.56/src/util/output.h Examining data/guessnet-0.56/src/util/netwatcher.cc Examining data/guessnet-0.56/src/util/packetmaker.cc Examining data/guessnet-0.56/src/util/netsender.cc Examining data/guessnet-0.56/src/util/processrunner.h Examining data/guessnet-0.56/src/util/starter.h Examining data/guessnet-0.56/src/util/netsender.h Examining data/guessnet-0.56/src/util/output.cc Examining data/guessnet-0.56/src/util/processrunner.cc Examining data/guessnet-0.56/src/util/processrunner-tut.cc Examining data/guessnet-0.56/src/util/packetmaker.h Examining data/guessnet-0.56/src/util/starter-tut.cc Examining data/guessnet-0.56/src/util/netwatcher.h Examining data/guessnet-0.56/src/util/starter.cc Examining data/guessnet-0.56/src/runner/main.cc Examining data/guessnet-0.56/src/runner/fake.cc Examining data/guessnet-0.56/src/runner/runner.cc Examining data/guessnet-0.56/src/runner/main.h Examining data/guessnet-0.56/src/runner/fake.h Examining data/guessnet-0.56/src/runner/runner.h Examining data/guessnet-0.56/src/ethtool-local.h Examining data/guessnet-0.56/src/nettypes.cc Examining data/guessnet-0.56/src/GuessnetParser.h Examining data/guessnet-0.56/src/guessnet-scan.cc Examining data/guessnet-0.56/src/ethtool-kernel.h Examining data/guessnet-0.56/src/IFace.h Examining data/guessnet-0.56/src/testscan.cc Examining data/guessnet-0.56/src/IfaceParser.cc Examining data/guessnet-0.56/src/IfaceParser.h Examining data/guessnet-0.56/src/parser.cc Examining data/guessnet-0.56/src/scanner/scanbag-tut.cc Examining data/guessnet-0.56/src/scanner/scanbag.h Examining data/guessnet-0.56/src/scanner/script.cc Examining data/guessnet-0.56/src/scanner/scan.cc Examining data/guessnet-0.56/src/scanner/peer.h Examining data/guessnet-0.56/src/scanner/linkbeat.cc Examining data/guessnet-0.56/src/scanner/iwscan.cc Examining data/guessnet-0.56/src/scanner/TrafficScanner.h Examining data/guessnet-0.56/src/scanner/scanbag.cc Examining data/guessnet-0.56/src/scanner/TrafficScanner.cc Examining data/guessnet-0.56/src/scanner/dhcp.h Examining data/guessnet-0.56/src/scanner/script.h Examining data/guessnet-0.56/src/scanner/iwscan.h Examining data/guessnet-0.56/src/scanner/linkbeat.h Examining data/guessnet-0.56/src/scanner/scan.h Examining data/guessnet-0.56/src/scanner/peer.cc Examining data/guessnet-0.56/src/scanner/dhcp.cc Examining data/guessnet-0.56/src/IFace.cc Examining data/guessnet-0.56/src/tests/test-utils.h Examining data/guessnet-0.56/src/tests/tut-main.cpp Examining data/guessnet-0.56/src/guessnet.cc Examining data/guessnet-0.56/tests/test-netwatcher.cc Examining data/guessnet-0.56/tests/test-utils.h Examining data/guessnet-0.56/tests/test-netsender.cc Examining data/guessnet-0.56/tests/test-iface.cc Examining data/guessnet-0.56/tests/test-processrunner.cc Examining data/guessnet-0.56/tests/tut-main.cpp FINAL RESULTS: data/guessnet-0.56/src/IfaceParser.cc:152:27: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. util::Output::get().syslog(val == "true"); data/guessnet-0.56/src/options.cc:56:14: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. BoolOption* syslog; data/guessnet-0.56/src/options.cc:130:22: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. util::Output::get().syslog(opts.syslog->boolValue()); data/guessnet-0.56/src/util/output.cc:57:2: [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/guessnet-0.56/src/util/output.cc:58:20: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if (Output::get().syslog()) data/guessnet-0.56/src/util/output.cc:74:2: [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/guessnet-0.56/src/util/output.cc:75:20: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if (Output::get().syslog()) data/guessnet-0.56/src/util/output.cc:89:2: [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/guessnet-0.56/src/util/output.cc:90:20: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if (Output::get().syslog()) data/guessnet-0.56/src/util/output.cc:104:2: [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, fmt, ap); data/guessnet-0.56/src/util/output.cc:117: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/guessnet-0.56/src/util/output.cc:118:21: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if (Output::get().syslog()) data/guessnet-0.56/src/util/output.cc:136: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/guessnet-0.56/src/util/output.cc:137:21: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if (Output::get().syslog()) data/guessnet-0.56/src/util/output.h:56:7: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. bool syslog() const throw () { return _syslog; } data/guessnet-0.56/src/util/output.h:57:7: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. bool syslog(bool syslog) throw () data/guessnet-0.56/src/util/output.h:57:19: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. bool syslog(bool syslog) throw () data/guessnet-0.56/src/util/output.h:61:22: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. return _syslog = syslog; data/guessnet-0.56/src/util/output.h:71:61: [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. #define ATTR_PRINTF(string, first) __attribute__((format (printf, string, first))) data/guessnet-0.56/tests/test-iface.cc:26:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("ifconfig eth0 down"); data/guessnet-0.56/tests/test-iface.cc:35:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("ifconfig"); data/guessnet-0.56/src/GuessnetParser.cc:203:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (open != args.end()) data/guessnet-0.56/src/IFace.cc:147: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]; data/guessnet-0.56/src/IFace.cc:153:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(f = fopen("/proc/net/wireless", "r"))) data/guessnet-0.56/src/IFace.cc:174: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). q = atoi(bp); data/guessnet-0.56/src/IFace.cc:249: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(mac, &(req.u.ap_addr.sa_data), ETH_ALEN); data/guessnet-0.56/src/IFace.cc:358: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(&(_ifr->ifr_##field), &(ifp.field), sizeof(struct sockaddr)); \ data/guessnet-0.56/src/IFace.cc:388: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(_ifr->ifr_name, name.data(), sz); data/guessnet-0.56/src/IfaceParser.cc:156:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(val.c_str()); data/guessnet-0.56/src/IfaceParser.cc:162:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(val.c_str()); data/guessnet-0.56/src/IfaceParser.cc:172:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(val.c_str()); data/guessnet-0.56/src/IfaceParser.cc:178:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(val.c_str()); data/guessnet-0.56/src/IfaceParser.cc:305: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). FILE * f = fopen(w[i], "r"); data/guessnet-0.56/src/IfaceParser.cc:481: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). if (open != args.end()) data/guessnet-0.56/src/ethtool-kernel.h: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 driver[32]; /* driver short name, "tulip", "eepro100" */ data/guessnet-0.56/src/ethtool-kernel.h:37: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 version[32]; /* driver version string */ data/guessnet-0.56/src/ethtool-kernel.h:38: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_version[32]; /* firmware version string, if applicable */ data/guessnet-0.56/src/ethtool-kernel.h:39: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 bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ data/guessnet-0.56/src/ethtool-kernel.h:41: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 reserved1[32]; data/guessnet-0.56/src/ethtool-kernel.h:42: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 reserved2[20]; data/guessnet-0.56/src/guessnet-scan.cc:108:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ipfmt[4]; data/guessnet-0.56/src/guessnet-scan.cc:109: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(ipfmt, &ip, 4); data/guessnet-0.56/src/guessnet-scan.cc:117: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 macfmt[6]; data/guessnet-0.56/src/guessnet-scan.cc:118: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(macfmt, &mac, 6); data/guessnet-0.56/src/nettypes.h:45:35: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define IPv4_COPY(target, source) memcpy(target, source, 4) data/guessnet-0.56/src/nettypes.h:46:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define IPv4_FROM_ARP(target, source) memcpy(target, source, 4) data/guessnet-0.56/src/nettypes.h:48:34: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MAC_COPY(target, source) memcpy(target, source, 6) data/guessnet-0.56/src/nettypes.h:49:38: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MAC_FROM_ARP(target, source) memcpy(target, source, 6) data/guessnet-0.56/src/options.cc:220: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). input = fopen(config_file.c_str(), "rt"); data/guessnet-0.56/src/options.cc:234: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). FILE* input = fopen(config_file.c_str(), "rt");; data/guessnet-0.56/src/runner/fake.cc:83:13: [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* in = fopen("/dev/tty", "rt"); data/guessnet-0.56/src/scanner/TrafficScanner.cc:107: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(&ipkey, arp_get_sip(arp_header), 4); data/guessnet-0.56/src/scanner/TrafficScanner.cc:110: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(&mkey, arp_get_sha(arp_header), 6); data/guessnet-0.56/src/scanner/TrafficScanner.cc:130: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(&msrc, &(eth_header->ether_shost), 6); data/guessnet-0.56/src/scanner/TrafficScanner.cc:131: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(&mdst, &(eth_header->ether_dhost), 6); data/guessnet-0.56/src/scanner/TrafficScanner.cc:132: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(&isrc, &(ip_header->ip_src), 4); data/guessnet-0.56/src/scanner/TrafficScanner.cc:133: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(&idst, &(ip_header->ip_dst), 4); data/guessnet-0.56/src/scanner/TrafficScanner.cc:254:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ether_broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; data/guessnet-0.56/src/scanner/TrafficScanner.cc:255:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ether_no_addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; data/guessnet-0.56/src/scanner/TrafficScanner.cc:256:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ip_no_addr[4] = {0x00, 0x00, 0x00, 0x00}; data/guessnet-0.56/src/scanner/iwscan.cc:65: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). res += (open() ? "open" : "closed"); data/guessnet-0.56/src/scanner/iwscan.cc:125: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() && !isOpen) data/guessnet-0.56/src/scanner/iwscan.cc:130: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). if (!open() && isOpen) data/guessnet-0.56/src/scanner/iwscan.cc:135:65: [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). debug("Testing %s: %s network passed\n", signature().c_str(), open() ? "open" : "closed"); data/guessnet-0.56/src/scanner/iwscan.h:57: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). bool open() const { return _open; } data/guessnet-0.56/src/scanner/iwscan.h:61: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). void setOpen(bool open) { _hasOpen = true; _open = open; } data/guessnet-0.56/src/scanner/iwscan.h:61:53: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void setOpen(bool open) { _hasOpen = true; _open = open; } data/guessnet-0.56/src/tests/tut-main.cpp:63:44: [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). tut::runner.get().run_test(argv[1],::atoi(argv[2])); data/guessnet-0.56/src/util/netsender.h:104: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 ln_errbuf[LIBNET_ERRBUF_SIZE]; data/guessnet-0.56/src/util/netwatcher.cc:86: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/guessnet-0.56/src/util/packetmaker.cc:37:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ether_broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; data/guessnet-0.56/src/util/packetmaker.cc:141:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ether_broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; data/guessnet-0.56/src/util/packetmaker.cc:174:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(options + i, options_req, sizeof(options_req)); // data data/guessnet-0.56/tests/test-netsender.cc:68: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 ln_errbuf[LIBNET_ERRBUF_SIZE]; data/guessnet-0.56/tests/test-utils.h:17:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/guessnet-0.56/tests/tut-main.cpp:64:44: [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). tut::runner.get().run_test(argv[1],::atoi(argv[2])); data/guessnet-0.56/src/GuessnetParser.cc:102:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(input)) != EOF) data/guessnet-0.56/src/IFace.cc:95:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1); data/guessnet-0.56/src/IFace.cc:113:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1); data/guessnet-0.56/src/IFace.cc:132:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1); data/guessnet-0.56/src/IFace.cc:151: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). l = strlen(iface); data/guessnet-0.56/src/IFace.cc:194:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); data/guessnet-0.56/src/IFace.cc:204:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); data/guessnet-0.56/src/IFace.cc:244:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); data/guessnet-0.56/src/IFace.cc:551:4: [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/guessnet-0.56/src/IfaceParser.cc:118:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(in)) != EOF) data/guessnet-0.56/src/IfaceParser.cc:270:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(input)) != EOF) data/guessnet-0.56/src/util/processrunner-tut.cc:99: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(100000); ANALYSIS SUMMARY: Hits = 88 Lines analyzed = 8744 in approximately 0.25 seconds (35000 lines/second) Physical Source Lines of Code (SLOC) = 5363 Hits@level = [0] 35 [1] 12 [2] 55 [3] 0 [4] 21 [5] 0 Hits@level+ = [0+] 123 [1+] 88 [2+] 76 [3+] 21 [4+] 21 [5+] 0 Hits/KSLOC@level+ = [0+] 22.9349 [1+] 16.4087 [2+] 14.1712 [3+] 3.91572 [4+] 3.91572 [5+] 0 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.