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/ledmon-0.94/config/config.h
Examining data/ledmon-0.94/src/ahci.c
Examining data/ledmon-0.94/src/ahci.h
Examining data/ledmon-0.94/src/amd.c
Examining data/ledmon-0.94/src/amd.h
Examining data/ledmon-0.94/src/amd_ipmi.c
Examining data/ledmon-0.94/src/amd_ipmi.h
Examining data/ledmon-0.94/src/amd_sgpio.h
Examining data/ledmon-0.94/src/block.c
Examining data/ledmon-0.94/src/block.h
Examining data/ledmon-0.94/src/cntrl.c
Examining data/ledmon-0.94/src/cntrl.h
Examining data/ledmon-0.94/src/config_file.c
Examining data/ledmon-0.94/src/config_file.h
Examining data/ledmon-0.94/src/dellssd.c
Examining data/ledmon-0.94/src/dellssd.h
Examining data/ledmon-0.94/src/enclosure.c
Examining data/ledmon-0.94/src/enclosure.h
Examining data/ledmon-0.94/src/ibpi.h
Examining data/ledmon-0.94/src/ipmi.c
Examining data/ledmon-0.94/src/ipmi.h
Examining data/ledmon-0.94/src/ledctl.c
Examining data/ledmon-0.94/src/ledmon.c
Examining data/ledmon-0.94/src/list.c
Examining data/ledmon-0.94/src/list.h
Examining data/ledmon-0.94/src/npem.c
Examining data/ledmon-0.94/src/npem.h
Examining data/ledmon-0.94/src/pci_slot.c
Examining data/ledmon-0.94/src/pci_slot.h
Examining data/ledmon-0.94/src/pidfile.c
Examining data/ledmon-0.94/src/pidfile.h
Examining data/ledmon-0.94/src/raid.c
Examining data/ledmon-0.94/src/raid.h
Examining data/ledmon-0.94/src/scsi.c
Examining data/ledmon-0.94/src/scsi.h
Examining data/ledmon-0.94/src/ses.h
Examining data/ledmon-0.94/src/slave.c
Examining data/ledmon-0.94/src/slave.h
Examining data/ledmon-0.94/src/smp.c
Examining data/ledmon-0.94/src/smp.h
Examining data/ledmon-0.94/src/status.c
Examining data/ledmon-0.94/src/status.h
Examining data/ledmon-0.94/src/sysfs.c
Examining data/ledmon-0.94/src/sysfs.h
Examining data/ledmon-0.94/src/udev.c
Examining data/ledmon-0.94/src/udev.h
Examining data/ledmon-0.94/src/utils.c
Examining data/ledmon-0.94/src/utils.h
Examining data/ledmon-0.94/src/version.h
Examining data/ledmon-0.94/src/vmdssd.c
Examining data/ledmon-0.94/src/vmdssd.h
Examining data/ledmon-0.94/src/amd_sgpio.c

FINAL RESULTS:

data/ledmon-0.94/src/amd_sgpio.c:803: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.
	rc = sscanf(p, "%" SCNx32, &caps);
