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/soapyhackrf-0.3.3/HackRF_Registation.cpp Examining data/soapyhackrf-0.3.3/HackRF_Session.cpp Examining data/soapyhackrf-0.3.3/HackRF_Settings.cpp Examining data/soapyhackrf-0.3.3/HackRF_Streaming.cpp Examining data/soapyhackrf-0.3.3/SoapyHackRF.hpp FINAL RESULTS: data/soapyhackrf-0.3.3/HackRF_Registation.cpp:80:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(label_str, "%s #%d %s", options["device"].c_str(), i, serial_str+ofs); data/soapyhackrf-0.3.3/HackRF_Registation.cpp:56: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 version_str[100]; data/soapyhackrf-0.3.3/HackRF_Registation.cpp:64: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 part_id_str[100]; data/soapyhackrf-0.3.3/HackRF_Registation.cpp:66: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(part_id_str, "%08x%08x", read_partid_serialno.part_id[0], read_partid_serialno.part_id[1]); data/soapyhackrf-0.3.3/HackRF_Registation.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 serial_str[100]; data/soapyhackrf-0.3.3/HackRF_Registation.cpp:71: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(serial_str, "%08x%08x%08x%08x", read_partid_serialno.serial_no[0], data/soapyhackrf-0.3.3/HackRF_Registation.cpp:79: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 label_str[100]; data/soapyhackrf-0.3.3/HackRF_Settings.cpp:123: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_str[100]; data/soapyhackrf-0.3.3/HackRF_Settings.cpp:133: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 part_id_str[100]; data/soapyhackrf-0.3.3/HackRF_Settings.cpp:135:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(part_id_str, "%08x%08x", read_partid_serialno.part_id[0], read_partid_serialno.part_id[1]); data/soapyhackrf-0.3.3/HackRF_Settings.cpp:139: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 serial_str[100]; data/soapyhackrf-0.3.3/HackRF_Settings.cpp:140:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(serial_str, "%08x%08x%08x%08x", read_partid_serialno.serial_no[0], read_partid_serialno.serial_no[1], read_partid_serialno.serial_no[2], read_partid_serialno.serial_no[3]); data/soapyhackrf-0.3.3/HackRF_Streaming.cpp:48: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(_rx_stream.buf[_rx_stream.buf_tail], buffer, length ); data/soapyhackrf-0.3.3/HackRF_Streaming.cpp:71: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, _tx_stream.buf[_tx_stream.buf_tail], length ); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 2129 in approximately 0.05 seconds (38719 lines/second) Physical Source Lines of Code (SLOC) = 1429 Hits@level = [0] 0 [1] 0 [2] 13 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 14 [1+] 14 [2+] 14 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 9.79706 [1+] 9.79706 [2+] 9.79706 [3+] 0.69979 [4+] 0.69979 [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.