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/ndctl-70.1/acpi.h
Examining data/ndctl-70.1/ccan/array_size/array_size.h
Examining data/ndctl-70.1/ccan/build_assert/build_assert.h
Examining data/ndctl-70.1/ccan/check_type/check_type.h
Examining data/ndctl-70.1/ccan/container_of/container_of.h
Examining data/ndctl-70.1/ccan/endian/endian.h
Examining data/ndctl-70.1/ccan/list/list.c
Examining data/ndctl-70.1/ccan/list/list.h
Examining data/ndctl-70.1/ccan/minmax/minmax.h
Examining data/ndctl-70.1/ccan/short_types/short_types.h
Examining data/ndctl-70.1/ccan/str/debug.c
Examining data/ndctl-70.1/ccan/str/str.c
Examining data/ndctl-70.1/ccan/str/str.h
Examining data/ndctl-70.1/ccan/str/str_debug.h
Examining data/ndctl-70.1/daxctl/acpi.c
Examining data/ndctl-70.1/daxctl/builtin.h
Examining data/ndctl-70.1/daxctl/daxctl.c
Examining data/ndctl-70.1/daxctl/device.c
Examining data/ndctl-70.1/daxctl/lib/libdaxctl-private.h
Examining data/ndctl-70.1/daxctl/lib/libdaxctl.c
Examining data/ndctl-70.1/daxctl/libdaxctl.h
Examining data/ndctl-70.1/daxctl/list.c
Examining data/ndctl-70.1/daxctl/migrate.c
Examining data/ndctl-70.1/ndctl/action.h
Examining data/ndctl-70.1/ndctl/bat.c
Examining data/ndctl-70.1/ndctl/builtin.h
Examining data/ndctl-70.1/ndctl/bus.c
Examining data/ndctl-70.1/ndctl/check.c
Examining data/ndctl-70.1/ndctl/create-nfit.c
Examining data/ndctl-70.1/ndctl/dimm.c
Examining data/ndctl-70.1/ndctl/firmware-update.h
Examining data/ndctl-70.1/ndctl/inject-error.c
Examining data/ndctl-70.1/ndctl/inject-smart.c
Examining data/ndctl-70.1/ndctl/lib/ars.c
Examining data/ndctl-70.1/ndctl/lib/dimm.c
Examining data/ndctl-70.1/ndctl/lib/firmware.c
Examining data/ndctl-70.1/ndctl/lib/hpe1.c
Examining data/ndctl-70.1/ndctl/lib/hpe1.h
Examining data/ndctl-70.1/ndctl/lib/hyperv.c
Examining data/ndctl-70.1/ndctl/lib/hyperv.h
Examining data/ndctl-70.1/ndctl/lib/inject.c
Examining data/ndctl-70.1/ndctl/lib/intel.c
Examining data/ndctl-70.1/ndctl/lib/intel.h
Examining data/ndctl-70.1/ndctl/lib/libndctl.c
Examining data/ndctl-70.1/ndctl/lib/msft.c
Examining data/ndctl-70.1/ndctl/lib/msft.h
Examining data/ndctl-70.1/ndctl/lib/nfit.c
Examining data/ndctl-70.1/ndctl/lib/papr.c
Examining data/ndctl-70.1/ndctl/lib/papr.h
Examining data/ndctl-70.1/ndctl/lib/papr_pdsm.h
Examining data/ndctl-70.1/ndctl/lib/private.h
Examining data/ndctl-70.1/ndctl/lib/smart.c
Examining data/ndctl-70.1/ndctl/libndctl-nfit.h
Examining data/ndctl-70.1/ndctl/libndctl.h
Examining data/ndctl-70.1/ndctl/list.c
Examining data/ndctl-70.1/ndctl/load-keys.c
Examining data/ndctl-70.1/ndctl/monitor.c
Examining data/ndctl-70.1/ndctl/namespace.c
Examining data/ndctl-70.1/ndctl/namespace.h
Examining data/ndctl-70.1/ndctl/ndctl.c
Examining data/ndctl-70.1/ndctl/ndctl.h
Examining data/ndctl-70.1/ndctl/region.c
Examining data/ndctl-70.1/ndctl/test.c
Examining data/ndctl-70.1/ndctl/util/json-smart.c
Examining data/ndctl-70.1/ndctl/util/keys.c
Examining data/ndctl-70.1/ndctl/util/keys.h
Examining data/ndctl-70.1/test.h
Examining data/ndctl-70.1/test/ack-shutdown-count-set.c
Examining data/ndctl-70.1/test/blk_namespaces.c
Examining data/ndctl-70.1/test/core.c
Examining data/ndctl-70.1/test/dax-dev.c
Examining data/ndctl-70.1/test/dax-errors.c
Examining data/ndctl-70.1/test/dax-pmd.c
Examining data/ndctl-70.1/test/dax-poison.c
Examining data/ndctl-70.1/test/daxdev-errors.c
Examining data/ndctl-70.1/test/device-dax.c
Examining data/ndctl-70.1/test/dpa-alloc.c
Examining data/ndctl-70.1/test/dsm-fail.c
Examining data/ndctl-70.1/test/hugetlb.c
Examining data/ndctl-70.1/test/libndctl.c
Examining data/ndctl-70.1/test/list-smart-dimm.c
Examining data/ndctl-70.1/test/mmap.c
Examining data/ndctl-70.1/test/multi-pmem.c
Examining data/ndctl-70.1/test/parent-uuid.c
Examining data/ndctl-70.1/test/pmem_namespaces.c
Examining data/ndctl-70.1/test/revoke-devmem.c
Examining data/ndctl-70.1/test/smart-listen.c
Examining data/ndctl-70.1/test/smart-notify.c
Examining data/ndctl-70.1/util/abspath.c
Examining data/ndctl-70.1/util/bitmap.c
Examining data/ndctl-70.1/util/bitmap.h
Examining data/ndctl-70.1/util/filter.c
Examining data/ndctl-70.1/util/filter.h
Examining data/ndctl-70.1/util/fletcher.h
Examining data/ndctl-70.1/util/help.c
Examining data/ndctl-70.1/util/iomem.c
Examining data/ndctl-70.1/util/iomem.h
Examining data/ndctl-70.1/util/json.c
Examining data/ndctl-70.1/util/json.h
Examining data/ndctl-70.1/util/list.h
Examining data/ndctl-70.1/util/log.c
Examining data/ndctl-70.1/util/log.h
Examining data/ndctl-70.1/util/main.c
Examining data/ndctl-70.1/util/main.h
Examining data/ndctl-70.1/util/parse-options.c
Examining data/ndctl-70.1/util/parse-options.h
Examining data/ndctl-70.1/util/size.c
Examining data/ndctl-70.1/util/size.h
Examining data/ndctl-70.1/util/strbuf.c
Examining data/ndctl-70.1/util/strbuf.h
Examining data/ndctl-70.1/util/sysfs.c
Examining data/ndctl-70.1/util/sysfs.h
Examining data/ndctl-70.1/util/usage.c
Examining data/ndctl-70.1/util/util.h
Examining data/ndctl-70.1/util/wrapper.c

