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/efivar-37/src/vars.c
Examining data/efivar-37/src/test/tester.c
Examining data/efivar-37/src/path-helpers.h
Examining data/efivar-37/src/path-helpers.c
Examining data/efivar-37/src/makeguids.c
Examining data/efivar-37/src/loadopt.c
Examining data/efivar-37/src/linux-sas.c
Examining data/efivar-37/src/linux-pmem.c
Examining data/efivar-37/src/linux-i2o.c
Examining data/efivar-37/src/linux-ata.c
Examining data/efivar-37/src/linux-acpi.c
Examining data/efivar-37/src/lib.h
Examining data/efivar-37/src/lib.c
Examining data/efivar-37/src/include/efivar/efivar-dp.h
Examining data/efivar-37/src/include/efivar/efiboot.h
Examining data/efivar-37/src/include/efivar/efiboot-loadopt.h
Examining data/efivar-37/src/include/efivar/efiboot-creator.h
Examining data/efivar-37/src/include/efivar/efivar.h
Examining data/efivar-37/src/hexdump.h
Examining data/efivar-37/src/guid.h
Examining data/efivar-37/src/gpt.h
Examining data/efivar-37/src/gpt.c
Examining data/efivar-37/src/generics.h
Examining data/efivar-37/src/fix_coverity.h
Examining data/efivar-37/src/export.c
Examining data/efivar-37/src/error.c
Examining data/efivar-37/src/efivarfs.c
Examining data/efivar-37/src/efivar_endian.h
Examining data/efivar-37/src/efivar.h
Examining data/efivar-37/src/efivar.c
Examining data/efivar-37/src/efiboot.h
Examining data/efivar-37/src/dp.c
Examining data/efivar-37/src/dp-media.c
Examining data/efivar-37/src/dp-hw.c
Examining data/efivar-37/src/dp-acpi.c
Examining data/efivar-37/src/disk.h
Examining data/efivar-37/src/disk.c
Examining data/efivar-37/src/creator.c
Examining data/efivar-37/src/crc32.h
Examining data/efivar-37/src/crc32.c
Examining data/efivar-37/src/linux-emmc.c
Examining data/efivar-37/src/linux-md.c
Examining data/efivar-37/src/linux-sata.c
Examining data/efivar-37/src/linux-scsi.c
Examining data/efivar-37/src/util.h
Examining data/efivar-37/src/dp-message.c
Examining data/efivar-37/src/dp.h
Examining data/efivar-37/src/guid.c
Examining data/efivar-37/src/ucs2.h
Examining data/efivar-37/src/linux-acpi-root.c
Examining data/efivar-37/src/linux-pci-root.c
Examining data/efivar-37/src/linux-pci.c
Examining data/efivar-37/src/linux-soc-root.c
Examining data/efivar-37/src/linux-virtblk.c
Examining data/efivar-37/src/linux.h
Examining data/efivar-37/src/linux.c
Examining data/efivar-37/src/linux-virtual-root.c
Examining data/efivar-37/src/linux-nvme.c

FINAL RESULTS:

data/efivar-37/src/creator.c:64:8:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			l = readlink(linkbuf, tmp, PATH_MAX);
data/efivar-37/src/efivarfs.c:495:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rc = chmod(path, mode);
data/efivar-37/src/linux.h:226:41:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
                        _rc = _linksz = readlink(_pn, _lb, PATH_MAX);   \
