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/dump1090-mutability-1.15~20180310.4a16df3+dfsg/convert.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/convert.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/stats.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/faup1090.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/util.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/util.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/anet.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/demod_2400.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/demod_2400.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/cpr.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_ac.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/anet.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/cprtests.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/icao_filter.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/icao_filter.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/stats.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/cpr.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/view1090.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/compat/clock_nanosleep/clock_nanosleep.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/compat/clock_nanosleep/clock_nanosleep.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/compat/clock_gettime/clock_gettime.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/compat/clock_gettime/clock_gettime.c Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/compat/compat.h Examining data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c FINAL RESULTS: data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/anet.c:77:5: [4] (format) vsnprintf: 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. vsnprintf(err, ANET_ERR_LEN, fmt, ap); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:62:80: [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. static void log_with_timestamp(const char *format, ...) __attribute__((format (printf, 1, 2) )); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:78:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 1024, format, ap); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:1523:9: [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. printf("@%012" PRIX64, mm->timestampMsg); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:460:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "@%012" PRIX64, data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:578:35: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (mm->callsign_valid) {p += sprintf(p, ",%s", mm->callsign);} data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1254:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. p += sprintf(p, "{ " \ data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1455:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hrp, Modes.html_dir); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1695:10: [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. p += snprintf(p, bufsize(p, end), "clock\t%" PRIu64, mstime() / 1000); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1920:14: [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. p += snprintf(p, bufsize(p, end), "clock\t%" PRIu64, (uint64_t)(a->seen / 1000)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1452:14: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!realpath(getFile, rp)) data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1454:14: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!realpath(Modes.html_dir, hrp)) data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c:434:58: [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). shorttable = prepareErrorTable(MODES_SHORT_MSG_BITS, atoi(argv[1]), atoi(argv[2]), &shortlen); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c:434:73: [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). shorttable = prepareErrorTable(MODES_SHORT_MSG_BITS, atoi(argv[1]), atoi(argv[2]), &shortlen); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c:435:56: [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). longtable = prepareErrorTable(MODES_LONG_MSG_BITS, atoi(argv[1]), atoi(argv[2]), &longlen); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c:435:71: [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). longtable = prepareErrorTable(MODES_LONG_MSG_BITS, atoi(argv[1]), atoi(argv[2]), &longlen); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/demod_2400.c:63: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 msg1[MODES_LONG_MSG_BYTES], msg2[MODES_LONG_MSG_BYTES], *msg; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/demod_2400.c:590:22: [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 *names[24] = { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:66: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 timebuf[128]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:67: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 msg[1024]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:280: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 vendor[256], product[256], serial[256]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:469: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(outbuf->data, lastbuf->data + lastbuf->length - Modes.trailing_samples, Modes.trailing_samples * sizeof(uint16_t)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:545:13: [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(outbuf->data, lastbuf->data + lastbuf->length - Modes.trailing_samples, Modes.trailing_samples * sizeof(uint16_t)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:845:13: [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 filebuf[PATH_MAX]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:866: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 vendor[256], product[256], serial[256]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:990:43: [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). Modes.net_output_flush_size = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:992:54: [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). Modes.net_output_flush_interval = 1000 * atoi(argv[++j]) / 15; // backwards compatibility data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1023:37: [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). Modes.net_sndbuf_size = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1045:38: [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). Modes.interactive_rows = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1080:22: [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). snipMode(atoi(argv[++j])); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1086:31: [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). Modes.ppm_error = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1112: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). Modes.json_location_accuracy = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1146:32: [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). } else if ((Modes.fd = open(Modes.filename, data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:303: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 aneterr[ANET_ERR_LEN]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:386: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 msg[MODES_LONG_MSG_BYTES]; // Binary message. data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:387: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 verbatim[MODES_LONG_MSG_BYTES]; // Binary message, as originally received before correction data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:419: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 MB[7]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:420: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 MD[10]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:421: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 ME[7]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:422: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 MV[7]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.h:467: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 callsign[9]; // 8 chars flight number data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/faup1090.c:168:31: [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). bo_connect_port = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:83: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 spinner[4] = "|/-\\"; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:120:17: [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 strSquawk[5] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:121:17: [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 strFl[12] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:122:17: [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 strTt[5] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:123:17: [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 strGs[5] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:149:21: [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 strMode[5] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:150:21: [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 strLat[8] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/interactive.c:151:21: [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 strLon[9] = " "; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:310:17: [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 unsigned char all_zeros[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:430: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(mm->msg, msg, MODES_LONG_MSG_BYTES); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:433: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(mm->verbatim, msg, MODES_LONG_MSG_BYTES); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:672: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(mm->MB, &msg[4], 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:678: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(mm->MD, &msg[1], 10); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:683: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(mm->ME, &msg[4], 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:689: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(mm->MV, &msg[4], 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/mode_s.c:1274: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 *df_names[33] = { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:162: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[20]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:180: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[128]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:204:13: [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, p, len); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:440: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, heartbeat_message, sizeof(heartbeat_message)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:467:9: [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(p, "%02X", msg[j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:490: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, heartbeat_message, len); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:560:10: [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. p += sprintf(p, "MSG,%d,1,1,%06X,1,", msgType, mm->addr); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:570:10: [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. p += sprintf(p, "%04d/%02d/%02d,", (stTime_receive.tm_year+1900),(stTime_receive.tm_mon+1), stTime_receive.tm_mday); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:571:10: [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. p += sprintf(p, "%02d:%02d:%02d.%03u,", stTime_receive.tm_hour, stTime_receive.tm_min, stTime_receive.tm_sec, (unsigned) (mm->sysTimestampMsg.tv_nsec / 1000000U)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:574:10: [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. p += sprintf(p, "%04d/%02d/%02d,", (stTime_now.tm_year+1900),(stTime_now.tm_mon+1), stTime_now.tm_mday); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:575:10: [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. p += sprintf(p, "%02d:%02d:%02d.%03u", stTime_now.tm_hour, stTime_now.tm_min, stTime_now.tm_sec, (unsigned) (now.tv_nsec / 1000000U)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:585:22: [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. p += sprintf(p, ",%dH", mm->altitude); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:587:22: [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. p += sprintf(p, ",%dH", mm->altitude + a->gnss_delta); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:589:22: [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. p += sprintf(p, ",%d", mm->altitude); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:593:22: [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. p += sprintf(p, ",%d", mm->altitude); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:595:22: [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. p += sprintf(p, ",%d", mm->altitude - a->gnss_delta); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:606:14: [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. p += sprintf(p, ",%d", mm->speed); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:613:14: [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. p += sprintf(p, ",%d", mm->heading); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:620:14: [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. p += sprintf(p, ",%1.5f,%1.5f", mm->decoded_lat, mm->decoded_lon); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:622:14: [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. p += sprintf(p, ",,"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:627:14: [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. p += sprintf(p, ",%d", mm->vert_rate); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:634:14: [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. p += sprintf(p, ",%04x", mm->squawk); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:642:18: [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. p += sprintf(p, ",-1"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:644:18: [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. p += sprintf(p, ",0"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:653:18: [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. p += sprintf(p, ",-1"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:655:18: [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. p += sprintf(p, ",0"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:664:18: [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. p += sprintf(p, ",-1"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:666:18: [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. p += sprintf(p, ",0"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:675:14: [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. p += sprintf(p, ",-1"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:678:14: [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. p += sprintf(p, ",0"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:685:10: [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. p += sprintf(p, "\r\n"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:703: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, heartbeat_message, len); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:752: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 msg[MODES_LONG_MSG_BYTES]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:848: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 msg[MODES_LONG_MSG_BYTES]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:945: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. static char buf[1024]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1262:18: [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. p += sprintf(p, ", " \ data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1267:18: [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. p += sprintf(p, ", " \ data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1274:10: [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. p += sprintf(p, " }\n"); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1301: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 pathbuf[PATH_MAX]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1302: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 tmppath[PATH_MAX]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1313:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tmppath); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1380: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 hdr[512]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1443: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 rp[PATH_MAX], hrp[PATH_MAX]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1444: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 getFile[1024]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1460: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). if (stat(getFile, &sbuf) != -1 && (fd = open(getFile, O_RDONLY)) != -1) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1743:13: [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(a->fatsv_emitted_bds_10, mm->MB, 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1748:13: [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(a->fatsv_emitted_bds_30, mm->MB, 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1760:13: [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(a->fatsv_emitted_es_acas_ra, mm->ME, 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1764:13: [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(a->fatsv_emitted_es_status, mm->ME, 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1768:13: [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(a->fatsv_emitted_es_target, mm->ME, 7); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.h:53: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[MODES_CLIENT_BUF_SIZE+1]; // Read buffer data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/stats.c:66: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 tb_start[30], tb_end[30]; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/stats.c:192: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 *pixels[NPIXELS] = { ".", "o", "O", "|" }; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/stats.c:196: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 *pixels[NPIXELS] = { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:81: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 callsign[9]; // Flight number data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:149: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 fatsv_emitted_bds_10[7]; // -"- BDS 1,0 message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:150: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 fatsv_emitted_bds_30[7]; // -"- BDS 3,0 message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:151: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 fatsv_emitted_es_status[7]; // -"- ES operational status message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:152: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 fatsv_emitted_es_target[7]; // -"- ES target status message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/track.h:153: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 fatsv_emitted_es_acas_ra[7]; // -"- ES ACAS RA report message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/view1090.c:166:31: [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). bo_connect_port = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/view1090.c:172:38: [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). Modes.interactive_rows = atoi(argv[++j]); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/anet.c:215:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd,buf,count-totlen); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/crc.c:527:25: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (mismatch) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:556:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(Modes.fd, r, toread); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:658:17: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = getchar()) != EOF && (q = getchar()) != EOF) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:658:43: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = getchar()) != EOF && (q = getchar()) != EOF) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:901:26: [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 (strncmp(s, serial, strlen(s)) != 0) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:911: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). offset = strlen(serial) - strlen(s); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:911:29: [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). offset = strlen(serial) - strlen(s); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:914:33: [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 (strncmp(s, serial+offset, strlen(s)) != 0) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/dump1090.c:1184:13: [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); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/faup1090.c:137: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). len = strlen(settings) * 3; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/faup1090.c:221:9: [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); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:197:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, p, sizeof(buf)); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:481:15: [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 = strlen(heartbeat_message); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:579:35: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. else {p += sprintf(p, ",");} data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:597:22: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:601:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:608:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:615:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:629:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:636:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:647:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:658:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:669:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:681:14: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, ","); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:694:15: [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 = strlen(heartbeat_message); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:847:13: [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 l = strlen(hex), j; data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1317:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mask = umask(0); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1318:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mask); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1424:76: [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 ((url_handlers[i].prefix && !strncmp(url, url_handlers[i].path, strlen(url_handlers[i].path))) || data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1446:13: [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(url) < 2) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1459:31: [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 (!strncmp(hrp, rp, strlen(hrp))) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1462:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, content, sbuf.st_size) == sbuf.st_size) { data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1579:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(c->fd, c->buf+c->buflen, left); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/net_io.c:1670:25: [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). s = e + strlen(c->service->read_sep); // Move to start of next message data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/view1090.c:243:13: [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(1000000); data/dump1090-mutability-1.15~20180310.4a16df3+dfsg/view1090.c:248:9: [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 = 157 Lines analyzed = 11520 in approximately 0.50 seconds (23210 lines/second) Physical Source Lines of Code (SLOC) = 7516 Hits@level = [0] 349 [1] 37 [2] 108 [3] 2 [4] 10 [5] 0 Hits@level+ = [0+] 506 [1+] 157 [2+] 120 [3+] 12 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 67.323 [1+] 20.8888 [2+] 15.9659 [3+] 1.59659 [4+] 1.33049 [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.