FINAL RESULTS:

data/ndctl-70.1/daxctl/acpi.c:371:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, fmt, ##__VA_ARGS__); \
data/ndctl-70.1/daxctl/lib/libdaxctl.c:291:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/%s/size", base, attrs);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:295:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/%s/align", base, attrs);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:484:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", devname);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:490:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/resource", daxdev_base);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:496:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/size", daxdev_base);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:510:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/target_node", daxdev_base);
data/ndctl-70.1/daxctl/list.c:55:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "daxctl-%s:%s:%d: " fmt, \
data/ndctl-70.1/ndctl/check.c:1260:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/ndctl/lib/libndctl.c:887:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/dev", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:892:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/commands", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:897:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/nfit/revision", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:906:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/of_node/compatible", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:912:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/nfit/dsm_mask", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:918:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/provider", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:926:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/wait_probe", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:931:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/nfit/scrub", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:936:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/firmware/activate", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:942:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/device/firmware/capability", ctl_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1573:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s\n", method == NDCTL_FWA_METHOD_LIVE ? "live" : "quiesce");
data/ndctl-70.1/ndctl/lib/libndctl.c:1672:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/papr/flags", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1706:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/id", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1721:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/handle", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1726:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/phys_id", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1731:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/serial", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1735:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/vendor", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1739:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/device", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1743:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/rev_id", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1747:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/dirty_shutdown", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1751:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/subsystem_vendor", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1755:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/subsystem_device", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1759:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/subsystem_rev_id", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1763:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/family", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1767:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/dsm_mask", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1771:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/format", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1775:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/nfit/format%d", dimm_base, i);
data/ndctl-70.1/ndctl/lib/libndctl.c:1780:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/flags", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1804:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/formats", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1816:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/dev", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1822:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/commands", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1836:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/modalias", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1859:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/flags", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1866:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/firmware/activate", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:1872:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/firmware/result", dimm_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2473:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nstype", region->region_path);
data/ndctl-70.1/ndctl/lib/libndctl.c:2479:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/set_cookie", region->region_path);
data/ndctl-70.1/ndctl/lib/libndctl.c:2533:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/size", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2538:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/mappings", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2543:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nfit/range_index", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2551:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/read_only", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2556:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/modalias", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2561:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/numa_node", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2569:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/target_node", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2575:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/align", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2596:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/persistence_domain", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:2602:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/deep_flush", region_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3754:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(mapping_path, "%s/mapping%d", region->region_path, i);
data/ndctl-70.1/ndctl/lib/libndctl.c:3947:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/nstype", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3952:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/size", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3957:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/resource", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3963:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/force_raw", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3968:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/numa_node", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3974:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/target_node", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3980:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/holder_class", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:3987:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/sector_size", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:4000:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/alt_name", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:4007:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/uuid", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:4028:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/modalias", ndns_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:4623:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "/dev/%s", bdev);
data/ndctl-70.1/ndctl/lib/libndctl.c:5117:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/modalias", btt_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5122:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/uuid", btt_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5128:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/sector_size", btt_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5134:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/size", btt_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5468:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/modalias", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5473:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/uuid", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5479:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/mode", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5491:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/align", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5497:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/resource", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5503:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/size", pfn_base);
data/ndctl-70.1/ndctl/lib/libndctl.c:5515:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/supported_alignments", pfn_base);
data/ndctl-70.1/ndctl/list.c:74:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "ndctl-%s:%s:%d: " fmt, \
data/ndctl-70.1/ndctl/load-keys.c:44:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	rc = sprintf(path, "%s/nvdimm-master.blob", keypath);
data/ndctl-70.1/ndctl/load-keys.c:128:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(desc, "nvdimm:%s", id);
data/ndctl-70.1/ndctl/monitor.c:71:3:  [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(stdout, format, args);
data/ndctl-70.1/ndctl/monitor.c:73:3:  [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, format, args);
data/ndctl-70.1/ndctl/monitor.c:86:3:  [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(f, format, args);
data/ndctl-70.1/ndctl/monitor.c:88:3:  [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(f, format, args);
data/ndctl-70.1/ndctl/namespace.c:102:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, fmt, ##__VA_ARGS__); \
data/ndctl-70.1/ndctl/namespace.c:109:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, "%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \
data/ndctl-70.1/ndctl/namespace.c:1057:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/ndctl/namespace.c:2024:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/ndctl/util/keys.c:35:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(path, "%s/nvdimm-old_%s_%s.blob",
data/ndctl-70.1/ndctl/util/keys.c:41:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(path, "%s/nvdimm_%s_%s.blob",
data/ndctl-70.1/ndctl/util/keys.c:47:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(path, "%s/nvdimm-master-old_%s_%s.blob",
data/ndctl-70.1/ndctl/util/keys.c:53:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(path, "%s/nvdimm-master_%s_%s.blob",
data/ndctl-70.1/ndctl/util/keys.c:77:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(desc, "nvdimm-old:%s",
data/ndctl-70.1/ndctl/util/keys.c:81:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(desc, "nvdimm:%s",
data/ndctl-70.1/ndctl/util/keys.c:85:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(desc, "nvdimm-master-old:%s",
data/ndctl-70.1/ndctl/util/keys.c:89:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(desc, "nvdimm-master:%s",
data/ndctl-70.1/ndctl/util/keys.c:182:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		rc = sprintf(pl, "keyhandle=%s", postfix);
data/ndctl-70.1/ndctl/util/keys.c:242:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	rc = sprintf(cmd, "new enc32 %s 32", kek);
data/ndctl-70.1/test/blk_namespaces.c:323:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns[0]));
data/ndctl-70.1/test/blk_namespaces.c:326:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns[1]));
data/ndctl-70.1/test/core.c:210:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "/sys/module/%s/taint", name);
data/ndctl-70.1/test/dax-pmd.c:150:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(path, "%s/hugepages-%ldkB/nr_hugepages",
data/ndctl-70.1/test/device-dax.c:177:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", ndctl_pfn_get_block_device(pfn));
data/ndctl-70.1/test/device-dax.c:221:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "/dev/%s", daxctl_dev_get_devname(dev));
data/ndctl-70.1/test/dsm-fail.c:66:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/fail_cmd", dimm_path);
data/ndctl-70.1/test/dsm-fail.c:71:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/fail_cmd_code", dimm_path);
data/ndctl-70.1/test/dsm-fail.c:77:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/fail_cmd", dimm_path);
data/ndctl-70.1/test/dsm-fail.c:210:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/handle", DIMM_PATH);
data/ndctl-70.1/test/dsm-fail.c:333:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/fail_cmd", DIMM_PATH);
data/ndctl-70.1/test/libndctl.c:705:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(devpath, "/dev/%s", daxctl_dev_get_devname(dax_dev));
data/ndctl-70.1/test/libndctl.c:910:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdevpath, "/dev/%s", ndctl_pfn_get_block_device(pfn));
data/ndctl-70.1/test/libndctl.c:1141:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(bdevpath, "/dev/%s", ndctl_btt_get_block_device(btt));
data/ndctl-70.1/test/libndctl.c:1300:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_pfn_get_block_device(pfn));
data/ndctl-70.1/test/libndctl.c:1330:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/test/libndctl.c:1415:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/test/libndctl.c:1482:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_btt_get_block_device(btt));
data/ndctl-70.1/test/libndctl.c:1512:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/test/libndctl.c:1552:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(bdevpath, "/dev/%s",
data/ndctl-70.1/test/libndctl.c:1555:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(bdevpath, "/dev/%s",
data/ndctl-70.1/test/libndctl.c:1558:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(bdevpath, "/dev/%s",
data/ndctl-70.1/test/list-smart-dimm.c:20:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "ndctl-%s:%s:%d: " fmt, \
data/ndctl-70.1/test/multi-pmem.c:213:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(devname, "%s", ndctl_namespace_get_devname(ndns));
data/ndctl-70.1/test/multi-pmem.c:227:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(devname, "%s", ndctl_namespace_get_devname(ndns));
data/ndctl-70.1/test/pmem_namespaces.c:253:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(bdev, "/dev/%s", ndctl_namespace_get_block_device(ndns));
data/ndctl-70.1/test/revoke-devmem.c:33:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
data/ndctl-70.1/util/help.c:31:24:  [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.
#define pr_err(x, ...) fprintf(stderr, x, ##__VA_ARGS__)
data/ndctl-70.1/util/help.c:59:3:  [4] (shell) execlp:
  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.
		execlp(path, filename, "newTab", man_page.buf, NULL);
data/ndctl-70.1/util/help.c:71:2:  [4] (shell) execlp:
  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.
	execlp(path, "man", page, NULL);
data/ndctl-70.1/util/log.c:36: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, format, args);
data/ndctl-70.1/util/log.h:32:24:  [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, 6, 7)));
data/ndctl-70.1/util/log.h:34:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static inline void __attribute__((always_inline, format(printf, 2, 3)))
data/ndctl-70.1/util/strbuf.c:112:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
data/ndctl-70.1/util/strbuf.c:119:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
data/ndctl-70.1/util/strbuf.h:102: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/ndctl-70.1/util/sysfs.c:107:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fmt, "%s%%d", dev_name);
data/ndctl-70.1/util/sysfs.c:110:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if (sscanf(de->d_name, fmt, &id) != 1)
data/ndctl-70.1/util/usage.c:24:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(msg, sizeof(msg), err, params);
data/ndctl-70.1/util/util.h:92:64:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
data/ndctl-70.1/util/util.h:93:56:  [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.
int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
data/ndctl-70.1/util/util.h:94:59:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
data/ndctl-70.1/daxctl/lib/libdaxctl.c:359:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	resolved = realpath(path, NULL);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:394:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	mod_path = realpath(path, NULL);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:649:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	region_path = realpath(path, NULL);
data/ndctl-70.1/ndctl/lib/libndctl.c:713:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	dev_path = realpath(path, NULL);
data/ndctl-70.1/test/core.c:36:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *kver = getenv("KVER");
data/ndctl-70.1/test/device-dax.c:185:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(getpid());
data/ndctl-70.1/test/mmap.c:91:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "RMSApsrw")) != -1) {
data/ndctl-70.1/util/help.c:36:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *display = getenv("DISPLAY");
data/ndctl-70.1/util/help.c:108:25:  [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.
	const char *old_path = getenv("MANPATH");
data/ndctl-70.1/util/help.c:137:25:  [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.
	const char *fallback = getenv(viewer);
data/ndctl-70.1/util/log.h:69:27:  [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.
#    define secure_getenv getenv
data/ndctl-70.1/acpi.h:25: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(uuid, &uuid_pmem, 16);
data/ndctl-70.1/daxctl/acpi.c:256:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 char *names[ACPI_TABLES] = {
data/ndctl-70.1/daxctl/acpi.c:266: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 *table[ACPI_TABLES];
data/ndctl-70.1/daxctl/acpi.c:267: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 *new_table[ACPI_TABLES];
data/ndctl-70.1/daxctl/acpi.c:305: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(nfit, container->nfit, sizeof(*nfit));
data/ndctl-70.1/daxctl/acpi.c:313: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, ent->tbl, readw(&ent->tbl->length));
data/ndctl-70.1/daxctl/acpi.c:347: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(srat, container->srat, sizeof(*srat));
data/ndctl-70.1/daxctl/acpi.c:355: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, ent->tbl, readb(&ent->tbl->length));
data/ndctl-70.1/daxctl/acpi.c:828: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).
		rc = open(param.table[i], O_RDONLY);
data/ndctl-70.1/daxctl/acpi.c:846: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).
		rc = open(param.new_table[i], O_RDWR | O_TRUNC | O_CREAT, 0640);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:266: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:380: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[200];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:419: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:471: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:566: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[SYSFS_ATTR_SIZE], *end;
data/ndctl-70.1/daxctl/lib/libdaxctl.c:592: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:613: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 daxdev_fmt[50];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:620:2:  [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(daxdev_fmt, "dax%d.", region->id);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:744: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[200];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:803: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[200];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:1056: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:1168: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/lib/libdaxctl.c:1221: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/daxctl/libdaxctl.h:22:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char uuid_t[16];
data/ndctl-70.1/ndctl/check.c:182: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(a->map.info2, a->map.info, BTT_INFO_SIZE);
data/ndctl-70.1/ndctl/check.c:242: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(log, &a->map.log[lane], LOG_GRP_SIZE);
data/ndctl-70.1/ndctl/check.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(&a->map.log[lane], log, LOG_GRP_SIZE);
data/ndctl-70.1/ndctl/check.c:296: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(ent, &log.ent[a->log_index[new_ent]], LOG_ENT_SIZE);
data/ndctl-70.1/ndctl/check.c:1185: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[50];
data/ndctl-70.1/ndctl/check.c:1274:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	bttc->fd = open(bttc->path, open_flags);
data/ndctl-70.1/ndctl/create-nfit.c:90: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(nfit->h.signature, "NFIT", 4);
data/ndctl-70.1/ndctl/create-nfit.c:93: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(nfit->h.oemid, "LOCAL", 6);
data/ndctl-70.1/ndctl/create-nfit.c:122: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(file, O_RDWR|O_CREAT|O_EXCL, mode);
data/ndctl-70.1/ndctl/create-nfit.c:127: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(file, O_RDWR|O_CREAT|O_TRUNC, mode);
data/ndctl-70.1/ndctl/dimm.c:119: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 uuid[40];
data/ndctl-70.1/ndctl/dimm.c:322: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/ndctl-70.1/ndctl/dimm.c:1309: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).
		actx.f_out = fopen(param.outfile, "w+");
data/ndctl-70.1/ndctl/dimm.c:1350: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).
		actx.f_in = fopen(param.infile, "r");