data/ledmon-0.94/src/cntrl.c:125:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmp, "%s", path);
data/ledmon-0.94/src/config_file.c:206:32:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (!filename || (filename && access(filename, F_OK) < 0)) {
data/ledmon-0.94/src/ledctl.c:166:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(ledctl_version, VERSION_MAJOR, VERSION_MINOR, BUILD_LABEL);
data/ledmon-0.94/src/ledctl.c:184:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(ledctl_version, VERSION_MAJOR, VERSION_MINOR, BUILD_LABEL);
data/ledmon-0.94/src/ledmon.c:219:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(ledmon_version, VERSION_MAJOR, VERSION_MINOR, BUILD_LABEL);
data/ledmon-0.94/src/ledmon.c:237:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(ledmon_version, VERSION_MAJOR, VERSION_MINOR, BUILD_LABEL);
data/ledmon-0.94/src/utils.c:105: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(p, "%" SCNx64, &defval) == 1)
data/ledmon-0.94/src/utils.c:300:3:  [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), buf, vl);
data/ledmon-0.94/src/block.c:233:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(path, link)) {
data/ledmon-0.94/src/cntrl.c:81:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(temp, link) == NULL)
data/ledmon-0.94/src/cntrl.c:358:9:  [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.
	link = realpath(buf, NULL);
data/ledmon-0.94/src/enclosure.c:114:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(path, temp)) {
data/ledmon-0.94/src/ledctl.c:439:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if ((realpath(name, temp) == NULL) && (errno != ENOTDIR))
data/ledmon-0.94/src/ledctl.c:446:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if ((realpath(temp, path) == NULL) && (errno != ENOTDIR))
data/ledmon-0.94/src/ledctl.c:541:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		opt = getopt_long(argc, argv, shortopt, longopt, &opt_index);
data/ledmon-0.94/src/ledmon.c:324:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		opt = getopt_long(argc, argv, shortopt, longopt, &opt_index);
data/ledmon-0.94/src/ledmon.c:361:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		opt = getopt_long(argc, argv, shortopt, longopt, &opt_index);
data/ledmon-0.94/src/scsi.c:613:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(temp, link) == NULL)
data/ledmon-0.94/src/slave.c:101:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (!realpath(temp, link))
data/ledmon-0.94/src/sysfs.c:367:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(path, link) != NULL)
data/ledmon-0.94/src/sysfs.c:376:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(path, link) != NULL)
data/ledmon-0.94/src/sysfs.c:667:9:  [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.
	link = realpath(buf, NULL);
data/ledmon-0.94/src/utils.c:480: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(logdir, temp);
data/ledmon-0.94/src/vmdssd.c:91:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if (realpath(module_path, real_module_path) == NULL)
data/ledmon-0.94/src/ahci.c:73:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char temp[WRITE_BUFFER_SIZE];
data/ledmon-0.94/src/ahci.c:74:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX];
data/ledmon-0.94/src/ahci.c:90: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(temp, "%u", ibpi2sgpio[ibpi]);
data/ledmon-0.94/src/ahci.c:106:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[PATH_MAX];
data/ledmon-0.94/src/amd.c:75:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char tmp[PATH_MAX + 1];
data/ledmon-0.94/src/amd_ipmi.c:134: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/ledmon-0.94/src/amd_ipmi.c:160: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/ledmon-0.94/src/amd_sgpio.c:291: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).
		int fd = open(em_buffer_path, O_WRONLY);
data/ledmon-0.94/src/amd_sgpio.c:552:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX];
data/ledmon-0.94/src/amd_sgpio.c:553: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 ata_dir[PATH_MAX];
data/ledmon-0.94/src/amd_sgpio.c:646: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(cache, &cache_dup, sizeof(*cache));
data/ledmon-0.94/src/amd_sgpio.c:681: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 em_path[PATH_MAX+10]; /* 10 == strlen("/em_buffer") */
data/ledmon-0.94/src/amd_sgpio.c:709: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(cache, &cache_dup, sizeof(*cache));
data/ledmon-0.94/src/amd_sgpio.c:747: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(cache, &cache_dup, sizeof(*cache));
data/ledmon-0.94/src/amd_sgpio.c:760: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 em_path[PATH_MAX];
data/ledmon-0.94/src/amd_sgpio.c:839:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[PATH_MAX];
data/ledmon-0.94/src/block.c:224: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 link[PATH_MAX];
data/ledmon-0.94/src/cntrl.c:77: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 temp[PATH_MAX], link[PATH_MAX], *t;
data/ledmon-0.94/src/cntrl.c:119:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[PATH_MAX];
data/ledmon-0.94/src/cntrl.c:172: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 host_path[PATH_MAX] = { 0 };
data/ledmon-0.94/src/cntrl.c:281:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		index = atoi(p + host_len);
data/ledmon-0.94/src/cntrl.c:340:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX];
data/ledmon-0.94/src/cntrl.h:65:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char bitstream[4];
data/ledmon-0.94/src/config_file.c:114: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[BUFSIZ];
data/ledmon-0.94/src/config_file.c:213:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(filename, "re");
data/ledmon-0.94/src/config_file.c:238: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[BUFSIZ];
data/ledmon-0.94/src/config_file.c:255: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[BUFSIZ];
data/ledmon-0.94/src/config_file.c:302: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(shared_mem_ptr, buf, strlen(buf));
data/ledmon-0.94/src/enclosure.c:49: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_MAX];
data/ledmon-0.94/src/enclosure.c:111: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 temp[PATH_MAX];
data/ledmon-0.94/src/ibpi.h:99:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *ibpi_str[ibpi_pattern_count];
data/ledmon-0.94/src/ipmi.c:43: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/ipmi0", O_RDWR);
data/ledmon-0.94/src/ipmi.c:46: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/ipmidev/0", O_RDWR);
data/ledmon-0.94/src/ipmi.c:49:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/ipmidev0", O_RDWR);
data/ledmon-0.94/src/ipmi.c:52: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/bmc", O_RDWR);
data/ledmon-0.94/src/ipmi.c:131: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(resp, rcv.msg.data + 1, *rlen);
data/ledmon-0.94/src/ledctl.c:436:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char temp[PATH_MAX], path[PATH_MAX];
data/ledmon-0.94/src/ledctl.c:444: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(temp, "/sys/dev/block/%u:%u", major(st.st_rdev),
data/ledmon-0.94/src/ledctl.c:637: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 share_conf_path[PATH_MAX];
data/ledmon-0.94/src/ledmon.c:188: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 message[4096];
data/ledmon-0.94/src/ledmon.c:295:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	conf.scan_interval = atoi(optarg);
data/ledmon-0.94/src/ledmon.c:477: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("/proc/mdstat", O_RDONLY);
data/ledmon-0.94/src/ledmon.c:915: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 t = open("/dev/null", O_RDWR);
data/ledmon-0.94/src/pidfile.c:47: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_MAX];
data/ledmon-0.94/src/pidfile.c:52: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(buf, O_WRONLY | O_CREAT, 0640);
data/ledmon-0.94/src/pidfile.c:59: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", getpid());
data/ledmon-0.94/src/pidfile.c:69: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_MAX];
data/ledmon-0.94/src/pidfile.c:94: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], *p;
data/ledmon-0.94/src/pidfile.c:102:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tp = atoi(p);
data/ledmon-0.94/src/scsi.c:152: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(enclosure->dev_path, O_RDWR);
data/ledmon-0.94/src/scsi.c:609: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 temp[PATH_MAX], link[PATH_MAX];
data/ledmon-0.94/src/scsi.c:714: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 host_path[PATH_MAX] = { 0 };
data/ledmon-0.94/src/ses.h:142:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buf[SES_ALLOC_BUFF];
data/ledmon-0.94/src/slave.c:85:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			result = atoi(p);
data/ledmon-0.94/src/slave.c:95: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 temp[PATH_MAX];
data/ledmon-0.94/src/slave.c: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 link[PATH_MAX];
data/ledmon-0.94/src/smp.c:262: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_MAX];
data/ledmon-0.94/src/smp.c:267: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).
	df = fopen(buf, "r");
