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/diskscan-0.20/arch/arch-freebsd.c
Examining data/diskscan-0.20/arch/arch-generic.c
Examining data/diskscan-0.20/arch/arch-linux.c
Examining data/diskscan-0.20/arch/arch-linux.h
Examining data/diskscan-0.20/arch/arch-posix.c
Examining data/diskscan-0.20/arch/arch-posix.h
Examining data/diskscan-0.20/cli/cli.c
Examining data/diskscan-0.20/cli/verbose.c
Examining data/diskscan-0.20/diskscan.c
Examining data/diskscan-0.20/hdrhistogram/examples/hdr_decoder.c
Examining data/diskscan-0.20/hdrhistogram/examples/hiccup.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_encoding.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_encoding.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_histogram.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_interval_recorder.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_interval_recorder.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_tests.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_time.h
Examining data/diskscan-0.20/hdrhistogram/src/hdr_writer_reader_phaser.c
Examining data/diskscan-0.20/hdrhistogram/src/hdr_writer_reader_phaser.h
Examining data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c
Examining data/diskscan-0.20/hdrhistogram/test/hdr_histogram_perf.c
Examining data/diskscan-0.20/hdrhistogram/test/hdr_histogram_test.c
Examining data/diskscan-0.20/hdrhistogram/test/minunit.h
Examining data/diskscan-0.20/include/arch.h
Examining data/diskscan-0.20/include/cli.h
Examining data/diskscan-0.20/include/compiler.h
Examining data/diskscan-0.20/include/disk.h
Examining data/diskscan-0.20/include/diskscan.h
Examining data/diskscan-0.20/include/median.h
Examining data/diskscan-0.20/include/verbose.h
Examining data/diskscan-0.20/lib/data.c
Examining data/diskscan-0.20/lib/data.h
Examining data/diskscan-0.20/lib/disk.c
Examining data/diskscan-0.20/lib/diskscan.c
Examining data/diskscan-0.20/lib/sha1.c
Examining data/diskscan-0.20/lib/sha1.h
Examining data/diskscan-0.20/lib/system_id.c
Examining data/diskscan-0.20/lib/system_id.h
Examining data/diskscan-0.20/lib/verbose.c
Examining data/diskscan-0.20/libscsicmd/include/asc_num_list.h
Examining data/diskscan-0.20/libscsicmd/include/ata.h
Examining data/diskscan-0.20/libscsicmd/include/ata_parse.h
Examining data/diskscan-0.20/libscsicmd/include/ata_smart.h
Examining data/diskscan-0.20/libscsicmd/include/parse_extended_inquiry.h
Examining data/diskscan-0.20/libscsicmd/include/parse_log_sense.h
Examining data/diskscan-0.20/libscsicmd/include/parse_mode_sense.h
Examining data/diskscan-0.20/libscsicmd/include/parse_read_defect_data.h
Examining data/diskscan-0.20/libscsicmd/include/parse_receive_diagnostics.h
Examining data/diskscan-0.20/libscsicmd/include/scsicmd.h
Examining data/diskscan-0.20/libscsicmd/include/scsicmd_utils.h
Examining data/diskscan-0.20/libscsicmd/include/sense_key_list.h
Examining data/diskscan-0.20/libscsicmd/include/smartdb.h
Examining data/diskscan-0.20/libscsicmd/src/ata.c
Examining data/diskscan-0.20/libscsicmd/src/ata_smart.c
Examining data/diskscan-0.20/libscsicmd/src/cdb.c
Examining data/diskscan-0.20/libscsicmd/src/log_sense.c
Examining data/diskscan-0.20/libscsicmd/src/parse.c
Examining data/diskscan-0.20/libscsicmd/src/parse_inquiry.c
Examining data/diskscan-0.20/libscsicmd/src/parse_read_cap.c
Examining data/diskscan-0.20/libscsicmd/src/parse_sense.c
Examining data/diskscan-0.20/libscsicmd/src/smartdb/smartdb.c
Examining data/diskscan-0.20/libscsicmd/src/smartdb/smartdb_gen.c
Examining data/diskscan-0.20/libscsicmd/src/str_map.c
Examining data/diskscan-0.20/libscsicmd/test/ata_check_power_mode.c
Examining data/diskscan-0.20/libscsicmd/test/ata_identify.c
Examining data/diskscan-0.20/libscsicmd/test/ata_smart_read_data.c
Examining data/diskscan-0.20/libscsicmd/test/ata_smart_return_status.c
Examining data/diskscan-0.20/libscsicmd/test/collect_raw_data.c
Examining data/diskscan-0.20/libscsicmd/test/main.c
Examining data/diskscan-0.20/libscsicmd/test/main.h
Examining data/diskscan-0.20/libscsicmd/test/parse_scsi.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_log_sense.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_mode_sense.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_10.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_16.c
Examining data/diskscan-0.20/libscsicmd/test/scsi_receive_diagnostics.c
Examining data/diskscan-0.20/libscsicmd/test/sense_decode.c
Examining data/diskscan-0.20/libscsicmd/test/sense_dump.c
Examining data/diskscan-0.20/libscsicmd/test/sense_dump.h
Examining data/diskscan-0.20/progressbar/include/progressbar.h
Examining data/diskscan-0.20/progressbar/include/statusbar.h
Examining data/diskscan-0.20/progressbar/lib/progressbar.c
Examining data/diskscan-0.20/progressbar/lib/statusbar.c
Examining data/diskscan-0.20/progressbar/test/demo.c