data/ndctl-70.1/ndctl/lib/dimm.c:175: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(sig, nsindex[i]->sig, NSINDEX_SIG_LEN);
data/ndctl-70.1/ndctl/lib/dimm.c:414: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(nsindex->sig, NSINDEX_SIGNATURE, NSINDEX_SIG_LEN);
data/ndctl-70.1/ndctl/lib/dimm.c:656: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:679: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:711: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:750: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:752:2:  [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(buf, "update %ld %ld\n", ckey, nkey);
data/ndctl-70.1/ndctl/lib/dimm.c:759: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:761:2:  [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(buf, "disable %ld\n", key);
data/ndctl-70.1/ndctl/lib/dimm.c:772: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:774:2:  [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(buf, "erase %ld\n", key);
data/ndctl-70.1/ndctl/lib/dimm.c:780: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:782:2:  [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(buf, "overwrite %ld\n", key);
data/ndctl-70.1/ndctl/lib/dimm.c:790: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:801: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|O_CLOEXEC);
data/ndctl-70.1/ndctl/lib/dimm.c:866:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:868:2:  [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(buf, "master_update %ld %ld\n", ckey, nkey);
data/ndctl-70.1/ndctl/lib/dimm.c:875: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/dimm.c:877:2:  [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(buf, "master_erase %ld\n", key);
data/ndctl-70.1/ndctl/lib/hpe1.h:330:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char				buf[128];
data/ndctl-70.1/ndctl/lib/intel.c:616: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->intel->send.data, data, len);
data/ndctl-70.1/ndctl/lib/libndctl.c:403:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	bb_iter->file = fopen(bb_path, "re");
data/ndctl-70.1/ndctl/lib/libndctl.c:871: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1040: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1107: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1130: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1153: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1217: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1225:2:  [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(buf, "%#lx\n", align);
data/ndctl-70.1/ndctl/lib/libndctl.c:1239: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1309: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1335: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1428: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[SYSFS_ATTR_SIZE] = { 0 };
data/ndctl-70.1/ndctl/lib/libndctl.c:1434: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(bus->scrub_path, O_RDONLY|O_CLOEXEC);
data/ndctl-70.1/ndctl/lib/libndctl.c:1527: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1556: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1582: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1593:2:  [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(buf, "%d\n", arg);
data/ndctl-70.1/ndctl/lib/libndctl.c:1612: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1623:2:  [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(buf, "%d\n", arg);
data/ndctl-70.1/ndctl/lib/libndctl.c:1661: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1684:26:  [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).
		dimm->health_eventfd = open(path, O_RDONLY|O_CLOEXEC);
data/ndctl-70.1/ndctl/lib/libndctl.c:1695: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:1784:25:  [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).
	dimm->health_eventfd = open(path, O_RDONLY|O_CLOEXEC);
data/ndctl-70.1/ndctl/lib/libndctl.c:1796: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2334: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2357: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2470: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2507: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2603: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).
	region->flush_fd = open(path, O_RDWR | O_CLOEXEC);
data/ndctl-70.1/ndctl/lib/libndctl.c:2682: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2715: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2773: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:2977: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->vendor->in_buf, buf, len);
data/ndctl-70.1/ndctl/lib/libndctl.c:3004: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, to_vendor_tail(cmd)->out_buf, len);
data/ndctl-70.1/ndctl/lib/libndctl.c:3213: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, iter->total_buf + offset, len);
data/ndctl-70.1/ndctl/lib/libndctl.c:3262: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(cfg_write->iter.total_buf + offset, buf, len);
data/ndctl-70.1/ndctl/lib/libndctl.c:3384: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(iter->data, iter->total_buf + offset,
data/ndctl-70.1/ndctl/lib/libndctl.c:3393: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(iter->total_buf + offset, iter->data,
data/ndctl-70.1/ndctl/lib/libndctl.c:3414: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[20], *prefix;
data/ndctl-70.1/ndctl/lib/libndctl.c:3448: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_RDWR);
data/ndctl-70.1/ndctl/lib/libndctl.c:3675: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:3731: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 *mapping_path, buf[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:3934: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4058: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 ndns_fmt[20];
data/ndctl-70.1/ndctl/lib/libndctl.c:4064:2:  [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(ndns_fmt, "namespace%d.", region->id);
data/ndctl-70.1/ndctl/lib/libndctl.c:4124: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4148: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4172: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4216: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4330: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4363: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[200];
data/ndctl-70.1/ndctl/lib/libndctl.c:4422: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[200];
data/ndctl-70.1/ndctl/lib/libndctl.c:4440: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 btt_fmt[20];
data/ndctl-70.1/ndctl/lib/libndctl.c:4446:2:  [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(btt_fmt, "btt%d.", region->id);
data/ndctl-70.1/ndctl/lib/libndctl.c:4453: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 pfn_fmt[20];
data/ndctl-70.1/ndctl/lib/libndctl.c:4459:2:  [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(pfn_fmt, "pfn%d.", region->id);
data/ndctl-70.1/ndctl/lib/libndctl.c:4466: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 dax_fmt[20];
data/ndctl-70.1/ndctl/lib/libndctl.c:4472:2:  [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(dax_fmt, "dax%d.", region->id);
data/ndctl-70.1/ndctl/lib/libndctl.c:4612: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[50];
data/ndctl-70.1/ndctl/lib/libndctl.c:4624: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(path, O_RDWR|O_EXCL);
data/ndctl-70.1/ndctl/lib/libndctl.c:4713: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(uu, ndns->uuid, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:4721: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 uuid[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:4733: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(ndns->uuid, uu, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:4766: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 sector_str[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:4785:2:  [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(sector_str, "%d\n", sector_size);
data/ndctl-70.1/ndctl/lib/libndctl.c:4853: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4861:2:  [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(buf, "%#llx\n", size);
data/ndctl-70.1/ndctl/lib/libndctl.c:4930: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:4950:2:  [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(buf, "%d\n", state);
data/ndctl-70.1/ndctl/lib/libndctl.c:4973: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:5096: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:5207: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:5230: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(uu, btt->uuid, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:5243: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 uuid[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:5255: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(btt->uuid, uu, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:5265: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 sector_str[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:5274:2:  [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(sector_str, "%d\n", sector_size);
data/ndctl-70.1/ndctl/lib/libndctl.c:5452: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:5517: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(buf, "%d %d", SZ_4K, SZ_2M);
data/ndctl-70.1/ndctl/lib/libndctl.c:5618: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/ndctl/lib/libndctl.c:5641: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(uu, pfn->uuid, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:5659: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 uuid[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:5671: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(pfn->uuid, uu, sizeof(uuid_t));
data/ndctl-70.1/ndctl/lib/libndctl.c:5740: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 align_str[40];
data/ndctl-70.1/ndctl/lib/libndctl.c:5748:2:  [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(align_str, "%lu\n", align);
data/ndctl-70.1/ndctl/lib/private.h:290: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 cmd_buf[0];
data/ndctl-70.1/ndctl/libndctl.h:26:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char uuid_t[16];
data/ndctl-70.1/ndctl/load-keys.c:41: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[PATH_MAX];
data/ndctl-70.1/ndctl/load-keys.c: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 desc[ND_KEY_DESC_SIZE];
data/ndctl-70.1/ndctl/load-keys.c:202:18:  [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).
	lk_ctx->dirfd = open(param.key_path, O_DIRECTORY);
data/ndctl-70.1/ndctl/monitor.c:157: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 timestamp[32];
data/ndctl-70.1/ndctl/monitor.c:166:2:  [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(timestamp, "%10ld.%09ld", ts.tv_sec, ts.tv_nsec);
data/ndctl-70.1/ndctl/monitor.c:508: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(config_file, "r");
data/ndctl-70.1/ndctl/monitor.c:636:23:  [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).
			monitor.log_file = fopen(monitor.log, "a+");
data/ndctl-70.1/ndctl/namespace.c:91: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[NSLABEL_NAME_LEN];
data/ndctl-70.1/ndctl/namespace.c:1038: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[50];
data/ndctl-70.1/ndctl/namespace.c:1058: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_RDWR|O_DIRECT|O_EXCL);
data/ndctl-70.1/ndctl/namespace.c:1551:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[40];
data/ndctl-70.1/ndctl/namespace.c:1639:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[40];
data/ndctl-70.1/ndctl/namespace.c:1790: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(path, O_RDONLY|O_EXCL);
data/ndctl-70.1/ndctl/namespace.c:1892: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(pfn_sb->signature, sig, PFN_SIG_LEN);
data/ndctl-70.1/ndctl/namespace.c:1893: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(pfn_sb->uuid, uuid, 16);
data/ndctl-70.1/ndctl/namespace.c:1894: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(pfn_sb->parent_uuid, parent_uuid, 16);
data/ndctl-70.1/ndctl/namespace.c:1920: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(path, O_CREAT|O_RDWR, 0644);
data/ndctl-70.1/ndctl/namespace.c:1999:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[40];
data/ndctl-70.1/ndctl/namespace.c:2000: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[50];
data/ndctl-70.1/ndctl/namespace.c:2084:19:  [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).
			ri_ctx.f_out = fopen(param.outfile, "w+");
data/ndctl-70.1/ndctl/namespace.h: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 sig[NSINDEX_SIG_LEN];
data/ndctl-70.1/ndctl/namespace.h:63:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char free[0];
data/ndctl-70.1/ndctl/namespace.h:80: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 uuid[NSLABEL_UUID_LEN];
data/ndctl-70.1/ndctl/namespace.h:81: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[NSLABEL_NAME_LEN];
data/ndctl-70.1/ndctl/namespace.h:96: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 type_guid[NSLABEL_UUID_LEN];
data/ndctl-70.1/ndctl/namespace.h:97: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 abstraction_guid[NSLABEL_UUID_LEN];
data/ndctl-70.1/ndctl/util/keys.c:24: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 hostname[HOST_NAME_MAX];
data/ndctl-70.1/ndctl/util/keys.c:157: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(blob, prefix, strlen(prefix));
data/ndctl-70.1/ndctl/util/keys.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 desc[ND_KEY_DESC_SIZE];
data/ndctl-70.1/ndctl/util/keys.c:204: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 desc[ND_KEY_DESC_SIZE];
data/ndctl-70.1/ndctl/util/keys.c:205: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[PATH_MAX];
data/ndctl-70.1/ndctl/util/keys.c:206:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[ND_KEY_CMD_SIZE];
data/ndctl-70.1/ndctl/util/keys.c:262: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(path, "w");
data/ndctl-70.1/ndctl/util/keys.c:293: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 desc[ND_KEY_DESC_SIZE];
data/ndctl-70.1/ndctl/util/keys.c:294: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[PATH_MAX];
data/ndctl-70.1/ndctl/util/keys.c:338: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 old_path[PATH_MAX];
data/ndctl-70.1/ndctl/util/keys.c:339: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 new_path[PATH_MAX];
data/ndctl-70.1/ndctl/util/keys.c:381: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[PATH_MAX];
data/ndctl-70.1/test/blk_namespaces.c:126: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/urandom", O_RDONLY)) < 0) {
data/ndctl-70.1/test/blk_namespaces.c:141: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(bdev, O_RDWR|O_DIRECT)) < 0) {
data/ndctl-70.1/test/blk_namespaces.c:216: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 bdev[50];
data/ndctl-70.1/test/core.c:90: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 requires[KVER_STRLEN], current[KVER_STRLEN];
data/ndctl-70.1/test/core.c:156: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 attr[SYSFS_ATTR_SIZE];
data/ndctl-70.1/test/core.c:158: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 buf[100];
data/ndctl-70.1/test/dax-dev.c: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 path[256];
data/ndctl-70.1/test/dax-dev.c:90: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_RDWR | O_EXCL);
data/ndctl-70.1/test/dax-errors.c:78: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, base, 4096);
data/ndctl-70.1/test/dax-errors.c:131: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(argv[1], O_RDWR | O_DIRECT);
data/ndctl-70.1/test/dax-pmd.c:144: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 path[256];
data/ndctl-70.1/test/dax-pmd.c:152: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).
				f_nrhuge = fopen(path, "r+");
data/ndctl-70.1/test/dax-pmd.c:183:9:  [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).
		fd2 = open(TEST_FILE, O_CREAT|O_TRUNC|O_DIRECT|O_RDWR,
data/ndctl-70.1/test/dax-pmd.c:210:4:  [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(addr, "odirect data");
data/ndctl-70.1/test/dax-pmd.c:215:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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)[0] = 0;
data/ndctl-70.1/test/dax-pmd.c:226:4:  [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(addr, "fork data");
data/ndctl-70.1/test/dax-pmd.c:250:4:  [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(buf, "O_DIRECT write of unfaulted address\n");
data/ndctl-70.1/test/dax-pmd.c:374: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(argv[1], O_RDWR);
data/ndctl-70.1/test/daxdev-errors.c:260: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[256];
data/ndctl-70.1/test/daxdev-errors.c:261: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[SYSFS_ATTR_SIZE];
data/ndctl-70.1/test/device-dax.c:59: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 align[32];
data/ndctl-70.1/test/device-dax.c:67:2:  [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(align, "%ld", __align);
data/ndctl-70.1/test/device-dax.c:75: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 align[32];
data/ndctl-70.1/test/device-dax.c:83:2:  [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(align, "%ld", __align);
data/ndctl-70.1/test/device-dax.c:152: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, path[100], data[VERIFY_BUF_SIZE];
data/ndctl-70.1/test/device-dax.c:178: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_RDWR);
data/ndctl-70.1/test/device-dax.c:222: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/ndctl-70.1/test/device-dax.c:258: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(path, O_RDWR);
data/ndctl-70.1/test/device-dax.c:283: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(path, O_RDWR);
data/ndctl-70.1/test/device-dax.c:299:9:  [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).
		fd2 = open("/proc/self/smaps", O_RDONLY);
data/ndctl-70.1/test/device-dax.c:320: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_RDWR);
data/ndctl-70.1/test/dpa-alloc.c:53: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 uuid_str[40];
data/ndctl-70.1/test/dsm-fail.c:62: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[1024], buf[SYSFS_ATTR_SIZE];
data/ndctl-70.1/test/dsm-fail.c:67: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(buf, "%#x\n", 1 << cmd);
data/ndctl-70.1/test/dsm-fail.c:72: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(buf, "%d\n", error_code);
data/ndctl-70.1/test/dsm-fail.c:78: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(buf, "0\n");
data/ndctl-70.1/test/dsm-fail.c:192:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[1024], buf[SYSFS_ATTR_SIZE];
data/ndctl-70.1/test/dsm-fail.c:334:2:  [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(buf, "0\n");
data/ndctl-70.1/test/libndctl.c:533: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 devname[50];
data/ndctl-70.1/test/libndctl.c:632: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 devpath[50];
data/ndctl-70.1/test/libndctl.c:674: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 expect[40], actual[40];
data/ndctl-70.1/test/libndctl.c:706: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_RDWR);
data/ndctl-70.1/test/libndctl.c:853: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 bdevpath[50];
data/ndctl-70.1/test/libndctl.c:912: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(bdevpath, O_RDWR|O_DIRECT);
data/ndctl-70.1/test/libndctl.c:1061: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 bdevpath[50];
data/ndctl-70.1/test/libndctl.c:1143: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(bdevpath, O_RDWR|O_DIRECT);
data/ndctl-70.1/test/libndctl.c:1194: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 devname[50];
data/ndctl-70.1/test/libndctl.c:1269: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 bdev[50];
data/ndctl-70.1/test/libndctl.c:1301: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(bdev, O_RDONLY);
data/ndctl-70.1/test/libndctl.c:1331: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(bdev, O_RDWR|O_DIRECT|O_EXCL);
data/ndctl-70.1/test/libndctl.c:1366: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 bdev[50];
data/ndctl-70.1/test/libndctl.c:1416: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(bdev, O_RDWR|O_DIRECT|O_EXCL);
data/ndctl-70.1/test/libndctl.c:1451: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 bdev[50];
data/ndctl-70.1/test/libndctl.c:1483: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(bdev, O_RDONLY);
data/ndctl-70.1/test/libndctl.c:1513: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(bdev, O_RDWR|O_DIRECT|O_EXCL);
data/ndctl-70.1/test/libndctl.c:1548: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 bdevpath[50];
data/ndctl-70.1/test/libndctl.c:1561: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(bdevpath, O_RDONLY);
data/ndctl-70.1/test/libndctl.c:1594: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(bdevpath, O_RDWR|O_DIRECT);
data/ndctl-70.1/test/libndctl.c:1678: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 devname[50];
data/ndctl-70.1/test/libndctl.c:1810:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char expect[40], actual[40];
data/ndctl-70.1/test/libndctl.c:1967: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 devname[50];
data/ndctl-70.1/test/libndctl.c:1993: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 devname[50];
data/ndctl-70.1/test/libndctl.c:2006: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 expect[40], actual[40];
data/ndctl-70.1/test/libndctl.c:2084: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[SZ_128K];
data/ndctl-70.1/test/libndctl.c:2118: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[20], result[sizeof(buf)];
data/ndctl-70.1/test/libndctl.c:2152:2:  [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(buf, "dimm-%#x", ndctl_dimm_get_handle(dimm));
data/ndctl-70.1/test/libndctl.c:2285: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/ndctl-70.1/test/mmap.c:147: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(file_name, oflags);
data/ndctl-70.1/test/multi-pmem.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 devname[100];
data/ndctl-70.1/test/multi-pmem.c:143: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(devname, "namespace%d.%d",
data/ndctl-70.1/test/multi-pmem.c:162: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 uuid_str1[40], uuid_str2[40];
data/ndctl-70.1/test/multi-pmem.c:165: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(devname, "namespace%d.%d",
data/ndctl-70.1/test/pmem_namespaces.c:104: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/urandom", O_RDONLY)) < 0) {
data/ndctl-70.1/test/pmem_namespaces.c:120: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(bdev, O_RDWR|O_DIRECT)) < 0) {
data/ndctl-70.1/test/pmem_namespaces.c:186: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 bdev[50];
data/ndctl-70.1/test/revoke-devmem.c:69: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/mem", O_RDWR);
data/ndctl-70.1/util/help.c:41: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 sbuf[STRERR_BUFSIZE];
data/ndctl-70.1/util/help.c:51:5:  [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(dest + 1, "kfmclient");
data/ndctl-70.1/util/help.c:67:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char sbuf[STRERR_BUFSIZE];
data/ndctl-70.1/util/iomem.c:15:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *fp = fopen("/proc/iomem", "r");
data/ndctl-70.1/util/iomem.c:17: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/ndctl-70.1/util/json.c:31:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[128];
data/ndctl-70.1/util/json.c:82: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[32];
data/ndctl-70.1/util/json.c:1046: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[40];
data/ndctl-70.1/util/json.c:1091: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[40];
data/ndctl-70.1/util/strbuf.c:37:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char strbuf_slopbuf[1];
data/ndctl-70.1/util/strbuf.c:88: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(sb->buf + pos, data, dlen);
data/ndctl-70.1/util/strbuf.c:100:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(sb->buf + sb->len, data, len);
data/ndctl-70.1/util/sysfs.c:32: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(path, O_RDONLY|O_CLOEXEC);
data/ndctl-70.1/util/sysfs.c:55: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(path, O_WRONLY|O_CLOEXEC);
data/ndctl-70.1/util/sysfs.c:103: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 fmt[20];
data/ndctl-70.1/util/usage.c:23: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 msg[1024];
data/ndctl-70.1/ccan/str/str.c:6: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 i = 0, nlen = strlen(needle);
data/ndctl-70.1/ccan/str/str.h:32:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define strstarts(str,prefix) (strncmp((str),(prefix),strlen(prefix)) == 0)
data/ndctl-70.1/ccan/str/str.h:45: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(str) < strlen(postfix))
data/ndctl-70.1/ccan/str/str.h:45: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).
	if (strlen(str) < strlen(postfix))
data/ndctl-70.1/ccan/str/str.h:48: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).
	return streq(str + strlen(str) - strlen(postfix), postfix);
data/ndctl-70.1/ccan/str/str.h:48: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).
	return streq(str + strlen(str) - strlen(postfix), postfix);
data/ndctl-70.1/daxctl/acpi.c:78:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, &hdr, sizeof(hdr));
data/ndctl-70.1/daxctl/lib/libdaxctl.c:275: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).
	path = calloc(1, strlen(base) + 100);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:303: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).
	region->region_buf = calloc(1, strlen(path) + strlen(attrs)
data/ndctl-70.1/daxctl/lib/libdaxctl.c:303: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).
	region->region_buf = calloc(1, strlen(path) + strlen(attrs)
data/ndctl-70.1/daxctl/lib/libdaxctl.c:307: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).
	region->buf_len = strlen(path) + REGION_BUF_SIZE;
data/ndctl-70.1/daxctl/lib/libdaxctl.c:449: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).
	mem->mem_buf = calloc(1, strlen(node_base) + 256);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:452: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).
	mem->buf_len = strlen(node_base) + 256;
data/ndctl-70.1/daxctl/lib/libdaxctl.c:467: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).
	char *path = calloc(1, strlen(daxdev_base) + 100);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:505: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).
	dev->dev_buf = calloc(1, strlen(daxdev_base) + 50);
data/ndctl-70.1/daxctl/lib/libdaxctl.c:508: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).
	dev->buf_len = strlen(daxdev_base) + 50;
data/ndctl-70.1/ndctl/dimm.c:582:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t read;
data/ndctl-70.1/ndctl/dimm.c:594:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read < 0) {
data/ndctl-70.1/ndctl/dimm.c:595:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read;
data/ndctl-70.1/ndctl/dimm.c:599:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		cmd = ndctl_dimm_cmd_new_fw_send(uctx->start, copied, read,
data/ndctl-70.1/ndctl/dimm.c:621:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		copied += read;
data/ndctl-70.1/ndctl/dimm.c:622:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		remain -= read;
data/ndctl-70.1/ndctl/lib/libndctl.c:874: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).
	char *path = calloc(1, strlen(ctl_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:953: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).
	bus->bus_buf = calloc(1, strlen(bus->bus_path) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:956: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).
	bus->buf_len = strlen(bus->bus_path) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:1321:3:  [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(1000);
data/ndctl-70.1/ndctl/lib/libndctl.c:1663: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).
	char *path = calloc(1, strlen(dimm_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:1697: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).
	char *path = calloc(1, strlen(dimm_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:1799: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).
	char *path = calloc(1, strlen(dimm_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:1827: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).
	dimm->dimm_buf = calloc(1, strlen(dimm_base) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:1830: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).
	dimm->buf_len = strlen(dimm_base) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:2511: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).
	char *path = calloc(1, strlen(region_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:2584:40:  [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).
        region->region_buf = calloc(1, strlen(region_base) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:2587: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).
        region->buf_len = strlen(region_base) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:3740: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).
	mapping_path = calloc(1, strlen(region->region_path) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:3929: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).
	char *path = calloc(1, strlen(ndns_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:4010: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(buf) && uuid_parse(buf, ndns->uuid) < 0) {
data/ndctl-70.1/ndctl/lib/libndctl.c:4023: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).
	ndns->ndns_buf = calloc(1, strlen(ndns_base) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:4026: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).
	ndns->buf_len = strlen(ndns_base) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:4813: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(alt_name) >= (size_t) NSLABEL_NAME_LEN)
data/ndctl-70.1/ndctl/lib/libndctl.c:5093: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).
	char *path = calloc(1, strlen(btt_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:5112: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).
	btt->btt_buf = calloc(1, strlen(btt_base) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:5115: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).
	btt->buf_len = strlen(btt_base) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:5125: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(buf) && uuid_parse(buf, btt->uuid) < 0)
data/ndctl-70.1/ndctl/lib/libndctl.c:5450: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).
	char *path = calloc(1, strlen(pfn_base) + 100);
data/ndctl-70.1/ndctl/lib/libndctl.c:5463: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).
	pfn->pfn_buf = calloc(1, strlen(pfn_base) + 50);
data/ndctl-70.1/ndctl/lib/libndctl.c:5466: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).
	pfn->buf_len = strlen(pfn_base) + 50;
data/ndctl-70.1/ndctl/lib/libndctl.c:5476: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(buf) && uuid_parse(buf, pfn->uuid) < 0)
data/ndctl-70.1/ndctl/monitor.c:469: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).
	size_t arg_len = *arg ? strlen(*arg) : 0;
data/ndctl-70.1/ndctl/monitor.c:540: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).
		len = strlen(seek);
data/ndctl-70.1/ndctl/monitor.c:547: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).
		len = strlen(value);
data/ndctl-70.1/ndctl/namespace.c:1799:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, buf, INFOBLOCK_SZ);
data/ndctl-70.1/ndctl/namespace.c:2380:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read, rc;
data/ndctl-70.1/ndctl/namespace.c:2382:68:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = do_xaction_namespace(namespace, ACTION_READ_INFOBLOCK, ctx, &read);
data/ndctl-70.1/ndctl/namespace.c:2386:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fprintf(stderr, "read %d infoblock%s\n", read, read == 1 ? "" : "s");
data/ndctl-70.1/ndctl/util/keys.c:142: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).
		*size += strlen(prefix);
data/ndctl-70.1/ndctl/util/keys.c:149: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).
		*size += strlen(postfix) + 10 + 1;
data/ndctl-70.1/ndctl/util/keys.c:157: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).
		memcpy(blob, prefix, strlen(prefix));
data/ndctl-70.1/ndctl/util/keys.c:158: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).
		pl = blob + strlen(prefix);
data/ndctl-70.1/ndctl/util/keys.c:164:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(fd, rdptr, st.st_size - read_bytes);
data/ndctl-70.1/ndctl/util/keys.c:248:40:  [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).
	key = add_key("encrypted", desc, cmd, strlen(cmd),
data/ndctl-70.1/test/blk_namespaces.c:132:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, random_page[0], page_size * num_pages);
data/ndctl-70.1/test/device-dax.c:308:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read(fd2, data, sizeof(data));
data/ndctl-70.1/test/libndctl.c:922:5:  [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(5000);
data/ndctl-70.1/test/libndctl.c:1153:6:  [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(5000);
data/ndctl-70.1/test/libndctl.c:1600:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, buf, 4096) < 4096) {
data/ndctl-70.1/test/pmem_namespaces.c:110:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, random_page[0], page_size * num_pages);
data/ndctl-70.1/util/abspath.c:10: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 pfx_len = pfx ? strlen(pfx) : 0;
data/ndctl-70.1/util/json.c:75:39:  [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 printbuf_memappend(pbuf, buf, strlen(buf));
data/ndctl-70.1/util/json.c:85:39:  [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 printbuf_memappend(pbuf, buf, strlen(buf));
data/ndctl-70.1/util/json.c:658:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen("/sys/devices");
data/ndctl-70.1/util/parse-options.c:241: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).
		arg_end = arg + strlen(arg);
data/ndctl-70.1/util/parse-options.c:339: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(arg) < 3)
data/ndctl-70.1/util/strbuf.c:137:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		cnt = read(fd, sb->buf + sb->len, sb->alloc - sb->len - 1);
data/ndctl-70.1/util/strbuf.h:99: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).
	strbuf_add(sb, s, strlen(s));
data/ndctl-70.1/util/sysfs.c:39:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(fd, buf, SYSFS_ATTR_SIZE);
data/ndctl-70.1/util/sysfs.c:56:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int n, len = strlen(buf) + 1, rc;
data/ndctl-70.1/util/util.h:82: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).
        size_t len = strlen(prefix);

ANALYSIS SUMMARY:

Hits = 508
Lines analyzed = 40253 in approximately 1.02 seconds (39473 lines/second)
Physical Source Lines of Code (SLOC) = 30824
Hits@level = [0] 722 [1]  78 [2] 276 [3]  11 [4] 143 [5]   0
Hits@level+ = [0+] 1230 [1+] 508 [2+] 430 [3+] 154 [4+] 143 [5+]   0
Hits/KSLOC@level+ = [0+] 39.904 [1+] 16.4807 [2+] 13.9502 [3+] 4.99611 [4+] 4.63924 [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.