data/ledmon-0.94/src/smp.c:283: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).
	hba_fd = open(buf, O_RDWR);
data/ledmon-0.94/src/smp.c:365: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, header, sizeof(*header));
data/ledmon-0.94/src/smp.c:366:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + sizeof(*header), data, len * SMP_DATA_CHUNK_SIZE);
data/ledmon-0.94/src/sysfs.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 temp[PATH_MAX];
data/ledmon-0.94/src/sysfs.c:258: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 temp[PATH_MAX];
data/ledmon-0.94/src/sysfs.c:366: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 link[PATH_MAX];
data/ledmon-0.94/src/sysfs.c:375: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 link[PATH_MAX];
data/ledmon-0.94/src/sysfs.c:660: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_MAX];
data/ledmon-0.94/src/sysfs.c:661: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 driver_path[PATH_MAX];
data/ledmon-0.94/src/utils.c:72: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 temp[PATH_MAX];
data/ledmon-0.94/src/utils.c:120:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		defval = atoi(p);
data/ledmon-0.94/src/utils.c:186:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_WRONLY);
data/ledmon-0.94/src/utils.c:213: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);
data/ledmon-0.94/src/utils.c:238:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				did->major = atoi(p);
data/ledmon-0.94/src/utils.c:239:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				did->minor = atoi(t);
data/ledmon-0.94/src/utils.c:252: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[30];
data/ledmon-0.94/src/utils.c:270:10:  [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).
	s_log = fopen(path, "a");
data/ledmon-0.94/src/utils.c:298: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 msg[4096];
data/ledmon-0.94/src/utils.c:467: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 temp[PATH_MAX];
data/ledmon-0.94/src/utils.c:468: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 log_file[PATH_MAX];
data/ledmon-0.94/src/utils.c:628: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[20];
data/ledmon-0.94/src/utils.h:58: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 prefix[10];
data/ledmon-0.94/src/vmdssd.c:84: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 module_path[PATH_MAX], real_module_path[PATH_MAX];
data/ledmon-0.94/src/vmdssd.c:125: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 attention_path[PATH_MAX];
data/ledmon-0.94/src/vmdssd.c:126:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[WRITE_BUFFER_SIZE];
data/ledmon-0.94/src/ahci.c:116:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tmp, path, p - path);
data/ledmon-0.94/src/ahci.c:122: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).
	buf_size = strlen(tmp) + strlen(p) + strlen(SCSI_HOST) + 1;