data/efivar-37/src/makeguids.c:121:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rc = chmod(argv[4], 0644);
data/efivar-37/src/makeguids.c:128:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rc = chmod(argv[5], 0644);
data/efivar-37/src/vars.c:498:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			rc = chmod(new_path, mode & ~mask);
data/efivar-37/src/creator.c:53:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(linkbuf, filepath);
data/efivar-37/src/creator.c:71:4:  [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(linkbuf, tmp);
data/efivar-37/src/dp-acpi.c:322:4:  [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(next, hidstr);
data/efivar-37/src/dp-acpi.c:325:4:  [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(next, uidstr);
data/efivar-37/src/dp-acpi.c:328:4:  [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(next, cidstr);
data/efivar-37/src/dp.h:41:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			_x = snprintf(_inbuf, _insize, fmt, ## args);	\
data/efivar-37/src/efivar.c:102:4:  [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(GUID_FORMAT "-%s\n",
data/efivar-37/src/efivar.c:170:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(name_buf, guid_name + name_pos);
data/efivar-37/src/efivarfs.c:64:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (!access(path, F_OK)) {
data/efivar-37/src/guid.c:66:8:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		rc = snprintf(NULL, 0, GUID_FORMAT,
data/efivar-37/src/guid.c:74:8:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		rc = snprintf(*sp, GUID_LENGTH_WITH_NUL, GUID_FORMAT,
data/efivar-37/src/include/efivar/efivar.h:188:31:  [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, 5, 6)));
data/efivar-37/src/include/efivar/efivar.h:205:28:  [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, 5, 6)))
data/efivar-37/src/linux-nvme.c:84:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		rc = sscanf(current, subdirs[i].fmt, &pos0, &pos1, &pos2);
data/efivar-37/src/linux-pmem.c:76:17:  [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.
        uint8_t system, sysbus, acpi_id;
data/efivar-37/src/linux-pmem.c:106:22:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                    &system, &sysbus, &pnp_id, &acpi_id, &ndbus, &region,
data/efivar-37/src/linux-sas.c:90:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
        rc = sscanf((char *)filebuf, "%"PRIx64, sas_address);
data/efivar-37/src/linux-sas.c:109:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
        rc = sscanf((char *)filebuf, "%"PRIx64, sas_address);
data/efivar-37/src/linux-virtual-root.c:62:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		rc = sscanf(current, subdirs[i].fmt, &pos0, &pos1);
data/efivar-37/src/linux.h:207: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.
			rc_ = access(pn_, mode);			\
data/efivar-37/src/test/tester.c:79:26:  [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, 4, 5)));
data/efivar-37/src/test/tester.c:85:2:  [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.
	vfprintf(stderr, fmt, ap);
data/efivar-37/src/util.h:50:47:  [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 PRINTF(...) __attribute__((__format__(printf, __VA_ARGS__)))
data/efivar-37/src/util.h:370:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                        fprintf(logfile_, fmt, ## args);                \
data/efivar-37/src/vars.c:236:7:  [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(newvar, F_OK))
data/efivar-37/src/vars.c:576:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (!access(path, F_OK)) {
data/efivar-37/src/efivar.c:413:14:  [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 ((c = getopt_long(argc, argv, sopts, lopts, &i)) != -1) {
data/efivar-37/src/efivarfs.c:53:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv("EFIVARFS_PATH");
data/efivar-37/src/efivarfs.c:78:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
			tmp = getenv("EFIVARFS_PATH");
data/efivar-37/src/lib.c:240:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *ops_name = getenv("LIBEFIVAR_OPS");
data/efivar-37/src/linux-pmem.c:152:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        if (getenv("LIBEFIBOOT_SWIZZLE_PMEM_UUID") != NULL) {
data/efivar-37/src/vars.c:45:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv("VARS_PATH");
data/efivar-37/src/creator.c:44: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 linkbuf[PATH_MAX+1] = "";
data/efivar-37/src/creator.c:61:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char tmp[PATH_MAX+1] = "";
data/efivar-37/src/creator.c:77:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	mounts = fopen("/proc/self/mounts", "r");
data/efivar-37/src/creator.c:153: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).
	rc = open(diskpath, flags);
data/efivar-37/src/creator.c:186: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(devpath, O_RDONLY);
data/efivar-37/src/creator.c:360: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(devpath, O_RDONLY);
data/efivar-37/src/dp-hw.c:114: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(&edd_dp->vendor_guid, &edd10_guid, sizeof (edd10_guid));
data/efivar-37/src/dp-media.c:110:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char label[40];
data/efivar-37/src/dp-message.c:395:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char label[40];
data/efivar-37/src/dp-message.c:541: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 target_name[sz + 1];
data/efivar-37/src/dp-message.c:542: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(target_name, dp->iscsi.target_name, sz);
data/efivar-37/src/dp-message.c:581: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 uri[sz + 1];
data/efivar-37/src/dp-message.c:582: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(uri, dp->uri.uri, sz);
data/efivar-37/src/dp-message.c:660: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(mac->mac_addr, mac_addr,
data/efivar-37/src/dp-message.c:823: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(&nvdimm->uuid, uuid, sizeof(*uuid));
data/efivar-37/src/dp.c:59: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(data, buf, bufsize);
data/efivar-37/src/dp.c:95: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(new, dp, sz);
data/efivar-37/src/dp.c:186: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(new, dp0, lsz);
data/efivar-37/src/dp.c:187: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((uint8_t *)new + lsz, dp1, rsz);
data/efivar-37/src/dp.c:245: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(new, dp, lsz);
data/efivar-37/src/dp.c:247: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((uint8_t *)new + lsz, dn, rsz);
data/efivar-37/src/dp.c:248: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((uint8_t *)new + lsz + rsz, &end_entire, sizeof (end_entire));
data/efivar-37/src/dp.c:293: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(new, dp, lsz);
data/efivar-37/src/dp.c:294: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((uint8_t *)new + lsz, dpi, rsz);
data/efivar-37/src/dp.c:432: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(vend->vendor_data, data, data_size);
data/efivar-37/src/dp.h:65: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(__newbuf, buf, len);				\
data/efivar-37/src/dp.h:141: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(_ucs2buf, str, _ucs2size - sizeof(uint16_t));	\
data/efivar-37/src/efivar.c:118: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 guid_buf[guid_len + 2];
data/efivar-37/src/efivar.c:340: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(filename, O_RDONLY);
data/efivar-37/src/efivarfs.c:151: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(path, O_RDONLY);
data/efivar-37/src/efivarfs.c:256: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(path, O_RDONLY);
data/efivar-37/src/efivarfs.c:364:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	rfd = open(path, O_RDONLY);
data/efivar-37/src/efivarfs.c:394:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	wfd = open(path, open_wflags, mode);
data/efivar-37/src/efivarfs.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(buf, &attributes, sizeof (attributes));
data/efivar-37/src/efivarfs.c:432: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 + sizeof (attributes), data, data_size);
data/efivar-37/src/error.c:125: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(&error_table[current], &et, sizeof(et));
data/efivar-37/src/export.c:129: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(var.data, ptr, data_len);
data/efivar-37/src/export.c:142: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(*var_out, &var, sizeof (var));
data/efivar-37/src/export.c:181: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(ptr, var->guid, sizeof (efi_guid_t));
data/efivar-37/src/export.c:195: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(ptr, var->data, var->data_size);
data/efivar-37/src/generics.h:38: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 ret_name[NAME_MAX+1];
data/efivar-37/src/generics.h:154: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(d, data, data_size);
data/efivar-37/src/generics.h:155: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(d + data_size, new_data, new_data_size);
data/efivar-37/src/gpt.c:240: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(buffer, iobuf, bytes);
data/efivar-37/src/gpt.c:753: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(signature, &p->unique_partition_guid,
data/efivar-37/src/guid.c:129: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(&key.guid, guid, sizeof (*guid));
data/efivar-37/src/guid.c:238: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(guid, sym, sizeof(*guid));
data/efivar-37/src/guid.c:253: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(key.name, name, namelen);
data/efivar-37/src/guid.c:257: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(key.name, name + 1, namelen);
data/efivar-37/src/guid.c:267: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(guid, &result->guid, sizeof (*guid));
data/efivar-37/src/guid.c:275: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 tmpname[sizeof(key.name) + 9];
data/efivar-37/src/guid.c:276:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(tmpname, "efi_guid_");
data/efivar-37/src/guid.h:86: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 eightbytes[9] = "";
data/efivar-37/src/guid.h:87: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 fourbytes[5] = "";
data/efivar-37/src/guid.h:88:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char twobytes[3] = "";
data/efivar-37/src/guid.h:183: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 symbol[256];
data/efivar-37/src/guid.h:184:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[256];
data/efivar-37/src/hexdump.h:74: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 hexbuf[49];
data/efivar-37/src/hexdump.h:75: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 txtbuf[19];
data/efivar-37/src/lib.h:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[NAME_MAX];
data/efivar-37/src/linux-nvme.c:164:17:  [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(dev->nvme_info.eui, eui, sizeof(eui));
data/efivar-37/src/linux.c:610:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char busname[PATH_MAX+1] = "";
data/efivar-37/src/linux.h:187:33:  [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(buf2_, buf_, bufsize_);          \
data/efivar-37/src/linux.h:280:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char slashdev_[sizeof("device")				\
data/efivar-37/src/loadopt.c:105: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(pos, dp, dp_size);
data/efivar-37/src/loadopt.c:109: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(pos, optional_data, optional_data_size);
data/efivar-37/src/loadopt.c:281:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(filename, "r");
data/efivar-37/src/loadopt.c:331: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, utf8, req);
data/efivar-37/src/makeguids.c:106: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).
	in = open(argv[1], O_RDONLY);
data/efivar-37/src/makeguids.c:110: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).
	guidout = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0644);
data/efivar-37/src/makeguids.c:114: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).
	nameout = open(argv[3], O_WRONLY|O_CREAT|O_TRUNC, 0644);
data/efivar-37/src/makeguids.c:118:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	symout = fopen(argv[4], "w");
data/efivar-37/src/makeguids.c:125:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	header = fopen(argv[5], "w");
data/efivar-37/src/makeguids.c:178: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(&outbuf[line-1].guid, &guid, sizeof(guid));
data/efivar-37/src/makeguids.c:179: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(outbuf[line-1].symbol, "efi_guid_");
data/efivar-37/src/path-helpers.h:38:33:  [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(ret_, pos_, len_);               \
data/efivar-37/src/test/tester.c:49: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/urandom", O_RDONLY);
data/efivar-37/src/util.h:322:14:  [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(path, O_RDONLY);
data/efivar-37/src/vars.c:73: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 raw_var[NAME_MAX + 9];
data/efivar-37/src/vars.c:77:2:  [2] (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). Risk is low because the
  source is a constant string.
	strcat(raw_var, "/raw_var");
data/efivar-37/src/vars.c:85: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[4096];
data/efivar-37/src/vars.c:187:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(filename, O_RDONLY);
data/efivar-37/src/vars.c:330: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(path, O_RDONLY);
data/efivar-37/src/vars.c:361: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(*data, var64->Data, var64->DataSize);
data/efivar-37/src/vars.c:380: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(*data, var32->Data, var32->DataSize);
data/efivar-37/src/vars.c:424: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(path, O_RDONLY);
data/efivar-37/src/vars.c:453: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(delvar, O_WRONLY);
data/efivar-37/src/vars.c:599: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(var64.Data, data, data_size);
data/efivar-37/src/vars.c:601:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(newvar, O_WRONLY);
data/efivar-37/src/vars.c:617: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(var32.Data, data, data_size);
data/efivar-37/src/vars.c:619:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(newvar, O_WRONLY);
data/efivar-37/src/creator.c:47: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).
	linklen = strlen(filepath);
data/efivar-37/src/creator.c:112: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).
			ssize_t mntlen = strlen(me->mnt_dir);
data/efivar-37/src/disk.c:208:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	this_bytes_read = read(fd, mbr_sector, mbr_size);
data/efivar-37/src/dp-acpi.c:309: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).
	size_t hidlen = hidstr ? strlen(hidstr) : 0;
data/efivar-37/src/dp-acpi.c:310: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).
	size_t uidlen = uidstr ? strlen(uidstr) : 0;
data/efivar-37/src/dp-acpi.c:311: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).
	size_t cidlen = cidstr ? strlen(cidstr) : 0;
data/efivar-37/src/dp.h:83:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					   strlen(_guidstr)+1);		\
data/efivar-37/src/efivar.c:137:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(guid_buf, guid_name, name_pos);
data/efivar-37/src/efivar.c:146: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(guid_name) < guid_len + 2)
data/efivar-37/src/efivar.c:155:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(guid_buf, guid_name, guid_len - 1);
data/efivar-37/src/efivar.c:164: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).
	name_len = strlen(guid_name + name_pos) + 1;
data/efivar-37/src/efivar.c:504: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).
					guid[i].symbol + strlen("efi_guid_"),
data/efivar-37/src/efivarfs.c:262: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(ratelimit);
data/efivar-37/src/efivarfs.c:263:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, &ret_attributes, sizeof (ret_attributes));
data/efivar-37/src/efivarfs.c:269: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(ratelimit);
data/efivar-37/src/efivarfs.c:332: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(name) > 1024) {
data/efivar-37/src/efivarfs.c:334:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		efi_error("name too long (%zu of 1024)", strlen(name));
data/efivar-37/src/export.c:152:20:  [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 name_len = strlen(var->name);
data/efivar-37/src/generics.h:87: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).
	size_t guidlen = strlen(guidtext);
data/efivar-37/src/generics.h:98:20:  [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 namelen = strlen(de->d_name);
data/efivar-37/src/generics.h:111:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ret_name, de->d_name, sizeof(ret_name));
data/efivar-37/src/gpt.c:239:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytesread = read(fd, iobuf, iobuf_size);
data/efivar-37/src/guid.c:152: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).
		return *name ? (int)strlen(*name) : -1;
data/efivar-37/src/guid.c:167: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).
		return *symbol ? (int)strlen(*symbol) : -1;
