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/soapyremote-0.5.2/client/ClientStreamData.cpp Examining data/soapyremote-0.5.2/client/ClientStreamData.hpp Examining data/soapyremote-0.5.2/client/DiscoverServers.cpp Examining data/soapyremote-0.5.2/client/LogAcceptor.cpp Examining data/soapyremote-0.5.2/client/LogAcceptor.hpp Examining data/soapyremote-0.5.2/client/Registration.cpp Examining data/soapyremote-0.5.2/client/Settings.cpp Examining data/soapyremote-0.5.2/client/SoapyClient.hpp Examining data/soapyremote-0.5.2/client/Streaming.cpp Examining data/soapyremote-0.5.2/common/SoapyHTTPUtils.cpp Examining data/soapyremote-0.5.2/common/SoapyHTTPUtils.hpp Examining data/soapyremote-0.5.2/common/SoapyIfAddrs.cpp Examining data/soapyremote-0.5.2/common/SoapyIfAddrs.hpp Examining data/soapyremote-0.5.2/common/SoapyIfAddrsUnix.cpp Examining data/soapyremote-0.5.2/common/SoapyIfAddrsWindows.cpp Examining data/soapyremote-0.5.2/common/SoapyInfoUtils.hpp Examining data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp Examining data/soapyremote-0.5.2/common/SoapyMDNSEndpoint.hpp Examining data/soapyremote-0.5.2/common/SoapyMDNSEndpointApple.cpp Examining data/soapyremote-0.5.2/common/SoapyMDNSEndpointAvahi.cpp Examining data/soapyremote-0.5.2/common/SoapyMDNSEndpointNone.cpp Examining data/soapyremote-0.5.2/common/SoapyRPCPacker.cpp Examining data/soapyremote-0.5.2/common/SoapyRPCPacker.hpp Examining data/soapyremote-0.5.2/common/SoapyRPCSocket.cpp Examining data/soapyremote-0.5.2/common/SoapyRPCSocket.hpp Examining data/soapyremote-0.5.2/common/SoapyRPCUnpacker.cpp Examining data/soapyremote-0.5.2/common/SoapyRPCUnpacker.hpp Examining data/soapyremote-0.5.2/common/SoapyRemoteConfig.hpp Examining data/soapyremote-0.5.2/common/SoapyRemoteDefs.hpp Examining data/soapyremote-0.5.2/common/SoapySSDPEndpoint.cpp Examining data/soapyremote-0.5.2/common/SoapySSDPEndpoint.hpp Examining data/soapyremote-0.5.2/common/SoapySocketDefs.in.hpp Examining data/soapyremote-0.5.2/common/SoapyStreamEndpoint.cpp Examining data/soapyremote-0.5.2/common/SoapyStreamEndpoint.hpp Examining data/soapyremote-0.5.2/common/SoapyURLUtils.cpp Examining data/soapyremote-0.5.2/common/SoapyURLUtils.hpp Examining data/soapyremote-0.5.2/server/ClientHandler.cpp Examining data/soapyremote-0.5.2/server/ClientHandler.hpp Examining data/soapyremote-0.5.2/server/LogForwarding.cpp Examining data/soapyremote-0.5.2/server/LogForwarding.hpp Examining data/soapyremote-0.5.2/server/ServerListener.cpp Examining data/soapyremote-0.5.2/server/ServerStreamData.cpp Examining data/soapyremote-0.5.2/server/ServerStreamData.hpp Examining data/soapyremote-0.5.2/server/SoapyServer.cpp Examining data/soapyremote-0.5.2/server/SoapyServer.hpp Examining data/soapyremote-0.5.2/server/ThreadPrioHelper.hpp Examining data/soapyremote-0.5.2/server/ThreadPrioUnix.cpp Examining data/soapyremote-0.5.2/server/ThreadPrioWindows.cpp Examining data/soapyremote-0.5.2/server/msvc/getopt.h FINAL RESULTS: data/soapyremote-0.5.2/server/msvc/getopt.h:98:11: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr,fmt,ap); data/soapyremote-0.5.2/server/msvc/getopt.h:174:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt(int nargc, char * const *nargv, const char *options) data/soapyremote-0.5.2/server/msvc/getopt.h:396:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); data/soapyremote-0.5.2/server/msvc/getopt.h:568:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long(int nargc, char * const *nargv, const char *options, data/soapyremote-0.5.2/client/ClientStreamData.cpp:37: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. std::memcpy(buffs[i], recvBuffs[i], numElems*elemSize); data/soapyremote-0.5.2/client/ClientStreamData.cpp:171: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. std::memcpy(sendBuffs[i], buffs[i], numElems*elemSize); data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:15: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 szVolName[MAX_PATH]; data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:16: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 szFileSysName[80]; data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:32: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 hostnameBuff[128]; data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:54: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 bytes[16]; data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:73: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 buff[37]; data/soapyremote-0.5.2/common/SoapyInfoUtils.in.cpp:74:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. const int ret = sprintf(buff, data/soapyremote-0.5.2/common/SoapyMDNSEndpointApple.cpp:77: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 fullname[kDNSServiceMaxDomainName]; data/soapyremote-0.5.2/common/SoapyMDNSEndpointApple.cpp:105: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). htons(atoi(service.c_str())), data/soapyremote-0.5.2/common/SoapyMDNSEndpointApple.cpp:202: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 fullname[kDNSServiceMaxDomainName]; data/soapyremote-0.5.2/common/SoapyMDNSEndpointAvahi.cpp:212:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(service.c_str()), data/soapyremote-0.5.2/common/SoapyMDNSEndpointAvahi.cpp:298: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 addrStr[AVAHI_ADDRESS_STR_MAX]; data/soapyremote-0.5.2/common/SoapyRPCPacker.cpp:74: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. std::memcpy(_message+_size, buff, length); data/soapyremote-0.5.2/common/SoapyRPCSocket.cpp:510: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 buff[1024]; data/soapyremote-0.5.2/common/SoapyRPCUnpacker.cpp:142: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. std::memcpy(buff, this->unpack(length), length); data/soapyremote-0.5.2/common/SoapySSDPEndpoint.cpp:70:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[128]; data/soapyremote-0.5.2/common/SoapySSDPEndpoint.cpp:250: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 recvBuff[SOAPY_REMOTE_DEFAULT_ENDPOINT_MTU]; data/soapyremote-0.5.2/common/SoapyURLUtils.cpp:18: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. std::memcpy(_storage.data(), addr, addrlen); data/soapyremote-0.5.2/server/msvc/getopt.h:159: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 **) nargv)[pos] = nargv[cstart]; data/soapyremote-0.5.2/server/msvc/getopt.h:161: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 **)nargv)[cstart] = swap; data/soapyremote-0.5.2/server/msvc/getopt.h:266: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). current_argv_len = strlen(current_argv); data/soapyremote-0.5.2/server/msvc/getopt.h:274: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(long_options[i].name) == current_argv_len) { ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 10752 in approximately 0.24 seconds (45423 lines/second) Physical Source Lines of Code (SLOC) = 7724 Hits@level = [0] 23 [1] 2 [2] 21 [3] 3 [4] 1 [5] 0 Hits@level+ = [0+] 50 [1+] 27 [2+] 25 [3+] 4 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 6.47333 [1+] 3.4956 [2+] 3.23666 [3+] 0.517866 [4+] 0.129467 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.