data/ledmon-0.94/src/ahci.c:122: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).
	buf_size = strlen(tmp) + strlen(p) + strlen(SCSI_HOST) + 1;
data/ledmon-0.94/src/ahci.c:122: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).
	buf_size = strlen(tmp) + strlen(p) + strlen(SCSI_HOST) + 1;
data/ledmon-0.94/src/amd.c:74:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(dir_name, filename, strlen(filename)) == 0) {
data/ledmon-0.94/src/amd.c:77:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(tmp, dir_path, path_len);
data/ledmon-0.94/src/amd_ipmi.c:136:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(path, start_path, PATH_MAX);
data/ledmon-0.94/src/amd_sgpio.c:309: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/ledmon-0.94/src/amd_sgpio.c:556:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ata_dir, start_path, PATH_MAX);
data/ledmon-0.94/src/block.c:193:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(cntrl->sysfs_path)) == 0) {
data/ledmon-0.94/src/cntrl.c:180:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(p, "host", strlen("host")) == 0) {
data/ledmon-0.94/src/cntrl.c:293:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(de->d_name, "phy-", strlen("phy-")) == 0) {
data/ledmon-0.94/src/config_file.c:244: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 curr = strlen(buf);
data/ledmon-0.94/src/config_file.c:277: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:277:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:279: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:279:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:281: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:281:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:283: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:283:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:285: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:285:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:287: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).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:287:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:291: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).
		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:291:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:297: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).
		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:297:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/ledmon-0.94/src/config_file.c:302:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(shared_mem_ptr, buf, strlen(buf));
data/ledmon-0.94/src/config_file.c:303: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).
	munmap(shared_mem_ptr, strlen(buf));
data/ledmon-0.94/src/enclosure.c:75:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t sg_path_size = strlen(encl_path) + strlen(SCSI_GEN) + 2;
data/ledmon-0.94/src/enclosure.c:75:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t sg_path_size = strlen(encl_path) + strlen(SCSI_GEN) + 2;
data/ledmon-0.94/src/enclosure.c:96: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).
		size_t size = strlen("/dev/") + strlen(de->d_name) + 1;
data/ledmon-0.94/src/enclosure.c:96: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).
		size_t size = strlen("/dev/") + strlen(de->d_name) + 1;
data/ledmon-0.94/src/ledmon.c:920:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(027);
data/ledmon-0.94/src/pidfile.c:60: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).
	count = write(fd, buf, strlen(buf));
data/ledmon-0.94/src/scsi.c:496:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(p, c, s - c);
data/ledmon-0.94/src/scsi.c:503:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t size = strlen(path) * 2;
data/ledmon-0.94/src/scsi.c:616:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return strncmp(link, device_path, strlen(link)) == 0;
data/ledmon-0.94/src/scsi.c:715: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 ctrl_path_len = strlen(ctrl_path);
data/ledmon-0.94/src/smp.c:603:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(de->d_name, "phy-", strlen("phy-")) == 0) {
data/ledmon-0.94/src/sysfs.c:126:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(p) > 0) {
data/ledmon-0.94/src/sysfs.c:649:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    (strncmp(device->sysfs_path, path, strlen(path)) == 0))
data/ledmon-0.94/src/utils.c:146: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(path) + strlen(dirent->d_name) + 2;
data/ledmon-0.94/src/utils.c:146: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).
		len = strlen(path) + strlen(dirent->d_name) + 2;
data/ledmon-0.94/src/utils.c:184: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).
	if ((buf == NULL) || (strlen(buf) == 0))
data/ledmon-0.94/src/utils.c:188: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 = write(fd, buf, strlen(buf));
data/ledmon-0.94/src/utils.c:215:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			size = read(fd, buf, st.st_size);
data/ledmon-0.94/src/utils.c:341:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dest, src, size - 1);
data/ledmon-0.94/src/vmdssd.c:154:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (buf_write(attention_path, buf) != (ssize_t) strlen(buf)) {

ANALYSIS SUMMARY:

Hits = 159
Lines analyzed = 11516 in approximately 0.50 seconds (22938 lines/second)
Physical Source Lines of Code (SLOC) = 7053
Hits@level = [0] 119 [1]  51 [2]  83 [3]  16 [4]   9 [5]   0
Hits@level+ = [0+] 278 [1+] 159 [2+] 108 [3+]  25 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 39.4159 [1+] 22.5436 [2+] 15.3126 [3+] 3.54459 [4+] 1.27605 [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.