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/flashrom-1.2/edi.h
Examining data/flashrom-1.2/os.h
Examining data/flashrom-1.2/atapromise.c
Examining data/flashrom-1.2/board_enable.c
Examining data/flashrom-1.2/dummyflasher.c
Examining data/flashrom-1.2/rayer_spi.c
Examining data/flashrom-1.2/ene.h
Examining data/flashrom-1.2/nicintel.c
Examining data/flashrom-1.2/digilent_spi.c
Examining data/flashrom-1.2/serprog.c
Examining data/flashrom-1.2/w29ee011.c
Examining data/flashrom-1.2/ichspi.c
Examining data/flashrom-1.2/it87spi.c
Examining data/flashrom-1.2/fmap.h
Examining data/flashrom-1.2/helpers.c
Examining data/flashrom-1.2/chipdrivers.h
Examining data/flashrom-1.2/sst49lfxxxc.c
Examining data/flashrom-1.2/w39.c
Examining data/flashrom-1.2/custom_baud.c
Examining data/flashrom-1.2/print_wiki.c
Examining data/flashrom-1.2/chipset_enable.c
Examining data/flashrom-1.2/developerbox_spi.c
Examining data/flashrom-1.2/archtest.c
Examining data/flashrom-1.2/pony_spi.c
Examining data/flashrom-1.2/buspirate_spi.c
Examining data/flashrom-1.2/spi25.c
Examining data/flashrom-1.2/pickit2_spi.c
Examining data/flashrom-1.2/flashrom.c
Examining data/flashrom-1.2/at45db.c
Examining data/flashrom-1.2/cli_common.c
Examining data/flashrom-1.2/endiantest.c
Examining data/flashrom-1.2/linux_mtd.c
Examining data/flashrom-1.2/opaque.c
Examining data/flashrom-1.2/usbdev.c
Examining data/flashrom-1.2/flashchips.c
Examining data/flashrom-1.2/it8212.c
Examining data/flashrom-1.2/flash.h
Examining data/flashrom-1.2/jlink_spi.c
Examining data/flashrom-1.2/nicnatsemi.c
Examining data/flashrom-1.2/satamv.c
Examining data/flashrom-1.2/mcp6x_spi.c
Examining data/flashrom-1.2/gfxnvidia.c
Examining data/flashrom-1.2/sst_fwhub.c
Examining data/flashrom-1.2/programmer.c
Examining data/flashrom-1.2/layout.h
Examining data/flashrom-1.2/linux_spi.c
Examining data/flashrom-1.2/flashchips.h
Examining data/flashrom-1.2/processor_enable.c
Examining data/flashrom-1.2/sb600spi.c
Examining data/flashrom-1.2/serial.c
Examining data/flashrom-1.2/mstarddc_spi.c
Examining data/flashrom-1.2/drkaiser.c
Examining data/flashrom-1.2/en29lv640b.c
Examining data/flashrom-1.2/udelay.c
Examining data/flashrom-1.2/nicintel_eeprom.c
Examining data/flashrom-1.2/cli_classic.c
Examining data/flashrom-1.2/atavia.c
Examining data/flashrom-1.2/82802ab.c
Examining data/flashrom-1.2/ogp_spi.c
Examining data/flashrom-1.2/spi25_statusreg.c
Examining data/flashrom-1.2/coreboot_tables.h
Examining data/flashrom-1.2/pcidev.c
Examining data/flashrom-1.2/nic3com.c
Examining data/flashrom-1.2/platform.h
Examining data/flashrom-1.2/dmi.c
Examining data/flashrom-1.2/nicintel_spi.c
Examining data/flashrom-1.2/ich_descriptors.h
Examining data/flashrom-1.2/spi.h
Examining data/flashrom-1.2/bitbang_spi.c
Examining data/flashrom-1.2/print.c
Examining data/flashrom-1.2/hwaccess.h
Examining data/flashrom-1.2/wbsio_spi.c
Examining data/flashrom-1.2/hwaccess.c
Examining data/flashrom-1.2/serprog.h
Examining data/flashrom-1.2/atahpt.c
Examining data/flashrom-1.2/sfdp.c
Examining data/flashrom-1.2/dediprog.c
Examining data/flashrom-1.2/cbtable.c
Examining data/flashrom-1.2/nicrealtek.c
Examining data/flashrom-1.2/ft2232_spi.c
Examining data/flashrom-1.2/cli_output.c
Examining data/flashrom-1.2/satasii.c
Examining data/flashrom-1.2/ch341a_spi.c
Examining data/flashrom-1.2/fmap.c
Examining data/flashrom-1.2/amd_imc.c
Examining data/flashrom-1.2/internal.c
Examining data/flashrom-1.2/ni845x_spi.c
Examining data/flashrom-1.2/it85spi.c
Examining data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c
Examining data/flashrom-1.2/libflashrom.c
Examining data/flashrom-1.2/layout.c
Examining data/flashrom-1.2/stm50.c
Examining data/flashrom-1.2/jedec.c
Examining data/flashrom-1.2/spi.c
Examining data/flashrom-1.2/custom_baud.h
Examining data/flashrom-1.2/sst28sf040.c
Examining data/flashrom-1.2/edi.c
Examining data/flashrom-1.2/spi95.c
Examining data/flashrom-1.2/programmer.h
Examining data/flashrom-1.2/usbblaster_spi.c
Examining data/flashrom-1.2/physmap.c
Examining data/flashrom-1.2/libflashrom.h
Examining data/flashrom-1.2/ich_descriptors.c
Examining data/flashrom-1.2/stlinkv3_spi.c

