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/airspy-host-1.0.9/airspy-tools/getopt/getopt.c Examining data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_r820t.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_si5351c.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_lib_version.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_info.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_gpio.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_gpiodir.c Examining data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c Examining data/airspy-host-1.0.9/libairspy/src/airspy_commands.h Examining data/airspy-host-1.0.9/libairspy/src/iqconverter_int16.h Examining data/airspy-host-1.0.9/libairspy/src/filters.h Examining data/airspy-host-1.0.9/libairspy/src/iqconverter_float.h Examining data/airspy-host-1.0.9/libairspy/src/iqconverter_int16.c Examining data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c Examining data/airspy-host-1.0.9/libairspy/src/airspy.h Examining data/airspy-host-1.0.9/libairspy/src/airspy.c FINAL RESULTS: data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:57: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/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:57: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/airspy-host-1.0.9/libairspy/src/airspy.c:668:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(serial_number_expected, "%s%08X%08X", data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:210:9: [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. #ifndef getenv data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:215:14: [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. extern char *getenv (); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:401:21: [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"); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:454: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 ( data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:1003: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 (argc, argv, optstring) data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:1033:11: [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. c = getopt (argc, argv, "abc:d:0123456789"); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h:145: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 *const *__argv, const char *__shortopts); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h:147: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 (); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h:151: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 *const *__argv, const char *__shortopts, data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h:164: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 (); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.h:166: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 (); data/airspy-host-1.0.9/airspy-tools/src/airspy_gpio.c:195:16: [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. while( (opt = getopt_long(argc, argv, "p:n:rw:s:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_gpio.c:238:16: [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. while( (opt = getopt_long(argc, argv, "p:n:rw:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_gpiodir.c:186:16: [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. while( (opt = getopt_long(argc, argv, "p:n:rw:s:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_gpiodir.c:229:16: [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. while( (opt = getopt_long(argc, argv, "p:n:rw:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_info.c:91:16: [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. while( (opt = getopt(argc, argv, "s:")) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_r820t.c:197:16: [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. while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_r820t.c:240:16: [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. while( (opt = getopt_long(argc, argv, "cn:rw:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:541:16: [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. while( (opt = getopt(argc, argv, "r:ws:p:f:a:t:b:v:m:l:g:h:n:d")) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_si5351c.c:234:16: [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. while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) data/airspy-host-1.0.9/airspy-tools/src/airspy_si5351c.c:277:16: [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. while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:151:16: [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. while ((opt = getopt_long(argc, argv, "a:l:r:w:s:", long_options, &option_index)) != EOF) data/airspy-host-1.0.9/airspy-tools/src/airspy_info.c:38: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 version[255 + 1]; data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:128: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 groupID[4]; /* 'RIFF' */ data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:130: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 riffType[4]; /* 'WAVE'*/ data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:136: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 chunkID[4]; /* 'fmt ' */ data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:149: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 chunkID[4]; /* 'data' */ data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:190: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[U64TOA_MAX_DIGIT+1]; data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:520: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 path_file[PATH_FILE_MAX_LEN]; data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:521: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 date_time[DATE_TIME_MAX_LEN]; data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:539: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 str[20]; data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:954: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). fd = fopen(path, "wb"); data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:1048: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(str, "%2.3f", average_rate_now); data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:211: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). fd = fopen(path, "rb"); data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:244: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). fd = fopen(path, "wb"); data/airspy-host-1.0.9/libairspy/src/airspy.c:106: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 str_product_airspy[STR_PRODUCT_AIRSPY_SIZE] = data/airspy-host-1.0.9/libairspy/src/airspy.c:110: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 str_prefix_serial_airspy[STR_PREFIX_SERIAL_AIRSPY_SIZE] = data/airspy-host-1.0.9/libairspy/src/airspy.c:623: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_number_expected[SERIAL_AIRSPY_EXPECTED_SIZE + 1]; data/airspy-host-1.0.9/libairspy/src/airspy.c:624: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 serial_number[SERIAL_AIRSPY_EXPECTED_SIZE + 1]; data/airspy-host-1.0.9/libairspy/src/airspy.c:920: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 serial_number[SERIAL_AIRSPY_EXPECTED_SIZE + 1]; data/airspy-host-1.0.9/libairspy/src/airspy.c:1042: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(buffer, device->supported_samplerates, len * sizeof(uint32_t)); data/airspy-host-1.0.9/libairspy/src/airspy.c:1501: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_local[VERSION_LOCAL_SIZE]; data/airspy-host-1.0.9/libairspy/src/airspy.c:1521: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(version, version_local, length - 1); data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:255: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(fir_queue + fir_index + 1, fir_queue, (fir_len - 1) * sizeof(float)); data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:288: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(fir_queue + fir_index + 1, fir_queue, (fir_len - 1) * sizeof(float)); data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:323: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(fir_queue + fir_index + 1, fir_queue, (fir_len - 1) * sizeof(float)); data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:364: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(fir_queue + fir_index + 1, fir_queue, (fir_len - 1) * sizeof(float)); data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:391: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(fir_queue + fir_index + 1, fir_queue, (fir_len - 1) * sizeof(float)); data/airspy-host-1.0.9/libairspy/src/iqconverter_int16.c:123: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(cnv->fir_queue + fir_index + 1, cnv->fir_queue, (cnv->len - 1) * sizeof(int32_t)); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:238: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 (!defined __STDC__ || !__STDC__) && !defined strlen data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:241: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). extern int strlen (const char *); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:432: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). int len = nonoption_flags_max_len = strlen (orig_str); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:687: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). == (unsigned int) strlen (p->name)) data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:714: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:746: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:762: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:767: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:878: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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:901: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:921: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:935: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/getopt/getopt.c:939: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). nextchar += strlen (nextchar); data/airspy-host-1.0.9/airspy-tools/src/airspy_gpio.c:89: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_gpiodir.c:86: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_info.c:47: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_r820t.c:79: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:265: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:293: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_rx.c:322: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). for(p1 = str, p2 = str + strlen(str) - 1; p2 > p1; ++p1, --p2) data/airspy-host-1.0.9/airspy-tools/src/airspy_si5351c.c:74: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:70: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(s) > 2) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:97: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(s) > 2 ) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:193:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (write == read) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:243:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read) { data/airspy-host-1.0.9/airspy-tools/src/airspy_spiflash.c:284:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read) data/airspy-host-1.0.9/libairspy/src/iqconverter_float.c:55:44: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. #define _aligned_malloc(size, alignment) memalign(alignment, size) data/airspy-host-1.0.9/libairspy/src/iqconverter_int16.c:43:44: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. #define _aligned_malloc(size, alignment) memalign(alignment, size) ANALYSIS SUMMARY: Hits = 80 Lines analyzed = 7473 in approximately 0.21 seconds (35041 lines/second) Physical Source Lines of Code (SLOC) = 5608 Hits@level = [0] 260 [1] 28 [2] 27 [3] 22 [4] 3 [5] 0 Hits@level+ = [0+] 340 [1+] 80 [2+] 52 [3+] 25 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 60.6277 [1+] 14.2653 [2+] 9.27247 [3+] 4.45792 [4+] 0.53495 [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.