data/efivar-37/src/guid.c:185: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).
					result->symbol + strlen("efi_guid_"));
data/efivar-37/src/guid.c:188: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).
					result->symbol + strlen("efi_guid_"));
data/efivar-37/src/guid.c:192: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).
				result->symbol + strlen("efi_guid_"));
data/efivar-37/src/guid.h:46: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).
	size_t sl = strlen("84be9c3e-8a32-42c0-891c-4cd3b072becc");
data/efivar-37/src/guid.h:89: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).
	size_t textlen = strlen(text);
data/efivar-37/src/guid.h:90: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).
	size_t guidlen = strlen("84be9c3e-8a32-42c0-891c-4cd3b072becc");
data/efivar-37/src/guid.h:106:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(eightbytes, text, 8);
data/efivar-37/src/guid.h:114:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fourbytes, text+9, 4);
data/efivar-37/src/guid.h:122:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fourbytes, text+14, 4);
data/efivar-37/src/guid.h:130:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fourbytes, text+19, 4);
data/efivar-37/src/guid.h:138:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+24, 2);
data/efivar-37/src/guid.h:145:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+26, 2);
data/efivar-37/src/guid.h:152:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+28, 2);
data/efivar-37/src/guid.h:159:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+30, 2);
data/efivar-37/src/guid.h:166:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+32, 2);
data/efivar-37/src/guid.h:173:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(twobytes, text+34, 2);
data/efivar-37/src/linux-acpi-root.c:73:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(devpart) < 8)
data/efivar-37/src/linux-acpi.c:53: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).
                size_t l = strlen(fbuf);