FINAL RESULTS:

data/flashrom-1.2/atahpt.c:98:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/atapromise.c:169:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/atavia.c:73:47:  [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.
static void atavia_prettyprint_access(uint8_t access)
data/flashrom-1.2/atavia.c:75:18:  [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.
	uint8_t bmask = access & BROM_BYTE_ENABLE_MASK;
data/flashrom-1.2/atavia.c:76:17:  [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.
	uint8_t size = access & BROM_SIZE_MASK;
data/flashrom-1.2/atavia.c:89:34:  [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.
	msg_pspew("Access is a %s.\n", (access & BROM_WRITE) ? "write" : "read");
data/flashrom-1.2/atavia.c:90:32:  [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.
	msg_pspew("Device is %s.\n", (access & BROM_TRIGGER) ? "busy" : "ready");
data/flashrom-1.2/atavia.c:96:10:  [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.
	uint8_t access, status;
data/flashrom-1.2/atavia.c:102:9:  [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 & BROM_TRIGGER) == 0) && (status & BROM_ERROR_STATUS) == 0) {
data/flashrom-1.2/atavia.c:112:52:  [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.
		  __func__, ready ? "succeeded" : "failed", try, access, status);
data/flashrom-1.2/atavia.c:113:28:  [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.
	atavia_prettyprint_access(access);
data/flashrom-1.2/cli_output.c:82:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		ret = vfprintf(output_type, fmt, ap);
data/flashrom-1.2/cli_output.c:90:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		ret = vfprintf(logfile, fmt, logfile_args);
data/flashrom-1.2/dmi.c:305:19:  [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.
	dmidecode_pipe = popen(commandline, "r");
data/flashrom-1.2/flash.h:383:23:  [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.
__attribute__((format(printf, 2, 3)));
data/flashrom-1.2/helpers.c:59:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(dest, src);
data/flashrom-1.2/ich_descriptors.c:23:23:  [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.
#define print(t, ...) printf(__VA_ARGS__)
data/flashrom-1.2/it85spi.c:121:8:  [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.
	ret = system("stop powerd >&2");
data/flashrom-1.2/it85spi.c:212:8:  [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.
	ret = system("start powerd >&2");
data/flashrom-1.2/nic3com.c:143:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/nicnatsemi.c:110:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/nicrealtek.c:133:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/print.c:165: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(ven, chip->vendor);
data/flashrom-1.2/print.c:190: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(dev, chip->name);
data/flashrom-1.2/print_wiki.c:445:2:  [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(wiki_header, buf, flashrom_version);
data/flashrom-1.2/rayer_spi.c:284:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/satamv.c:192:21:  [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.
#error PCI port I/O access is not supported on this architecture yet.
data/flashrom-1.2/serial.c:267: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(dev2 + 4, dev);
data/flashrom-1.2/cli_classic.c:185:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, optstring,
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:157:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "df:c:")) != -1) {
data/flashrom-1.2/at45db.c:294: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, tmp + 4, chunk - 4);
data/flashrom-1.2/at45db.c:477: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[4], bytes + off, cur_chunk);
data/flashrom-1.2/buspirate_spi.c:592: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(bp_commbuf + i, writearr, writecnt);
data/flashrom-1.2/buspirate_spi.c:623: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(readarr, bp_commbuf + 2 + writecnt, readcnt);
data/flashrom-1.2/buspirate_spi.c:648: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(bp_commbuf + i, writearr, writecnt);
data/flashrom-1.2/buspirate_spi.c:663: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(readarr, bp_commbuf + 1, readcnt);
data/flashrom-1.2/cbtable.c:217: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], part[256];
data/flashrom-1.2/cli_output.c:51:17:  [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 ((logfile = fopen(filename, "w")) == NULL) {
data/flashrom-1.2/dediprog.c:171: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.
		static char my_libusb_error[18 + 5 + 2];
data/flashrom-1.2/dediprog.c:172: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(my_libusb_error, "libusb error code %i", error_code);
data/flashrom-1.2/dediprog.c:640: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 usbbuf[512];
data/flashrom-1.2/dediprog.c:641: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(usbbuf, buf + i * chunksize, chunksize);
data/flashrom-1.2/dediprog.c:783: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[0x11];
data/flashrom-1.2/dediprog.c:864: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[1] = {0};
data/flashrom-1.2/dediprog.c:904: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[0x3];
data/flashrom-1.2/dediprog.c:936: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[1];
data/flashrom-1.2/digilent_spi.c:269: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(buf, writearr, writecnt);
data/flashrom-1.2/digilent_spi.c:310: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(readarr, &buf[writecnt], readcnt);
data/flashrom-1.2/digilent_spi.c:340: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 board[17];
data/flashrom-1.2/dmi.c:300: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 answerbuf[DMI_MAX_ANSWER_LEN];
data/flashrom-1.2/dmi.c:301: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 commandline[DMI_COMMAND_LEN_MAX];
data/flashrom-1.2/dummyflasher.c:59: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 spi_blacklist[256];
data/flashrom-1.2/dummyflasher.c:60: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 spi_ignorelist[256];
data/flashrom-1.2/dummyflasher.c:194:29:  [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).
		spi_write_256_chunksize = atoi(tmp);
data/flashrom-1.2/dummyflasher.c:490: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.
	const unsigned char sst25vf040_rems_response[2] = {0xbf, 0x44};
data/flashrom-1.2/dummyflasher.c:491: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.
	const unsigned char sst25vf032b_rems_response[2] = {0xbf, 0x4a};
data/flashrom-1.2/dummyflasher.c:492: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.
	const unsigned char mx25l6436_rems_response[2] = {0xc2, 0x16};
data/flashrom-1.2/dummyflasher.c:493: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.
	const unsigned char w25q128fv_rems_response[2] = {0xef, 0x17};
data/flashrom-1.2/dummyflasher.c:639:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(readarr, flashchip_contents + offs, readcnt);
data/flashrom-1.2/dummyflasher.c:653: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(flashchip_contents + offs, writearr + 4, writecnt - 4);
data/flashrom-1.2/dummyflasher.c:674:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(flashchip_contents + aai_offs, writearr + 4, 2);
data/flashrom-1.2/dummyflasher.c:687:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(flashchip_contents + aai_offs, writearr + 1, 2);
data/flashrom-1.2/dummyflasher.c:805: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(readarr, sfdp_table + offs, toread);
data/flashrom-1.2/edi.c:49: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 cmd[5];
data/flashrom-1.2/edi.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 cmd[4];
data/flashrom-1.2/edi.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 buffer[edi_read_buffer_length];
data/flashrom-1.2/flashrom.c:1160: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(flash->chip, chip, sizeof(struct flashchip));
data/flashrom-1.2/flashrom.c:1269: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).
	if ((image = fopen(filename, "rb")) == NULL) {
data/flashrom-1.2/flashrom.c:1312: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).
	if ((image = fopen(filename, "wb")) == NULL) {
data/flashrom-1.2/flashrom.c:1737: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(newc, info->newcontents + info->erase_start, erase_len);
data/flashrom-1.2/flashrom.c:1747:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(info->curcontents + start, newc, len);
data/flashrom-1.2/flashrom.c:1758:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(info->curcontents + start, newc + rel_start, len);
data/flashrom-1.2/flashrom.c:1799: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(curcontents, newcontents, erase_len);
data/flashrom-1.2/flashrom.c:2319:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(newcontents + start, oldcontents + start, included->start - start);
data/flashrom-1.2/flashrom.c:2329: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(newcontents + start, oldcontents + start, copy_len);
data/flashrom-1.2/flashrom.c:2389: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(curcontents, refcontents, flash_size);
data/flashrom-1.2/flashrom.c:2391:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(oldcontents, refcontents, flash_size);
data/flashrom-1.2/flashrom.c:2406:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(curcontents, oldcontents, flash_size);
data/flashrom-1.2/fmap.c:145: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(*fmap_out, fmap, fmap_size(fmap));
data/flashrom-1.2/ft2232_spi.c:172: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/flashrom-1.2/ft2232_spi.c:493: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 + i, writearr, writecnt);
data/flashrom-1.2/helpers.c:112:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(retbuf, src, maxlen);
data/flashrom-1.2/hwaccess.c:115:15:  [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 ((io_fd = open("/dev/io", O_RDWR)) < 0) {
data/flashrom-1.2/hwaccess.c:176: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(buf, addr, len);
data/flashrom-1.2/ich_descriptors.c:218:15:  [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 *const freq_str[3][8] = { {
data/flashrom-1.2/ich_descriptors.c:504:15:  [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 * const str_GPIO12[4] = {
data/flashrom-1.2/ichspi.c:363:15:  [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 *const spi_type[4] = {
data/flashrom-1.2/ichspi.c:369:15:  [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 *const atomic_type[3] = {
data/flashrom-1.2/layout.c:48: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 tempstr[256], tempname[256];
data/flashrom-1.2/layout.c:52:14:  [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).
	romlayout = fopen(name, "r");
data/flashrom-1.2/linux_mtd.c:51: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[strlen(LINUX_MTD_SYSFS_ROOT) + 32];
data/flashrom-1.2/linux_mtd.c:55:12:  [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 ((fp = fopen(path, "r")) == NULL) {
data/flashrom-1.2/linux_mtd.c:89: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[32];
data/flashrom-1.2/linux_mtd.c:126: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 mtd_device_name[32];
data/flashrom-1.2/linux_mtd.c:305: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 sysfs_path[32];
data/flashrom-1.2/linux_mtd.c:312: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[4];
data/flashrom-1.2/linux_mtd.c:323: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 dev_path[32];
data/flashrom-1.2/linux_mtd.c:339: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).
	if ((dev_fp = fopen(dev_path, "r+")) == NULL) {
data/flashrom-1.2/linux_mtd.c:384: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 sysfs_path[32];
data/flashrom-1.2/linux_spi.c:105: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).
	if ((fd = open(dev, O_RDWR)) == -1) {
data/flashrom-1.2/linux_spi.c:138:7:  [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).
	fp = fopen(BUF_SIZE_FROM_SYSFS, "r");
data/flashrom-1.2/linux_spi.c:144: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[10];
data/flashrom-1.2/mstarddc_spi.c:105:21:  [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 ((mstarddc_fd = open(i2c_device, O_RDWR)) < 0) {
data/flashrom-1.2/mstarddc_spi.c:171: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(cmd + 1, writearr, writecnt);
data/flashrom-1.2/ni845x_spi.c:117: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[1024];
data/flashrom-1.2/ni845x_spi.c:125: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[1024];
data/flashrom-1.2/ni845x_spi.c:137: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 resource_name[256];
data/flashrom-1.2/ni845x_spi.c:340: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 resource_handle[256], device_type_string[16];
data/flashrom-1.2/ni845x_spi.c:605: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(transfer_buffer, write_arr, write_cnt);
data/flashrom-1.2/ni845x_spi.c:628: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(read_arr, &transfer_buffer[write_cnt], read_cnt);
data/flashrom-1.2/physmap.c:174:23:  [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 (-1 == (fd_mem = open(MEM_DEV, O_RDWR | O_SYNC))) {
data/flashrom-1.2/physmap.c:193:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (-1 == (fd_mem_cached = open(MEM_DEV, O_RDWR))) {
data/flashrom-1.2/physmap.c:436: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 msrfilename[64];
data/flashrom-1.2/physmap.c:445: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).
	fd_msr = open(msrfilename, O_RDWR);
data/flashrom-1.2/physmap.c:512: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 msrfilename[64];
data/flashrom-1.2/physmap.c:521: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).
	fd_msr = open(msrfilename, O_RDWR);
data/flashrom-1.2/physmap.c:594: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 msrfilename[64];
data/flashrom-1.2/physmap.c:603: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).
	fd_msr = open(msrfilename, O_RDWR);
data/flashrom-1.2/pickit2_spi.c:282: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(readarr, &buf[1], readcnt);
data/flashrom-1.2/print_wiki.c:191: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 tmp[900 + 1];
data/flashrom-1.2/print_wiki.c:285: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 vmax[6];
data/flashrom-1.2/print_wiki.c:286: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 vmin[6];
data/flashrom-1.2/print_wiki.c:322: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(vmin, "%0.03f", f->voltage.min / (double)1000);
data/flashrom-1.2/print_wiki.c:323: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(vmax, "%0.03f", f->voltage.max / (double)1000);
data/flashrom-1.2/print_wiki.c:442: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[sizeof("1986-02-28T12:37:42Z")];
data/flashrom-1.2/processor_enable.c:31:12:  [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).
	cpuinfo = fopen("/proc/cpuinfo", "rb");
data/flashrom-1.2/processor_enable.c:35: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 line[512], *ptr;
data/flashrom-1.2/serial.c:266:3:  [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(dev2, "\\\\.\\");
data/flashrom-1.2/serial.c:283:7:  [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).
	fd = open(dev, O_RDWR | O_NOCTTY | O_NDELAY); // Use O_NDELAY to ignore DCD state
data/flashrom-1.2/serprog.c:108:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(&sp.si.sin_addr, hostPtr->h_addr_list[0], hostPtr->h_length);
data/flashrom-1.2/serprog.c:134: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/flashrom-1.2/serprog.c:278: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(&(sp[1]), parms, parmlen);
data/flashrom-1.2/serprog.c:335: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 pgmname[17];
data/flashrom-1.2/serprog.c:336: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 rbuf[3];
data/flashrom-1.2/serprog.c:358:11:  [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).
			baud = atoi(baud_str); // FIXME: replace atoi with strtoul
data/flashrom-1.2/serprog.c:399:34:  [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).
			sp_fd = sp_opensocket(device, atoi(port)); // FIXME: replace atoi with strtoul
data/flashrom-1.2/serprog.c:630:3:  [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((char *)pgmname, "(unknown)");
data/flashrom-1.2/serprog.c:685: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 header[7];
data/flashrom-1.2/serprog.c:806: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 writeb_parm[4];
data/flashrom-1.2/serprog.c:821: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[3];
data/flashrom-1.2/serprog.c:840: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 sbuf[6];
data/flashrom-1.2/serprog.c:878: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[4];
data/flashrom-1.2/serprog.c:923: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(parmbuf + 6, writearr, writecnt);
data/flashrom-1.2/sfdp.c:27: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.
	const unsigned char cmd[JEDEC_SFDP_OUTSIZE] = {
data/flashrom-1.2/spi25.c:32:24:  [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 unsigned char cmd[JEDEC_RDID_OUTSIZE] = { JEDEC_RDID };
data/flashrom-1.2/spi25.c:48:24:  [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 unsigned char cmd[JEDEC_REMS_OUTSIZE] = { JEDEC_REMS, };
data/flashrom-1.2/spi25.c:60:24:  [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 unsigned char cmd[JEDEC_RES_OUTSIZE] = { JEDEC_RES, };
data/flashrom-1.2/spi25.c:76:24:  [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 unsigned char cmd[JEDEC_WREN_OUTSIZE] = { JEDEC_WREN };
data/flashrom-1.2/spi25.c:90:24:  [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 unsigned char cmd[JEDEC_WRDI_OUTSIZE] = { JEDEC_WRDI };
data/flashrom-1.2/spi25.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 readarr[4];
data/flashrom-1.2/spi25.c:158: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 readarr[JEDEC_REMS_INSIZE];
data/flashrom-1.2/spi25.c:188: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 readarr[3];
data/flashrom-1.2/spi25.c:227: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 readarr[2];
data/flashrom-1.2/spi25.c:247: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 readarr[3];
data/flashrom-1.2/spi25.c:268:24:  [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 unsigned char cmd[AT25F_RDID_OUTSIZE] = { AT25F_RDID };
data/flashrom-1.2/spi25.c:269: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 readarr[AT25F_RDID_INSIZE];
data/flashrom-1.2/spi25.c:431: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(cmd + 1 + addr_len, out_bytes, out_len);
data/flashrom-1.2/spi25.c:727: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 cmd[JEDEC_AAI_WORD_PROGRAM_CONT_OUTSIZE] = {
data/flashrom-1.2/spi25_statusreg.c:95:24:  [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 unsigned char cmd[JEDEC_RDSR_OUTSIZE] = { JEDEC_RDSR };
data/flashrom-1.2/spi25_statusreg.c:97: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 readarr[2]; /* JEDEC_RDSR_INSIZE=1 but wbsio needs 2 */
data/flashrom-1.2/spi95.c:33:24:  [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 unsigned char cmd[ST_M95_RDID_OUTSIZE_MAX] = { ST_M95_RDID };
data/flashrom-1.2/spi95.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 readarr[ST_M95_RDID_INSIZE];
data/flashrom-1.2/usbdev.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 myserial[64];
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:79: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 fh = open(fn, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:175:7:  [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).
	fd = open(fn, O_RDONLY);
data/flashrom-1.2/atavia.c:126:7:  [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(arg) == 0) {
data/flashrom-1.2/buspirate_spi.c:118: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).
	unsigned int keylen = strlen(key);
data/flashrom-1.2/buspirate_spi.c:233:14:  [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 (dev && !strlen(dev)) {
data/flashrom-1.2/buspirate_spi.c:245:45:  [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 (!strncasecmp(spispeeds[i].name, tmp, strlen(spispeeds[i].name))) {
data/flashrom-1.2/buspirate_spi.c:259:48:  [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 (!strncasecmp(serialspeeds[i].name, tmp, strlen(serialspeeds[i].name))) {
data/flashrom-1.2/chipset_enable.c:428: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).
	if (idsel && strlen(idsel)) {
data/flashrom-1.2/cli_classic.c:309: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).
				namelen = strlen(name);
data/flashrom-1.2/cli_classic.c:314: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).
						if (!strlen(pparam)) {
data/flashrom-1.2/dediprog.c:953: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).
	if (!voltage || !strlen(voltage)) {
data/flashrom-1.2/dediprog.c:1135:7:  [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(dev_suffix) > 0) {
data/flashrom-1.2/dediprog.c:1159:7:  [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(target_suffix) > 0) {
data/flashrom-1.2/digilent_spi.c:425:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (p && strlen(p))
data/flashrom-1.2/dmi.c:330:3:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getc(dmidecode_pipe);
data/flashrom-1.2/dmi.c:337:37:  [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 (answerbuf[0] != 0 && answerbuf[strlen(answerbuf) - 1] == '\n')
data/flashrom-1.2/dmi.c:338: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).
		answerbuf[strlen(answerbuf) - 1] = 0;
data/flashrom-1.2/dmi.c:442: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).
	patternlen = strlen(pattern);
data/flashrom-1.2/dmi.c:444:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int valuelen = strlen(value);
data/flashrom-1.2/dummyflasher.c:204:7:  [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).
		i = strlen(tmp);
data/flashrom-1.2/dummyflasher.c:240:7:  [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).
		i = strlen(tmp);
data/flashrom-1.2/flash.h:193:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		enum test_state read;
data/flashrom-1.2/flash.h:237:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int (*read) (struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
data/flashrom-1.2/flashrom.c:556: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 (programmer_param && strlen(programmer_param)) {
data/flashrom-1.2/flashrom.c:678:14:  [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).
	needlelen = strlen(needle);
data/flashrom-1.2/flashrom.c:715:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(opt, opt_pos, optlen);
data/flashrom-1.2/flashrom.c:720:28:  [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).
		memmove(param_pos, rest, strlen(rest) + 1);
data/flashrom-1.2/flashrom.c:793:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (!flash->chip->read) {
data/flashrom-1.2/flashrom.c:813:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = flash->chip->read(flash, readbuf, start, len);
data/flashrom-1.2/flashrom.c:1128:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ret[strlen(ret) - 2] = '\0';
data/flashrom-1.2/flashrom.c:1129: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).
	ret = realloc(ret, strlen(ret) + 1);
data/flashrom-1.2/flashrom.c:1364:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (!flash->chip->read) {
data/flashrom-1.2/flashrom.c:1493:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (flashctx->chip->read(flashctx, buffer + region_start, region_start, region_len))
data/flashrom-1.2/flashrom.c:1645:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, backup_contents, start, len)) {
data/flashrom-1.2/flashrom.c:1655:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, backup_contents + rel_start, start, len)) {
data/flashrom-1.2/flashrom.c:1743:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, newc, start, len)) {
data/flashrom-1.2/flashrom.c:1754:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, newc + rel_start, start, len)) {
data/flashrom-1.2/flashrom.c:1852:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (flashctx->chip->read(flashctx, curcontents + region_start, region_start, region_len))
data/flashrom-1.2/flashrom.c:1904:14:  [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).
		pnamelen = strlen(pname);
data/flashrom-1.2/flashrom.c:2137:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (!chip->read) {
data/flashrom-1.2/flashrom.c:2402:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, oldcontents, 0, flash_size)) {
data/flashrom-1.2/flashrom.c:2422:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (!flashctx->chip->read(flashctx, curcontents, 0, flash_size)) {
data/flashrom-1.2/fmap.c:51:35:  [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 (memcmp(fmap, FMAP_SIGNATURE, strlen(FMAP_SIGNATURE)) != 0)
data/flashrom-1.2/fmap.c:166:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = flashctx->chip->read(flashctx, buf + rom_offset, rom_offset, len);
data/flashrom-1.2/fmap.c:187: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).
	const int sig_len = strlen(FMAP_SIGNATURE);
data/flashrom-1.2/fmap.c:229:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, (uint8_t *)fmap, offset, sig_len)) {
data/flashrom-1.2/fmap.c:242:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sig_len,
data/flashrom-1.2/fmap.c:274:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sizeof(*fmap),
data/flashrom-1.2/ft2232_spi.c:311:28:  [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 (channel_count < 0 || strlen(arg) != 1) {
data/flashrom-1.2/ft2232_spi.c:320: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 (arg && strlen(arg)) {
data/flashrom-1.2/helpers.c:54: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).
	dest = realloc(dest, strlen(dest) + strlen(src) + 1);
data/flashrom-1.2/helpers.c:54: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).
	dest = realloc(dest, strlen(dest) + strlen(src) + 1);
data/flashrom-1.2/helpers.c:109:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(src) > maxlen) {
data/flashrom-1.2/ich_descriptors.c:426:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					  desc->master.mstr[i].read & (1 << j) ? 'r' : ' ',
data/flashrom-1.2/ich_descriptors.c:456:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					  desc->master.mstr[i].read & (1 << j) ? 'r' : ' ',
data/flashrom-1.2/ich_descriptors.c:473:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					  desc->master.mstr[i].read & (1 << j) ? 'r' : ' ',
data/flashrom-1.2/ich_descriptors.h:240:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 read		:12,
data/flashrom-1.2/ichspi.c:1829: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).
		} else if (arg && !strlen(arg)) {
data/flashrom-1.2/internal.c:159: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).
	} else if (arg && !strlen(arg)) {
data/flashrom-1.2/internal.c:173: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).
	} else if (arg && !strlen(arg)) {
data/flashrom-1.2/internal.c:189: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).
	else if (arg && !strlen(arg)) {
data/flashrom-1.2/internal.c:201: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 (arg && strlen(arg)) {
data/flashrom-1.2/internal.c:206: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).
	} else if (arg && !strlen(arg)) {
data/flashrom-1.2/jlink_spi.c:214:8:  [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(arg)) {
data/flashrom-1.2/layout.c:68:12:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (2 != fscanf(romlayout, "%255s %255s\n", tempstr, tempname))
data/flashrom-1.2/libflashrom.c:155:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				(enum flashrom_test_state)flashchips[i].tested.read;
data/flashrom-1.2/libflashrom.c:470:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (flashctx->chip->read(flashctx, desc, 0, 0x1000)) {
data/flashrom-1.2/libflashrom.h:57:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		enum flashrom_test_state read;
data/flashrom-1.2/linux_mtd.c:51: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).
	char path[strlen(LINUX_MTD_SYSFS_ROOT) + 32];
data/flashrom-1.2/linux_spi.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).
	if (p && strlen(p)) {
data/flashrom-1.2/linux_spi.c:97: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).
	if (!dev || !strlen(dev)) {
data/flashrom-1.2/mstarddc_spi.c:77:28:  [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 (i2c_device != NULL && strlen(i2c_device) > 0) {
data/flashrom-1.2/mstarddc_spi.c:83:30:  [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 (i2c_address == NULL || strlen(i2c_address) == 0) {
data/flashrom-1.2/ni845x_spi.c:74: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).
	if (!voltage || !strlen(voltage)) {
data/flashrom-1.2/ni845x_spi.c:409:7:  [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(CS_str) > 1 || CS_number < 0 || 7 < CS_number) {
data/flashrom-1.2/opaque.c:36:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return flash->mst->opaque.read(flash, buf, start, len);
data/flashrom-1.2/opaque.c:53:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (!mst->probe || !mst->read || !mst->write || !mst->erase) {
data/flashrom-1.2/physmap.c:393:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd_msr, buf, 8) == 8) {
data/flashrom-1.2/pickit2_spi.c:296: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).
	if (!voltage || !strlen(voltage)) {
data/flashrom-1.2/pony_spi.c:124: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 (arg && strlen(arg)) {
data/flashrom-1.2/pony_spi.c:152: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).
	} else if (arg && !strlen(arg)) {
data/flashrom-1.2/print.c:44: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 maxvendorlen = strlen("Vendor") + 1;
data/flashrom-1.2/print.c:45: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 maxchiplen = strlen("Device") + 1;
data/flashrom-1.2/print.c:46: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 maxtypelen = strlen("Type") + 1;
data/flashrom-1.2/print.c:97:32:  [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).
		maxtypelen = max(maxtypelen, strlen(s));
data/flashrom-1.2/print.c:106: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("Vendor"); i < maxvendorlen; i++)
data/flashrom-1.2/print.c:109: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("Device"); i < maxchiplen; i++)
data/flashrom-1.2/print.c:123: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("Type"); i < maxtypelen; i++)
data/flashrom-1.2/print.c:160:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		ven = malloc(strlen(chip->vendor) + 1);
data/flashrom-1.2/print.c:169: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).
		curvenlen = strlen(tmpven);
data/flashrom-1.2/print.c:173:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			tmpvenlen = strlen(tmpven);
data/flashrom-1.2/print.c:184:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		dev = malloc(strlen(chip->name) + 1);
data/flashrom-1.2/print.c:194: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).
		curdevlen = strlen(tmpdev);
data/flashrom-1.2/print.c:198:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			tmpdevlen = strlen(tmpdev);
data/flashrom-1.2/print.c:260: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).
		for (i = strlen(s); i < maxtypelen; i++)
data/flashrom-1.2/print.c:276:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				curvenlen = strlen(tmpven);
data/flashrom-1.2/print.c:280:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					tmpvenlen = strlen(tmpven);
data/flashrom-1.2/print.c:295:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				curdevlen = strlen(tmpdev);
data/flashrom-1.2/print.c:299:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					tmpdevlen = strlen(tmpdev);
data/flashrom-1.2/print.c:321: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).
	size_t maxvendorlen = strlen("Vendor") + 1;
data/flashrom-1.2/print.c:322: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 maxchipsetlen = strlen("Chipset") + 1;
data/flashrom-1.2/print.c:326:36:  [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).
		maxvendorlen = MAX(maxvendorlen, strlen(c->vendor_name));
data/flashrom-1.2/print.c:327: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).
		maxchipsetlen = MAX(maxchipsetlen, strlen(c->device_name));
data/flashrom-1.2/print.c:335: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("Vendor"); i < maxvendorlen; i++)
data/flashrom-1.2/print.c:339: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("Chipset"); i < maxchipsetlen; i++)
data/flashrom-1.2/print.c:346:34:  [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 = 0; i < maxvendorlen - strlen(c->vendor_name); i++)
data/flashrom-1.2/print.c:349:35:  [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 = 0; i < maxchipsetlen - strlen(c->device_name); i++)
data/flashrom-1.2/print.c:363: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).
	size_t maxvendorlen = strlen("Vendor") + 1;
data/flashrom-1.2/print.c:364: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).
	size_t maxboardlen = strlen("Board") + 1;
data/flashrom-1.2/print.c:367:36:  [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).
		maxvendorlen = max(maxvendorlen, strlen(b->vendor));
data/flashrom-1.2/print.c:368:34:  [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).
		maxboardlen = max(maxboardlen, strlen(b->name));
data/flashrom-1.2/print.c:384: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("Vendor"); i < maxvendorlen; i++)
data/flashrom-1.2/print.c:388: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("Board"); i < maxboardlen; i++)
data/flashrom-1.2/print.c:392:47:  [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 = 0; i < maxvendorlen + maxboardlen + strlen("Status  "); i++)
data/flashrom-1.2/print.c:398:34:  [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 = 0; i < maxvendorlen - strlen(b->vendor); i++)
data/flashrom-1.2/print.c:401: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).
		for (i = 0; i < maxboardlen - strlen(b->name); i++)
data/flashrom-1.2/print.c:432:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int maxvendorlen = strlen("Vendor") + 1;
data/flashrom-1.2/print.c:433:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int maxdevlen = strlen("Device") + 1;
data/flashrom-1.2/print.c:437:36:  [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).
		maxvendorlen = max(maxvendorlen, strlen(devs[i].vendor_name));
data/flashrom-1.2/print.c:438:30:  [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).
		maxdevlen = max(maxdevlen, strlen(devs[i].device_name));
data/flashrom-1.2/print.c:444: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("Vendor"); i < maxvendorlen; i++)
data/flashrom-1.2/print.c:448: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("Device"); i < maxdevlen; i++)
data/flashrom-1.2/print.c:456: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).
		for (j = strlen(devs[i].vendor_name); j < maxvendorlen; j++)
data/flashrom-1.2/print.c:459: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).
		for (j = strlen(devs[i].device_name); j < maxdevlen; j++)
data/flashrom-1.2/print_wiki.c:330:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		       test_state_to_template(f->tested.read),
data/flashrom-1.2/processor_enable.c:42:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(ptr, "cpu", strlen("cpu")) == 0)
data/flashrom-1.2/processor_enable.c:43: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).
			ptr += strlen("cpu");
data/flashrom-1.2/processor_enable.c:46: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).
		if (strncmp(ptr, "model", strlen("model")) != 0)
data/flashrom-1.2/processor_enable.c:48:10:  [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).
		ptr += strlen("model");
data/flashrom-1.2/processor_enable.c:57:47:  [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).
		return (strncmp(ptr, "ICT Loongson-2 V0.3", strlen("ICT Loongson-2 V0.3")) == 0) ||
data/flashrom-1.2/processor_enable.c:58:50:  [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).
		       (strncmp(ptr, "Godson2 V0.3  FPU V0.1", strlen("Godson2 V0.3  FPU V0.1")) == 0);
data/flashrom-1.2/programmer.h:608:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int (*read)(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
data/flashrom-1.2/programmer.h:690:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int (*read) (struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
data/flashrom-1.2/sb600spi.c:498: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).
	} else if (arg && !strlen(arg)) {
data/flashrom-1.2/serial.c:147: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).
	if (lpMsgBuf[strlen(lpMsgBuf)-1] != '\n')
data/flashrom-1.2/serial.c:257:7:  [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(dev) > 3) &&
data/flashrom-1.2/serial.c:261:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		dev2 = malloc(strlen(dev) + 5);
data/flashrom-1.2/serial.c:430:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		tmp = read(sp_fd, buf, readcnt);
data/flashrom-1.2/serial.c:491:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rv = read(sp_fd, c + rd_bytes, readcnt - rd_bytes);
data/flashrom-1.2/serprog.c:99: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).
		hostPtr = gethostbyaddr(ip, strlen(ip), AF_INET);
data/flashrom-1.2/serprog.c:343:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (device && strlen(device)) {
data/flashrom-1.2/serprog.c:359:7:  [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(device) > 0) {
data/flashrom-1.2/serprog.c:370:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (device && !strlen(device)) {
data/flashrom-1.2/serprog.c:385:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (device && strlen(device)) {
data/flashrom-1.2/serprog.c:392:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!port || !strlen(port)) {
data/flashrom-1.2/serprog.c:398:7:  [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(device)) {
data/flashrom-1.2/serprog.c:407:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (device && !strlen(device)) {
data/flashrom-1.2/serprog.c:510: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).
		if (spispeed && strlen(spispeed)) {
data/flashrom-1.2/serprog.c:522:8:  [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(f_spi_suffix) == 1) {
data/flashrom-1.2/serprog.c:532: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).
			} else if (strlen(f_spi_suffix) > 1) {
data/flashrom-1.2/spi.c:110:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = flash->mst->spi.read(flash, buf, start, to_read);
data/flashrom-1.2/spi.c:138:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (!mst->write_aai || !mst->write_256 || !mst->read || !mst->command ||
data/flashrom-1.2/udelay.c:231:2:  [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(usecs % 1000000);
data/flashrom-1.2/usbdev.c:108:50:  [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).
	return 0 != strncmp(serialno, (char *)myserial, strlen(serialno));
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:70:14:  [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).
	fn = malloc(strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2);
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:70: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).
	fn = malloc(strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2);
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:70:50:  [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).
	fn = malloc(strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2);
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:75: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).
	snprintf(fn, strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2,
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:75:32:  [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).
	snprintf(fn, strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2,
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:75:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(fn, strlen(prefix) + strlen(reg_name) + strlen(".bin") + 2,
data/flashrom-1.2/util/ich_descriptors_tool/ich_descriptors_tool.c:192:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (len != read(fd, buf, len))

ANALYSIS SUMMARY:

Hits = 324
Lines analyzed = 60505 in approximately 1.65 seconds (36565 lines/second)
Physical Source Lines of Code (SLOC) = 48212
Hits@level = [0]  92 [1] 159 [2] 135 [3]   2 [4]  28 [5]   0
Hits@level+ = [0+] 416 [1+] 324 [2+] 165 [3+]  30 [4+]  28 [5+]   0
Hits/KSLOC@level+ = [0+] 8.62856 [1+] 6.72032 [2+] 3.42238 [3+] 0.622252 [4+] 0.580768 [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.