FINAL RESULTS:

data/diskscan-0.20/arch/arch-freebsd.c:95:3:  [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(ifr.ifr_name, it->ifr_name);
data/diskscan-0.20/arch/arch-linux.c:489:2:  [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(model, vendor + strlen(vendor) + 1);
data/diskscan-0.20/arch/arch-linux.c:527:3:  [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(ifr.ifr_name, it->ifr_name);
data/diskscan-0.20/cli/verbose.c:33:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, ap);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:757:13:  [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.
            snprintf(str, len, format_str, "%.", significant_figures, "f,%f,%d,%.2f\n");
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:760:13:  [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.
            snprintf(str, len, format_str, "%12.", significant_figures, "f %12f %12d %12.2f\n");
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:763:13:  [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.
            snprintf(str, len, format_str, "%12.", significant_figures, "f %12f %12d %12.2f\n");
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:949:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    if (fprintf(
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:965:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        if (fprintf(
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:979:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        if (fprintf(
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:891:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    sscanf(line, format, &reader->major_version, &reader->minor_version);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:900:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if (sscanf(line, format, &timestamp_s, &trailing_ms) == 2)
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1030:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    int num_tokens = sscanf(
data/diskscan-0.20/include/verbose.h:7:64:  [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.
void verbose_out(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));;
data/diskscan-0.20/lib/data.c:80:15:  [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.
			system_id->system, system_id->chassis, system_id->baseboard, system_id->mac, system_id->os);
data/diskscan-0.20/lib/data.c:201:3:  [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.
		snprintf(now, sizeof(now), "%"PRIu64, (uint64_t)t);
data/diskscan-0.20/lib/data.c:253:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(f, "\"StartSector\": %16"PRIu64, latency[i].start_sector);
data/diskscan-0.20/lib/data.c:254:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(f, ", \"EndSector\": %16"PRIu64, latency[i].end_sector);
data/diskscan-0.20/lib/diskscan.c:304:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(path, F_OK)) {
data/diskscan-0.20/lib/diskscan.c:310:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(path, access_mode_flag)) {
data/diskscan-0.20/lib/system_id.c:31:12:  [4] (shell) popen:
  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.
	FILE *f = popen(cmd, "r");
data/diskscan-0.20/lib/system_id.c:92:32:  [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.
	system_serial_read(system_id->system, sizeof(system_id->system));
data/diskscan-0.20/lib/system_id.c:92:58:  [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.
	system_serial_read(system_id->system, sizeof(system_id->system));
data/diskscan-0.20/lib/system_id.h:8:7:  [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.
	char system[64];
data/diskscan-0.20/libscsicmd/src/str_map.c:33:60:  [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 SENSE_CODE_KEYED(_asc_, _fmt_) if (asc == _asc_) { snprintf(msg, sizeof(msg), _fmt_, ascq); return msg; }
data/diskscan-0.20/progressbar/lib/progressbar.c:194:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stderr, ETA_FORMAT, eta.hours, eta.minutes, eta.seconds);
data/diskscan-0.20/cli/cli.c:227:7:  [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.
		c = getopt_long(argc, argv, "vfs:e:o:r:", long_options, &option_index);
data/diskscan-0.20/hdrhistogram/examples/hiccup.c:97:17:  [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 ((c = getopt(argc, argv, "i:f:")) != -1)
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:300:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(5);
data/diskscan-0.20/lib/diskscan.c:601:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL));
data/diskscan-0.20/progressbar/lib/progressbar.c:118:24:  [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.
  if (tgetent(termbuf, getenv("TERM")) >= 0) {
data/diskscan-0.20/arch/arch-freebsd.c:16:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(vendor, "UNKNOWN");
data/diskscan-0.20/arch/arch-freebsd.c:17:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(model, "UNKNOWN");
data/diskscan-0.20/arch/arch-freebsd.c:18:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(fw_rev, "UNKN");
data/diskscan-0.20/arch/arch-freebsd.c:19:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(serial, "UNKNOWN");
data/diskscan-0.20/arch/arch-freebsd.c:74: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 data[1024];
data/diskscan-0.20/arch/arch-freebsd.c:108: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(buf, ifr.ifr_ifru.ifru_data, len >= 6 ? 6 : len);
data/diskscan-0.20/arch/arch-generic.c:24:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(vendor, "UNKNOWN");
data/diskscan-0.20/arch/arch-generic.c:25:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(model, "UNKNOWN");
data/diskscan-0.20/arch/arch-generic.c:26:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(fw_rev, "UNKN");
data/diskscan-0.20/arch/arch-generic.c:27:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(serial, "UNKNOWN");
data/diskscan-0.20/arch/arch-linux.c:146: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.
	static char buf[256];
data/diskscan-0.20/arch/arch-linux.c:213: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(io_res->sense, sense, hdr.sb_len_wr);
data/diskscan-0.20/arch/arch-linux.c:321: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->fd = open(path, O_RDWR|O_DIRECT);
data/diskscan-0.20/arch/arch-linux.c:343: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 cdb[32];
data/diskscan-0.20/arch/arch-linux.c:344: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 sense[128];
data/diskscan-0.20/arch/arch-linux.c:369: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 cdb[32];
data/diskscan-0.20/arch/arch-linux.c:370: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 sense[128];
data/diskscan-0.20/arch/arch-linux.c:395: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 cdb[32];
data/diskscan-0.20/arch/arch-linux.c:396: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 buf[512];
data/diskscan-0.20/arch/arch-linux.c:397: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 sense[128];
data/diskscan-0.20/arch/arch-linux.c:445: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 cdb[32];
data/diskscan-0.20/arch/arch-linux.c:446: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 buf[512];
data/diskscan-0.20/arch/arch-linux.c:447: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 sense[128];
data/diskscan-0.20/arch/arch-linux.c:496:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ata_buf, buf, buf_read);
data/diskscan-0.20/arch/arch-linux.c:506: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 data[1024];
data/diskscan-0.20/arch/arch-linux.c:540: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(buf, ifr.ifr_hwaddr.sa_data, len >= 6 ? 6 : len);
data/diskscan-0.20/arch/arch-posix.c:14: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->fd = open(path, O_RDWR|O_DIRECT);
data/diskscan-0.20/arch/arch-posix.c:17:13:  [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->fd = open(path, O_RDONLY|O_DIRECT);
data/diskscan-0.20/hdrhistogram/examples/hdr_decoder.c:29:13:  [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).
        f = fopen(argv[1], "r");
data/diskscan-0.20/hdrhistogram/examples/hiccup.c:105:24:  [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).
            interval = atoi(optarg);
data/diskscan-0.20/hdrhistogram/examples/hiccup.c:144:18:  [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).
        output = fopen(config.filename, "a+");
data/diskscan-0.20/hdrhistogram/src/hdr_histogram.c:941: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 line_format[25];
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:768: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 time_str[128];
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:923: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 line[HEADER_LINE_LENGTH]; // TODO: check for overflow.
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:43: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 a_str[128];
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:44: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 b_str[128];
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:380: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 output[5] = { 0 };
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:465:22:  [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).
    FILE* log_file = fopen(file_name, "w+");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:479:16:  [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).
    log_file = fopen(file_name, "r");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:540:22:  [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).
    FILE* log_file = fopen(file_name, "w+");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:548:16:  [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).
    log_file = fopen(file_name, "r");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:599:16:  [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).
    log_file = fopen(file_name, "w+");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:604:16:  [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).
    log_file = fopen(file_name, "r");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:658:15:  [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).
    FILE* f = fopen(v1_log, "r");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:703:15:  [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).
    FILE* f = fopen(v2_log, "r");
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:747:15:  [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).
    FILE* f = fopen(v1_log, "r");
data/diskscan-0.20/include/arch.h:28: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 sense[256];
data/diskscan-0.20/include/diskscan.h:63: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[128];
data/diskscan-0.20/include/diskscan.h:64: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[64];
data/diskscan-0.20/include/diskscan.h:65: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 model[64];
data/diskscan-0.20/include/diskscan.h:66: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 fw_rev[64];
data/diskscan-0.20/include/diskscan.h:67: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[64];
data/diskscan-0.20/include/diskscan.h:73: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 ata_buf[512];
data/diskscan-0.20/lib/data.c:88: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 buf[2048];
data/diskscan-0.20/lib/data.c:102: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.
	static char buf[2048];
data/diskscan-0.20/lib/data.c:103: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 sense_hex[sizeof(sense) * 2 + 1];
data/diskscan-0.20/lib/data.c:136: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 ata_hex[512*2+1];
data/diskscan-0.20/lib/data.c:154:15:  [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).
	log_raw->f = fopen(filename, "wt");
data/diskscan-0.20/lib/data.c:192: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 now[64];
data/diskscan-0.20/lib/data.c:207:11:  [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).
	log->f = fopen(filename, "wt");
data/diskscan-0.20/lib/disk.c:8: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 cdb[32];
data/diskscan-0.20/lib/disk.c:9: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 buf[512];
data/diskscan-0.20/lib/disk.c:10: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 sense[128];
data/diskscan-0.20/lib/disk.c:27: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 cdb[32];
data/diskscan-0.20/lib/disk.c:28: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 buf[512];
data/diskscan-0.20/lib/disk.c:29: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 sense[128];
data/diskscan-0.20/lib/sha1.c:141: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(block, buffer, 64);
data/diskscan-0.20/lib/sha1.c:213: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(&context->buffer[j], data, (i = 64-j));
data/diskscan-0.20/lib/sha1.c:221: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(&context->buffer[j], &data[i], len - i);
data/diskscan-0.20/lib/sha1.c:268:10:  [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 digest[SHA1_DIGEST_SIZE], buffer[16384];
data/diskscan-0.20/lib/sha1.c:281:22:  [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).
        if (!(file = fopen(argv[1], "rb"))) {
data/diskscan-0.20/lib/sha1.c:325:13:  [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(c,"%02X", digest[i*4+j]);
data/diskscan-0.20/lib/sha1.c:339: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 output[80];
data/diskscan-0.20/lib/system_id.c:17: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 digest[SHA1_DIGEST_SIZE];
data/diskscan-0.20/lib/system_id.c:25: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(out + i*2, "%02X", digest[i]);
data/diskscan-0.20/lib/system_id.c:42: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 cmd[128];
data/diskscan-0.20/lib/system_id.c:96: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 mac[6];
data/diskscan-0.20/lib/system_id.h:7: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 os[64];
data/diskscan-0.20/lib/system_id.h:8: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 system[64];
data/diskscan-0.20/lib/system_id.h:9: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 chassis[64];
data/diskscan-0.20/lib/system_id.h:10: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 baseboard[64];
data/diskscan-0.20/lib/system_id.h:11: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 mac[64];
data/diskscan-0.20/libscsicmd/include/parse_receive_diagnostics.h:132:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s, src, slen);
data/diskscan-0.20/libscsicmd/include/scsicmd.h:31: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.
typedef char scsi_vendor_t[SCSI_VENDOR_LEN+1];
data/diskscan-0.20/libscsicmd/include/scsicmd.h:32: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.
typedef char scsi_model_t[SCSI_MODEL_LEN+1];
data/diskscan-0.20/libscsicmd/include/scsicmd.h:33: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.
typedef char scsi_fw_revision_t[SCSI_FW_REVISION_LEN+1];
data/diskscan-0.20/libscsicmd/include/scsicmd.h:34: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.
typedef char scsi_serial_t[SCSI_SERIAL_LEN+1];
data/diskscan-0.20/libscsicmd/src/str_map.c:21: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.
	static char msg[64];
data/diskscan-0.20/libscsicmd/test/ata_check_power_mode.c:26: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 cdb[12];
data/diskscan-0.20/libscsicmd/test/ata_check_power_mode.c:27: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/ata_identify.c:33: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/ata_identify.c:34: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/ata_smart_read_data.c:29: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 cdb[12];
data/diskscan-0.20/libscsicmd/test/ata_smart_read_data.c:64: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 cdb[12];
data/diskscan-0.20/libscsicmd/test/ata_smart_read_data.c:98: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 buf_thresh[512];
data/diskscan-0.20/libscsicmd/test/ata_smart_read_data.c:99: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 buf_data[512];
data/diskscan-0.20/libscsicmd/test/ata_smart_return_status.c:26: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 cdb[12];
data/diskscan-0.20/libscsicmd/test/ata_smart_return_status.c:27: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:91: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:92: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 buf[128];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:112: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:113: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 buf[512];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:121: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:122: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 buf[512];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:138: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:139: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:147: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:148: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:207: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:208: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 buf[4096];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:239: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:240: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 buf[255];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:267: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:268: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:276: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:277: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:307: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:308: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 buf[8];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:316: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:317: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 buf[512];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:331: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:332: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 buf[512];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:348: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/collect_raw_data.c:349: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 buf[512];
data/diskscan-0.20/libscsicmd/test/main.c:30: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 sense[128];
data/diskscan-0.20/libscsicmd/test/main.c:95:11:  [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).
	int fd = open(devname, O_RDWR);
data/diskscan-0.20/libscsicmd/test/parse_scsi.c:70: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 buf[64*1024];
data/diskscan-0.20/libscsicmd/test/parse_scsi.c:100:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(out, buf, len);
data/diskscan-0.20/libscsicmd/test/parse_scsi.c:552: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 name[16];
data/diskscan-0.20/libscsicmd/test/parse_scsi.c:721:4:  [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[64*1024];
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:64: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:65: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:101: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:102: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:142: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_inquiry.c:143: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/scsi_log_sense.c:34: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_log_sense.c:35: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/scsi_log_sense.c:62: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_log_sense.c:63: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/scsi_mode_sense.c:33: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_mode_sense.c:34: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 buf[4096];
data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_10.c:31: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_10.c:32: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_16.c:31: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_read_capacity_16.c:32: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 buf[512] ;
data/diskscan-0.20/libscsicmd/test/scsi_receive_diagnostics.c:34: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_receive_diagnostics.c:35: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/scsi_receive_diagnostics.c:62: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 cdb[32];
data/diskscan-0.20/libscsicmd/test/scsi_receive_diagnostics.c:63: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 buf[16*1024];
data/diskscan-0.20/libscsicmd/test/sense_decode.c:7:18:  [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 sense[256];
data/diskscan-0.20/progressbar/lib/progressbar.c:117: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 termbuf[2048];
data/diskscan-0.20/arch/arch-freebsd.c:56:41:  [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(path, mnt->f_mntfromname, strlen(path)) == 0) {
data/diskscan-0.20/arch/arch-linux.c:295:38:  [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(path, mnt->mnt_fsname, strlen(path)) == 0) {
data/diskscan-0.20/arch/arch-linux.c:489: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).
	strcpy(model, vendor + strlen(vendor) + 1);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:929:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(file);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:999:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (-1 == read)
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1011:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    null_trailing_whitespace(line, read);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1012: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(line) == 0)
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1018:65:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = realloc_buffer((void**)&base64_histogram, sizeof(char), read);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1024:72:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = realloc_buffer((void**)&compressed_histogram, sizeof(uint8_t), read);
data/diskscan-0.20/hdrhistogram/src/hdr_histogram_log.c:1039: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).
    size_t base64_len = strlen(base64_histogram);
data/diskscan-0.20/hdrhistogram/src/hdr_writer_reader_phaser.c:130:17:  [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(sleep_time_ns / 1000);
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:329: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).
    int input_len = strlen(input);
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:400:23:  [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 encoded_len = strlen(base64_encoded);
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:624:81:  [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).
    mu_assert("Failed to decode histogram data", hdr_log_decode(&hdr_new, data, strlen(data)) == 0);
data/diskscan-0.20/hdrhistogram/test/hdr_histogram_log_test.c:647:81:  [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).
    mu_assert("Failed to decode histogram data", hdr_log_decode(&hdr_new, data, strlen(data)) == 0);
data/diskscan-0.20/lib/diskscan.c:352:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(disk->path, path, sizeof(disk->path));
data/diskscan-0.20/lib/sha1.c:328:9:  [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.
        sprintf(c, " ");
data/diskscan-0.20/lib/sha1.c:345:55:  [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).
        SHA1_Update(&context, (uint8_t*)test_data[k], strlen(test_data[k]));
data/diskscan-0.20/lib/system_id.c:50: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).
	int actual_len = strlen(buf);
data/diskscan-0.20/lib/system_id.c:82: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).
	for (i = strlen(buf) - 1; i >= 0; i--) {
data/diskscan-0.20/libscsicmd/src/parse_inquiry.c:41:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(vendor, (char*)buf+8, SCSI_VENDOR_LEN);
data/diskscan-0.20/libscsicmd/src/parse_inquiry.c:46:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(model, (char*)buf+16, SCSI_MODEL_LEN);
data/diskscan-0.20/libscsicmd/src/parse_inquiry.c:51:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(revision, (char*)buf+32, SCSI_FW_REVISION_LEN);
data/diskscan-0.20/libscsicmd/src/parse_inquiry.c:56:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(serial, (char*)buf+36, SCSI_SERIAL_LEN);
data/diskscan-0.20/libscsicmd/test/main.c:66:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int ret = read(fd, &hdr, sizeof(hdr));
data/diskscan-0.20/libscsicmd/test/parse_scsi.c:697:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int ch = getchar();
data/diskscan-0.20/progressbar/lib/progressbar.c:56: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).
  assert(3 == strlen(format) && "format must be 3 characters in length");
data/diskscan-0.20/progressbar/lib/progressbar.c:162:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int label_length = strlen(bar->label);
data/diskscan-0.20/progressbar/lib/statusbar.c:19:24:  [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).
  new->format_length = strlen(format);
data/diskscan-0.20/progressbar/lib/statusbar.c:21:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(new->format, format, new->format_length);
data/diskscan-0.20/progressbar/test/demo.c:49: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(SLEEP_US);
data/diskscan-0.20/progressbar/test/demo.c:63: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(SLEEP_US);
data/diskscan-0.20/progressbar/test/demo.c:70:7:  [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(SLEEP_US);
data/diskscan-0.20/progressbar/test/demo.c:78: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(SLEEP_US);
data/diskscan-0.20/progressbar/test/demo.c:85: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(SLEEP_US);
data/diskscan-0.20/progressbar/test/demo.c:92: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(SLEEP_US);

ANALYSIS SUMMARY:

Hits = 219
Lines analyzed = 15026 in approximately 0.46 seconds (32762 lines/second)
Physical Source Lines of Code (SLOC) = 11136
Hits@level = [0] 495 [1]  36 [2] 152 [3]   5 [4]  26 [5]   0
Hits@level+ = [0+] 714 [1+] 219 [2+] 183 [3+]  31 [4+]  26 [5+]   0
Hits/KSLOC@level+ = [0+] 64.1164 [1+] 19.6659 [2+] 16.4332 [3+] 2.78376 [4+] 2.33477 [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.