data/efivar-37/src/linux-acpi.c:67: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).
        rc = strlen(fbuf);
data/efivar-37/src/linux-acpi.c:107: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).
                        int l = strlen((char *)fbuf);
data/efivar-37/src/linux.c:628:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ifr.ifr_name, ifname, IF_NAMESIZE);
data/efivar-37/src/linux.c:641:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(busname, drvinfo.bus_info, PATH_MAX);
data/efivar-37/src/linux.h:281: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).
				       + try_ * strlen("/device")];		\
data/efivar-37/src/loadopt.c:321: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).
	req = strlen((char *)utf8);
data/efivar-37/src/makeguids.c:180:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(outbuf[line-1].symbol, symbol,
data/efivar-37/src/makeguids.c:181: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).
					255 - strlen("efi_guid_"));
data/efivar-37/src/makeguids.c:182:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(outbuf[line-1].name, name, 255);
data/efivar-37/src/test/tester.c:53:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int rc = read(fd, retdata, size);
data/efivar-37/src/util.h:173:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                s = read(fd, p, size - filesize);
data/efivar-37/src/util.h:252:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(__out, __in, __len);                            \
data/efivar-37/src/util.h: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).
                        int len_ = strlen(fmt);                         \
data/efivar-37/src/vars.c:76:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(raw_var, name, NAME_MAX);
data/efivar-37/src/vars.c:89:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		sz = read(fd, buf, 4096);
data/efivar-37/src/vars.c:336: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(ratelimit);
data/efivar-37/src/vars.c:483:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t mask = umask(umask(0));
data/efivar-37/src/vars.c:483:22:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t mask = umask(umask(0));
data/efivar-37/src/vars.c:484: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).
	size_t len = strlen(path);
data/efivar-37/src/vars.c:519: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(name) > 1024) {
data/efivar-37/src/vars.c:551: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(name) > 1024) {
data/efivar-37/src/vars.c:553: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).
			  strlen(name));

ANALYSIS SUMMARY:

Hits = 193
Lines analyzed = 14477 in approximately 0.44 seconds (32968 lines/second)
Physical Source Lines of Code (SLOC) = 10605
Hits@level = [0] 109 [1]  64 [2]  91 [3]   6 [4]  26 [5]   6
Hits@level+ = [0+] 302 [1+] 193 [2+] 129 [3+]  38 [4+]  32 [5+]   6
Hits/KSLOC@level+ = [0+] 28.4771 [1+] 18.199 [2+] 12.1641 [3+] 3.58322 [4+] 3.01744 [5+] 0.565771
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.