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/gr-osmosdr-0.2.2/include/osmosdr/api.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/device.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/pimpl.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/ranges.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/sink.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/source.h Examining data/gr-osmosdr-0.2.2/include/osmosdr/time_spec.h Examining data/gr-osmosdr-0.2.2/lib/airspy/airspy_fir_kernels.h Examining data/gr-osmosdr-0.2.2/lib/airspy/airspy_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/airspy/airspy_source_c.h Examining data/gr-osmosdr-0.2.2/lib/airspyhf/airspyhf_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/airspyhf/airspyhf_source_c.h Examining data/gr-osmosdr-0.2.2/lib/arg_helpers.h Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.cc Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.h Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_compat.h Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_source_c.h Examining data/gr-osmosdr-0.2.2/lib/device.cc Examining data/gr-osmosdr-0.2.2/lib/fcd/fcd_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/fcd/fcd_source_c.h Examining data/gr-osmosdr-0.2.2/lib/file/file_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/file/file_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/file/file_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/file/file_source_c.h Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_common.cc Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_common.h Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_source_c.h Examining data/gr-osmosdr-0.2.2/lib/freesrp/readerwriterqueue/atomicops.h Examining data/gr-osmosdr-0.2.2/lib/freesrp/readerwriterqueue/readerwriterqueue.h Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_common.cc Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_common.h Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_source_c.h Examining data/gr-osmosdr-0.2.2/lib/miri/miri_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/miri/miri_source_c.h Examining data/gr-osmosdr-0.2.2/lib/osmosdr/osmosdr_src_c.cc Examining data/gr-osmosdr-0.2.2/lib/osmosdr/osmosdr_src_c.h Examining data/gr-osmosdr-0.2.2/lib/ranges.cc Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_common.cc Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_common.h Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/redpitaya/redpitaya_source_c.h Examining data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.h Examining data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.h Examining data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_c.h Examining data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_f.cc Examining data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_f.h Examining data/gr-osmosdr-0.2.2/lib/sdrplay/sdrplay_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/sdrplay/sdrplay_source_c.h Examining data/gr-osmosdr-0.2.2/lib/sink_iface.h Examining data/gr-osmosdr-0.2.2/lib/sink_impl.cc Examining data/gr-osmosdr-0.2.2/lib/sink_impl.h Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_common.cc Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_common.h Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/soapy/soapy_source_c.h Examining data/gr-osmosdr-0.2.2/lib/source_iface.h Examining data/gr-osmosdr-0.2.2/lib/source_impl.cc Examining data/gr-osmosdr-0.2.2/lib/source_impl.h Examining data/gr-osmosdr-0.2.2/lib/time_spec.cc Examining data/gr-osmosdr-0.2.2/lib/uhd/uhd_sink_c.cc Examining data/gr-osmosdr-0.2.2/lib/uhd/uhd_sink_c.h Examining data/gr-osmosdr-0.2.2/lib/uhd/uhd_source_c.cc Examining data/gr-osmosdr-0.2.2/lib/uhd/uhd_source_c.h FINAL RESULTS: data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1210:16: [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. if ( readlink( device_driver.c_str(), buffer, sizeof(buffer) ) > 0 ) data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1231:10: [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. if ( readlink( ftdi_sio_devices[i].c_str(), buffer, sizeof(buffer) ) > 0 ) data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:247:12: [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. boost::system::error_code ec; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:981:42: [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. static void handle_receive( const boost::system::error_code& ec, data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:983:36: [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. boost::system::error_code* out_ec, data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:990:40: [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. static void handle_timer( const boost::system::error_code& ec, data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:991:34: [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. boost::system::error_code* out_ec ) data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1002:10: [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. boost::system::error_code ec; data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_common.cc:35:41: [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. string firmware_path = string(getenv("HOME")) + "/.freesrp/fx3.img"; data/gr-osmosdr-0.2.2/lib/freesrp/freesrp_common.cc:55:40: [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. string bitstream_path = string(getenv("HOME")) + "/.freesrp/fpga.bin"; data/gr-osmosdr-0.2.2/lib/airspy/airspy_source_c.cc:110:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[128]; data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.cc:212: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). _dev = open(device_name); data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.cc:706:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *gain_names[max_count]; data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.cc:1075:30: [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). bladerf_sptr bladerf_common::open(std::string const &device_name) data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.cc:1155:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BLADERF_SERIAL_LENGTH]; data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_common.h:276: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). bladerf_sptr open(const std::string &device_name); data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_sink_c.cc:253: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(intl_out++, in[n]++, sizeof(gr_complex)); data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_sink_c.cc:258: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(_32fcbuf, in[0], noutput_items * sizeof(gr_complex)); data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_source_c.cc:339: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[n]++, deint_in++, sizeof(gr_complex)); data/gr-osmosdr-0.2.2/lib/bladerf/bladerf_source_c.cc:344: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[0], _32fcbuf, sizeof(gr_complex) * noutput_items); data/gr-osmosdr-0.2.2/lib/freesrp/readerwriterqueue/readerwriterqueue.h:570:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cachelineFiller0[CACHE_LINE_SIZE - sizeof(weak_atomic<size_t>) - sizeof(size_t)]; data/gr-osmosdr-0.2.2/lib/freesrp/readerwriterqueue/readerwriterqueue.h:574:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cachelineFiller1[CACHE_LINE_SIZE - sizeof(weak_atomic<size_t>) - sizeof(size_t)]; // next isn't very contended, but we don't want it on the same cache line as tail (which is) data/gr-osmosdr-0.2.2/lib/freesrp/readerwriterqueue/readerwriterqueue.h:615: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 cachelineFiller[CACHE_LINE_SIZE - sizeof(weak_atomic<Block*>)]; data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_common.cc:123:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[40]; data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_sink_c.cc:90: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(cb->head, item, cb->sz); data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_sink_c.cc:102: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(item, cb->tail, cb->sz); data/gr-osmosdr-0.2.2/lib/hackrf/hackrf_source_c.cc:149: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[buf_tail], buf, len); data/gr-osmosdr-0.2.2/lib/miri/miri_source_c.cc:191: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[buf_tail], buf, len); data/gr-osmosdr-0.2.2/lib/osmosdr/osmosdr_src_c.cc:185: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[buf_tail], buf, len); data/gr-osmosdr-0.2.2/lib/osmosdr/osmosdr_src_c.cc:270:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:203: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). _usb = open( host.c_str(), O_RDWR | O_NOCTTY ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:253: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). _u.open(udp::v4(), ec); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:311: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((void *)&peer_sa.sin_addr, hp->h_addr_list[0], hp->h_length); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:577: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 data[1024*2]; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:597: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, _resp.data(), rx_bytes ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:631: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( response.data(), data, rx_bytes ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:665:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1024*10]; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:744: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( _resp.data(), data, length + 2 ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:821: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 data[1024*2]; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:952: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 length[2]; /* length of total message in bytes (little endian byte order) */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:953: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 key[2]; /* fixed key key[0]==0x5A key[1]==0xA5 */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:955:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; /* Device name string null terminated */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:956:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sn[16]; /* Serial number string null terminated */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:957: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 ipaddr[16]; /* device IP address (little endian byte order) */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:958: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 port[2]; /* device Port number (little endian byte order) */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1009: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). socket.open(udp::v4(), ec); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1079: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[1024*2]; data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1188:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:97:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char manufact[256]; data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:98:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:99:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:303: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[buf_tail], buf, len); data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:380:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char manufact[256]; data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:381:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:382:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_c.cc:66:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char magic[4]; data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_c.cc:216:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[12]; data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_c.cc:217: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( port_str, "%d", port ); data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_f.cc:39:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char magic[4]; data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_f.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 port_str[12]; data/gr-osmosdr-0.2.2/lib/rtl_tcp/rtl_tcp_source_f.cc:121: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( port_str, "%d", port ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:224:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( read(_usb, &byte, sizeof(byte)) > 0 ); /* flush serial */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:611:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nbytes = read(_tcp, data, 2); /* read header */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:622:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes = read(_tcp, &data[2], length); /* read payload */ data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:649:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nread = read( fd, &data[nbytes], 1 ); data/gr-osmosdr-0.2.2/lib/rfspace/rfspace_source_c.cc:1173:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in.read(&contents[0], contents.size()); data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:129: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(manufact)) data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:131: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(product)) data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:133: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(serial)) data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:393: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(manufact)) data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:395: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(product)) data/gr-osmosdr-0.2.2/lib/rtl/rtl_source_c.cc:397: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(serial)) ANALYSIS SUMMARY: Hits = 72 Lines analyzed = 23884 in approximately 0.63 seconds (38152 lines/second) Physical Source Lines of Code (SLOC) = 15615 Hits@level = [0] 23 [1] 11 [2] 51 [3] 2 [4] 6 [5] 2 Hits@level+ = [0+] 95 [1+] 72 [2+] 61 [3+] 10 [4+] 8 [5+] 2 Hits/KSLOC@level+ = [0+] 6.08389 [1+] 4.61095 [2+] 3.9065 [3+] 0.64041 [4+] 0.512328 [5+] 0.128082 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.