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/kmod-27+20200310/libkmod/libkmod-builtin.c
Examining data/kmod-27+20200310/libkmod/libkmod-config.c
Examining data/kmod-27+20200310/libkmod/libkmod-elf.c
Examining data/kmod-27+20200310/libkmod/libkmod-file.c
Examining data/kmod-27+20200310/libkmod/libkmod-index.c
Examining data/kmod-27+20200310/libkmod/libkmod-index.h
Examining data/kmod-27+20200310/libkmod/libkmod-internal.h
Examining data/kmod-27+20200310/libkmod/libkmod-list.c
Examining data/kmod-27+20200310/libkmod/libkmod-module.c
Examining data/kmod-27+20200310/libkmod/libkmod-signature.c
Examining data/kmod-27+20200310/libkmod/libkmod.c
Examining data/kmod-27+20200310/libkmod/libkmod.h
Examining data/kmod-27+20200310/shared/array.c
Examining data/kmod-27+20200310/shared/array.h
Examining data/kmod-27+20200310/shared/hash.c
Examining data/kmod-27+20200310/shared/hash.h
Examining data/kmod-27+20200310/shared/macro.h
Examining data/kmod-27+20200310/shared/missing.h
Examining data/kmod-27+20200310/shared/scratchbuf.c
Examining data/kmod-27+20200310/shared/scratchbuf.h
Examining data/kmod-27+20200310/shared/strbuf.c
Examining data/kmod-27+20200310/shared/strbuf.h
Examining data/kmod-27+20200310/shared/util.c
Examining data/kmod-27+20200310/shared/util.h
Examining data/kmod-27+20200310/testsuite/delete_module.c
Examining data/kmod-27+20200310/testsuite/init_module.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-fake-cciss.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-fake-hpsa.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-fake-scsi-mod.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-foo-a.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-foo-b.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-foo-c.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-foo.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-a.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-b.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-c.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-d.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-e.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-f.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-g.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-h.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-i.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-j.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop-k.c
Examining data/kmod-27+20200310/testsuite/module-playground/mod-loop.h
Examining data/kmod-27+20200310/testsuite/module-playground/mod-simple.c
Examining data/kmod-27+20200310/testsuite/path.c
Examining data/kmod-27+20200310/testsuite/stripped-module.h
Examining data/kmod-27+20200310/testsuite/test-array.c
Examining data/kmod-27+20200310/testsuite/test-blacklist.c
Examining data/kmod-27+20200310/testsuite/test-dependencies.c
Examining data/kmod-27+20200310/testsuite/test-depmod.c
Examining data/kmod-27+20200310/testsuite/test-hash.c
Examining data/kmod-27+20200310/testsuite/test-init.c
Examining data/kmod-27+20200310/testsuite/test-initstate.c
Examining data/kmod-27+20200310/testsuite/test-list.c
Examining data/kmod-27+20200310/testsuite/test-loaded.c
Examining data/kmod-27+20200310/testsuite/test-modinfo.c
Examining data/kmod-27+20200310/testsuite/test-modprobe.c
Examining data/kmod-27+20200310/testsuite/test-new-module.c
Examining data/kmod-27+20200310/testsuite/test-scratchbuf.c
Examining data/kmod-27+20200310/testsuite/test-strbuf.c
Examining data/kmod-27+20200310/testsuite/test-testsuite.c
Examining data/kmod-27+20200310/testsuite/test-tools.c
Examining data/kmod-27+20200310/testsuite/test-util.c
Examining data/kmod-27+20200310/testsuite/testsuite.c
Examining data/kmod-27+20200310/testsuite/testsuite.h
Examining data/kmod-27+20200310/testsuite/uname.c
Examining data/kmod-27+20200310/tools/depmod.c
Examining data/kmod-27+20200310/tools/insert.c
Examining data/kmod-27+20200310/tools/insmod.c
Examining data/kmod-27+20200310/tools/kmod.c
Examining data/kmod-27+20200310/tools/kmod.h
Examining data/kmod-27+20200310/tools/log.c
Examining data/kmod-27+20200310/tools/log.h
Examining data/kmod-27+20200310/tools/lsmod.c
Examining data/kmod-27+20200310/tools/modinfo.c
Examining data/kmod-27+20200310/tools/modprobe.c
Examining data/kmod-27+20200310/tools/remove.c
Examining data/kmod-27+20200310/tools/rmmod.c
Examining data/kmod-27+20200310/tools/static-nodes.c

FINAL RESULTS:

data/kmod-27+20200310/libkmod/libkmod-builtin.c:320:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(s + i, line + modlen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:85:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/kmod-27+20200310/libkmod/libkmod-internal.h:51:50:  [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.
		const char *format, ...) __attribute__((format(printf, 6, 7))) __attribute__((nonnull(1, 3, 5)));
data/kmod-27+20200310/libkmod/libkmod-module.c:980:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	err = system(cmd);
data/kmod-27+20200310/libkmod/libkmod.c:147: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(fp, format, args);
data/kmod-27+20200310/shared/macro.h:58:53:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define _printf_format_(a,b) __attribute__((format (printf, a, b)))
data/kmod-27+20200310/testsuite/init_module.c:157:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf + len, modname);
data/kmod-27+20200310/testsuite/path.c:61:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf + rootpathlen, path);
data/kmod-27+20200310/testsuite/path.c:187:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
WRAP_2ARGS(int, -1, access, int);
data/kmod-27+20200310/testsuite/test-testsuite.c:71:6:  [4] (buffer) fscanf:
  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.
	n = fscanf(fp, "%s", s);
data/kmod-27+20200310/testsuite/test-testsuite.c:124:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access("/lib/modules/a", F_OK) < 0) {
data/kmod-27+20200310/testsuite/testsuite.c:154:2:  [4] (shell) execv:
  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.
	execv(progname, (char *const *) args);
data/kmod-27+20200310/testsuite/testsuite.c:170:2:  [4] (shell) execv:
  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.
	execv(prog, (char *const *) args);
data/kmod-27+20200310/testsuite/testsuite.h:125:32:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define _LOG(prefix, fmt, ...) printf("TESTSUITE: " prefix fmt, ## __VA_ARGS__)
data/kmod-27+20200310/tools/depmod.c:122: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(stdout, fmt, args);
data/kmod-27+20200310/tools/depmod.c:567:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ext->path, path);
data/kmod-27+20200310/tools/depmod.c:1702:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(buf + sz, sep);
data/kmod-27+20200310/tools/depmod.c:1707:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf + sz, vertex->mod->modname);
data/kmod-27+20200310/tools/modprobe.c:157: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(stdout, fmt, args);
data/kmod-27+20200310/tools/modprobe.c:307:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	ret = system(cmd);
data/kmod-27+20200310/tools/static-nodes.c:254:13:  [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.
		matches = sscanf(buf, "%s %s %c%u:%u", modname, devname,
data/kmod-27+20200310/libkmod/libkmod-internal.h:45: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/kmod-27+20200310/testsuite/delete_module.c:123:6:  [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.
	s = getenv(S_TC_DELETE_MODULE_RETCODES);
data/kmod-27+20200310/testsuite/init_module.c:186:6:  [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.
	s = getenv(S_TC_INIT_MODULE_RETCODES);
data/kmod-27+20200310/testsuite/path.c:70:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	rootpath = getenv(S_TC_ROOTFS);
data/kmod-27+20200310/testsuite/test-testsuite.c:46: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.
		char *ldpreload = getenv("LD_PRELOAD");
data/kmod-27+20200310/testsuite/testsuite.c:107:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, options_short, options, &idx);
data/kmod-27+20200310/testsuite/testsuite.c:1060:12:  [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.
	oldpath = getenv("PATH");
data/kmod-27+20200310/testsuite/uname.c:56:12:  [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.
	release = getenv(S_TC_UNAME_R);
data/kmod-27+20200310/tools/depmod.c:2825:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/insert.c:68:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/insmod.c:78:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/kmod.c:107:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, options_s, options, NULL);
data/kmod-27+20200310/tools/modinfo.c:375:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/modprobe.c:609:20:  [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 = getenv("MODPROBE_OPTIONS");
data/kmod-27+20200310/tools/modprobe.c:685: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 *p, *env = getenv("MODPROBE_OPTIONS");
data/kmod-27+20200310/tools/modprobe.c:777:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/remove.c:97:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/rmmod.c:116:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/tools/static-nodes.c:168:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
data/kmod-27+20200310/libkmod/libkmod-builtin.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 path[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-builtin.c:75: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).
	file = open(path, O_RDONLY|O_CLOEXEC);
data/kmod-27+20200310/libkmod/libkmod-builtin.c:126: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[BUFSIZ];
data/kmod-27+20200310/libkmod/libkmod-builtin.c:220: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 modname[static PATH_MAX])
data/kmod-27+20200310/libkmod/libkmod-builtin.c:273: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/kmod-27+20200310/libkmod/libkmod-config.c:132:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(cmd->modname, modname, modnamelen);
data/kmod-27+20200310/libkmod/libkmod-config.c:133: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->command, command, commandlen);
data/kmod-27+20200310/libkmod/libkmod-config.c:170: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(opt->modname, modname, modnamelen);
data/kmod-27+20200310/libkmod/libkmod-config.c:171: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(opt->options, options, optionslen);
data/kmod-27+20200310/libkmod/libkmod-config.c:208: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(alias->modname, modname, modnamelen);
data/kmod-27+20200310/libkmod/libkmod-config.c:209: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(alias->name, name, namelen);
data/kmod-27+20200310/libkmod/libkmod-config.c:331:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dep->name, modname, modnamelen);
data/kmod-27+20200310/libkmod/libkmod-config.c:368:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(itr, p, plen);
data/kmod-27+20200310/libkmod/libkmod-config.c:374:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(itr, p, plen);
data/kmod-27+20200310/libkmod/libkmod-config.c:432:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(itr, "pre: ", sz_preprefix);
data/kmod-27+20200310/libkmod/libkmod-config.c:436: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(itr, dep->pre[0], sz_pre + 1);
data/kmod-27+20200310/libkmod/libkmod-config.c:447: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(itr, "post: ", sz_postprefix);
data/kmod-27+20200310/libkmod/libkmod-config.c:451: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(itr, dep->post[0], sz_post + 1);
data/kmod-27+20200310/libkmod/libkmod-config.c:499: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[KCMD_LINE_SIZE];
data/kmod-27+20200310/libkmod/libkmod-config.c:504: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/cmdline", O_RDONLY|O_CLOEXEC);
data/kmod-27+20200310/libkmod/libkmod-config.c:764: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(cf->name, name, namelen + 1);
data/kmod-27+20200310/libkmod/libkmod-config.c:854: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(cf->path, path, pathlen);
data/kmod-27+20200310/libkmod/libkmod-config.c:870: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[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-config.c:885: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(fn, O_RDONLY|O_CLOEXEC);
data/kmod-27+20200310/libkmod/libkmod-elf.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 name[64 - sizeof(uint32_t)];
data/kmod-27+20200310/libkmod/libkmod-elf.c:46: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[64 - sizeof(uint64_t)];
data/kmod-27+20200310/libkmod/libkmod-elf.c:179: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(elf->changed, elf->memory, elf->size);
data/kmod-27+20200310/libkmod/libkmod-elf.c:477:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s, strings, size);
data/kmod-27+20200310/libkmod/libkmod-elf.c:564: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(itr, symbol, symbollen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:643: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(elf->changed, elf->memory, elf->size);
data/kmod-27+20200310/libkmod/libkmod-elf.c:716: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(itr, strings + last, slen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:728: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(itr, strings + last, slen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:891: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(itr, name, slen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:1178: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(itr, name, slen);
data/kmod-27+20200310/libkmod/libkmod-elf.c:1206: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(itr, name, slen);
data/kmod-27+20200310/libkmod/libkmod-file.c:120: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(tmp + total, out_buf, write_size);
data/kmod-27+20200310/libkmod/libkmod-file.c:295: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).
	file->fd = open(filename, O_RDONLY|O_CLOEXEC);
data/kmod-27+20200310/libkmod/libkmod-index.c:176:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(v->value, value, len);
data/kmod-27+20200310/libkmod/libkmod-index.c:318:9:  [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 = fopen(filename, "re");
data/kmod-27+20200310/libkmod/libkmod-index.c:726: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(node->children, children, sizeof(uint32_t) * child_count);
data/kmod-27+20200310/libkmod/libkmod-index.c:765: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(filename, O_RDONLY|O_CLOEXEC)) < 0) {
data/kmod-27+20200310/libkmod/libkmod-index.h:28: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 value[0];
data/kmod-27+20200310/libkmod/libkmod-internal.h:204:68:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter, char modname[static PATH_MAX]) __attribute__((nonnull(1, 2)));
data/kmod-27+20200310/libkmod/libkmod-module.c:110:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 inline const char *path_join(const char *path, size_t prefixlen,
data/kmod-27+20200310/libkmod/libkmod-module.c:110:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 inline const char *path_join(const char *path, size_t prefixlen,
data/kmod-27+20200310/libkmod/libkmod-module.c:111: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.
							char buf[PATH_MAX])
data/kmod-27+20200310/libkmod/libkmod-module.c:122: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 + prefixlen, path, pathlen + 1);
data/kmod-27+20200310/libkmod/libkmod-module.c:142: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/kmod-27+20200310/libkmod/libkmod-module.c:162: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, dirname, dirnamelen);
data/kmod-27+20200310/libkmod/libkmod-module.c:289: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(m->name, key, keylen + 1);
data/kmod-27+20200310/libkmod/libkmod-module.c:297: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(m->hashkey, key, keylen + 1);
data/kmod-27+20200310/libkmod/libkmod-module.c:334: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_norm[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:348: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 key[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:355:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(key, name, namelen);
data/kmod-27+20200310/libkmod/libkmod-module.c:356:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(key + namelen + 1, alias, aliaslen + 1);
data/kmod-27+20200310/libkmod/libkmod-module.c:394: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[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:541: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 alias[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:1035: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(s, cmd, p - cmd);
data/kmod-27+20200310/libkmod/libkmod-module.c:1036: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(s + prefixlen, options, options_len);
data/kmod-27+20200310/libkmod/libkmod-module.c:1037: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(s + prefixlen + options_len, suffix, suffixlen);
data/kmod-27+20200310/libkmod/libkmod-module.c:1066: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(r, opt, optlen);
data/kmod-27+20200310/libkmod/libkmod-module.c:1072: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(r + optlen, xopt, xoptlen);
data/kmod-27+20200310/libkmod/libkmod-module.c:1428: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(opts + optslen, str, len);
data/kmod-27+20200310/libkmod/libkmod-module.c:1660: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 line[4096];
data/kmod-27+20200310/libkmod/libkmod-module.c:1665: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("/proc/modules", "re");
data/kmod-27+20200310/libkmod/libkmod-module.c:1744: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], buf[32];
data/kmod-27+20200310/libkmod/libkmod-module.c:1756: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/kmod-27+20200310/libkmod/libkmod-module.c:1808: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 line[4096];
data/kmod-27+20200310/libkmod/libkmod-module.c:1821: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).
	dfd = open(line, O_RDONLY|O_CLOEXEC);
data/kmod-27+20200310/libkmod/libkmod-module.c:1835: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("/proc/modules", "re");
data/kmod-27+20200310/libkmod/libkmod-module.c:1891: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/kmod-27+20200310/libkmod/libkmod-module.c:1899: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/kmod-27+20200310/libkmod/libkmod-module.c:1929: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 dname[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:2009: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 dname[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-module.c:2066: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(section->name, dent->d_name, namesz);
data/kmod-27+20200310/libkmod/libkmod-module.c:2179: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(info->key, key, keylen);
data/kmod-27+20200310/libkmod/libkmod-module.c:2181: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(info->value, value, valuelen);
data/kmod-27+20200310/libkmod/libkmod-module.c:2223:8:  [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.
		j += sprintf(str + j, "%02X", (unsigned char)hex[i]);
data/kmod-27+20200310/libkmod/libkmod-module.c:2228:10:  [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.
				j += sprintf(str + j, "\n\t\t");
data/kmod-27+20200310/libkmod/libkmod-module.c:2460: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(mv->symbol, symbol, symbollen);
data/kmod-27+20200310/libkmod/libkmod-module.c:2600: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(mv->symbol, symbol, symbollen);
data/kmod-27+20200310/libkmod/libkmod-module.c:2742: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(mv->symbol, symbol, symbollen);
data/kmod-27+20200310/libkmod/libkmod-module.c:2908: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 modname[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-signature.c:45: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.
static const char *const pkey_algo[PKEY_ALGO__LAST] = {
data/kmod-27+20200310/libkmod/libkmod-signature.c:62:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *const pkey_hash_algo[PKEY_HASH__LAST] = {
data/kmod-27+20200310/libkmod/libkmod-signature.c:80:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *const pkey_id_type[PKEY_ID_TYPE__LAST] = {
data/kmod-27+20200310/libkmod/libkmod.c:112: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[16];
data/kmod-27+20200310/libkmod/libkmod.c:439: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 fn[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod.c:507: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 fn[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod.c:591: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 fn[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod.c:826: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 path[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod.c:865: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 path[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod.c:957: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 fn[PATH_MAX];
data/kmod-27+20200310/shared/missing.h:43:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(__new, __old, __len);				\
data/kmod-27+20200310/shared/scratchbuf.c:46: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(tmp, buf->bytes, buf->size);
data/kmod-27+20200310/shared/strbuf.c:106: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->bytes + buf->used, str, len);
data/kmod-27+20200310/shared/util.c:62:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	return memcpy(r, p, n);
data/kmod-27+20200310/shared/util.c:79:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int alias_normalize(const char *alias, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:79:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int alias_normalize(const char *alias, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:148: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 *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:148:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:148:46:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:170: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 *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:170:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.c:170:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
data/kmod-27+20200310/shared/util.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[32], *end;
data/kmod-27+20200310/shared/util.c:271:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32], *end;
data/kmod-27+20200310/shared/util.c:384: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(&r[cwdlen + 1], p, plen + 1);
data/kmod-27+20200310/shared/util.h:24:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int alias_normalize(const char *alias, char buf[static PATH_MAX], size_t *len) _must_check_ __attribute__((nonnull(1,2)));
data/kmod-27+20200310/shared/util.h:24:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int alias_normalize(const char *alias, char buf[static PATH_MAX], size_t *len) _must_check_ __attribute__((nonnull(1,2)));
data/kmod-27+20200310/shared/util.h:26: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 *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(1, 2)));
data/kmod-27+20200310/shared/util.h:26:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(1, 2)));
data/kmod-27+20200310/shared/util.h:26:46:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(1, 2)));
data/kmod-27+20200310/shared/util.h:27: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 *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(2)));
data/kmod-27+20200310/shared/util.h:27:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_to_modname(const char *path, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(2)));
data/kmod-27+20200310/shared/util.h:27:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_to_modname(const char *path, char buf[static PATH_MAX], size_t *len) __attribute__((nonnull(2)));
data/kmod-27+20200310/testsuite/delete_module.c:93: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(mod->name, modname, modnamelen);
data/kmod-27+20200310/testsuite/init_module.c:108:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(mod->name, modname, modnamelen);
data/kmod-27+20200310/testsuite/init_module.c:125:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        f = fopen(fn, "we");
data/kmod-27+20200310/testsuite/init_module.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_MAX];
data/kmod-27+20200310/testsuite/init_module.c:156: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, sysfsmod, len);
data/kmod-27+20200310/testsuite/init_module.c:162:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(buf + len, "/initstate");
data/kmod-27+20200310/testsuite/path.c:46: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.
static const char *trap_path(const char *path, char buf[PATH_MAX * 2])
data/kmod-27+20200310/testsuite/path.c:46:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *trap_path(const char *path, char buf[PATH_MAX * 2])
data/kmod-27+20200310/testsuite/path.c:46:48:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *trap_path(const char *path, char buf[PATH_MAX * 2])
data/kmod-27+20200310/testsuite/path.c:60: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, rootpath, rootpathlen);
data/kmod-27+20200310/testsuite/path.c:105: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 * 2];                 \
data/kmod-27+20200310/testsuite/path.c:122: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 * 2];				\
data/kmod-27+20200310/testsuite/path.c:136:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
TS_EXPORT int open ## suffix (const char *path, int flags, ...)	\
data/kmod-27+20200310/testsuite/path.c:139: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 * 2];					\
data/kmod-27+20200310/testsuite/path.c:169: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 * 2];				    \
data/kmod-27+20200310/testsuite/path.c:185:25:  [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).
WRAP_2ARGS(FILE*, NULL, fopen, const char*);
data/kmod-27+20200310/testsuite/stripped-module.h: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 name[MODULE_NAME_LEN];
data/kmod-27+20200310/testsuite/test-hash.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[1024 * 8];
data/kmod-27+20200310/testsuite/test-scratchbuf.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 buf[3 + 2];
data/kmod-27+20200310/testsuite/test-scratchbuf.c:31: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 buf2[3 + 1];
data/kmod-27+20200310/testsuite/test-scratchbuf.c:43: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(scratchbuf_str(&sbuf), smallstr, strlen(smallstr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c: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 buf[3 + 1];
data/kmod-27+20200310/testsuite/test-scratchbuf.c:65: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(scratchbuf_str(&sbuf), smallstr, strlen(smallstr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:72: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(scratchbuf_str(&sbuf), largestr, strlen(largestr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:79: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(scratchbuf_str(&sbuf), largestr2, strlen(largestr2) + 1);
data/kmod-27+20200310/testsuite/test-testsuite.c:64:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char s[100];
data/kmod-27+20200310/testsuite/test-testsuite.c:67: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("/lib/modules/a", "r");
data/kmod-27+20200310/testsuite/test-testsuite.c:89:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[100];
data/kmod-27+20200310/testsuite/test-testsuite.c:92: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("/lib/modules/a", O_RDONLY);
data/kmod-27+20200310/testsuite/test-util.c:43: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/kmod-27+20200310/testsuite/test-util.c:76: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("/freadline_wrapped-input.txt", "re");
data/kmod-27+20200310/testsuite/test-util.c:187: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(TEST_WRITE_STR_SAFE_FILE ".txt", O_CREAT|O_TRUNC|O_WRONLY, 0644);
data/kmod-27+20200310/testsuite/testsuite.c:207: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(preload + preloadlen, ldpreload, ldpreloadlen);
data/kmod-27+20200310/testsuite/testsuite.c:292: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[BUFSZ];
data/kmod-27+20200310/testsuite/testsuite.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 buf_match[BUFSZ];
data/kmod-27+20200310/testsuite/testsuite.c:341: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).
	fd_match = open(fn, O_RDONLY);
data/kmod-27+20200310/testsuite/testsuite.c:696: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 bufa[4096];
data/kmod-27+20200310/testsuite/testsuite.c:697: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 bufb[4096];
data/kmod-27+20200310/testsuite/testsuite.c:699: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).
		fda = open(k->key, O_RDONLY);
data/kmod-27+20200310/testsuite/testsuite.c:705: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).
		fdb = open(k->val, O_RDONLY);
data/kmod-27+20200310/testsuite/testsuite.c:832: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 dirname[PATH_MAX];
data/kmod-27+20200310/testsuite/testsuite.c:885: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(p, dirent->d_name, size);
data/kmod-27+20200310/testsuite/testsuite.h:107: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 *config[_TC_LAST];
data/kmod-27+20200310/testsuite/uname.c:72: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(u->release, release, sz);
data/kmod-27+20200310/tools/depmod.c:162: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 value[0];
data/kmod-27+20200310/tools/depmod.c:255: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(v->value, value, len + 1);
data/kmod-27+20200310/tools/depmod.c:284:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(n, node, sizeof(struct index_node));
data/kmod-27+20200310/tools/depmod.c:462: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 dirname[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:505: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(s->path, path, len);
data/kmod-27+20200310/tools/depmod.c:533: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(o->path, subdir, subdirlen);
data/kmod-27+20200310/tools/depmod.c:538: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(o->path + i, modname, modnamelen);
data/kmod-27+20200310/tools/depmod.c:607: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(filename, "r");
data/kmod-27+20200310/tools/depmod.c:764: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(f->path, dir, dirlen);
data/kmod-27+20200310/tools/depmod.c:766: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(f->path + dirlen + 1, name, namelen);
data/kmod-27+20200310/tools/depmod.c:1010: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(mod->modname, modname, modnamesz);
data/kmod-27+20200310/tools/depmod.c:1180: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 modname[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:1255: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(path + baselen, name, namelen + 1);
data/kmod-27+20200310/tools/depmod.c:1315: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[256];
data/kmod-27+20200310/tools/depmod.c:1338: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(path_buf, path, baselen);
data/kmod-27+20200310/tools/depmod.c:1398: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).
	dfd = open(dname, O_RDONLY);
data/kmod-27+20200310/tools/depmod.c:1423: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 line[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:1489: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(sym->name, name, namelen);
data/kmod-27+20200310/tools/depmod.c:1700: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 + sz, v->mod->modname, len);
data/kmod-27+20200310/tools/depmod.c:2109: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(line + linepos, p, slen);
data/kmod-27+20200310/tools/depmod.c:2123: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(line + linepos, dp, slen);
data/kmod-27+20200310/tools/depmod.c:2184:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:2259: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 alias[1024];
data/kmod-27+20200310/tools/depmod.c:2274: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(alias, "symbol:", baselen);
data/kmod-27+20200310/tools/depmod.c:2292: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(scratchbuf_str(&salias) + baselen, sym->name, len + 1);
data/kmod-27+20200310/tools/depmod.c:2316: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 line[PATH_MAX], modname[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:2437: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 alias[PATH_MAX];
data/kmod-27+20200310/tools/depmod.c:2498: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).
		dfd = open(dname, O_RDONLY);
data/kmod-27+20200310/tools/depmod.c:2508: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 tmp[NAME_MAX] = "";
data/kmod-27+20200310/tools/depmod.c:2582: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 line[10240];
data/kmod-27+20200310/tools/depmod.c:2586: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(filename, "r");
data/kmod-27+20200310/tools/depmod.c:2632: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 line[10240];
data/kmod-27+20200310/tools/depmod.c:2636: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(filename, "r");
data/kmod-27+20200310/tools/depmod.c:2716: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(path + baselen, name, namelen + 1);
data/kmod-27+20200310/tools/depmod.c:2743: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(path + baselen, name, namelen + 1);
data/kmod-27+20200310/tools/depmod.c:2771: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/kmod-27+20200310/tools/depmod.c:2790: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(path, dirname, baselen);
data/kmod-27+20200310/tools/insmod.c:130: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(opts + optslen, argv[i], len);
data/kmod-27+20200310/tools/log.c:34: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.
static const char *prio_to_str(char buf[static PRIO_MAX_SIZE], int prio)
data/kmod-27+20200310/tools/log.c:34:32:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *prio_to_str(char buf[static PRIO_MAX_SIZE], int prio)
data/kmod-27+20200310/tools/log.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[PRIO_MAX_SIZE];
data/kmod-27+20200310/tools/log.c:115: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[PRIO_MAX_SIZE];
data/kmod-27+20200310/tools/modinfo.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 dirname_buf[PATH_MAX];
data/kmod-27+20200310/tools/modprobe.c:292: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(s, cmd, p - cmd);
data/kmod-27+20200310/tools/modprobe.c:293: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(s + prefixlen, cmdline_opts, cmdline_opts_len);
data/kmod-27+20200310/tools/modprobe.c:294:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(s + prefixlen + cmdline_opts_len, suffix, suffixlen);
data/kmod-27+20200310/tools/modprobe.c:662: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(opts + optslen, args[i], len + 1);
data/kmod-27+20200310/tools/modprobe.c:667: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(opts + optslen, args[i], keylen);
data/kmod-27+20200310/tools/modprobe.c:671: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(opts + optslen, value, valuelen);
data/kmod-27+20200310/tools/modprobe.c:705: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(str, env, envlen + 1);
data/kmod-27+20200310/tools/modprobe.c:745:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(new_argv + i, orig_argv + 1, sizeof(char *) * (argc - 1));
data/kmod-27+20200310/tools/modprobe.c:758: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 dirname_buf[PATH_MAX];
data/kmod-27+20200310/tools/static-nodes.c:158: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 modules[PATH_MAX], buf[4096];
data/kmod-27+20200310/tools/static-nodes.c:216: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).
	in = fopen(modules, "re");
data/kmod-27+20200310/tools/static-nodes.c:237:8:  [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).
	out = fopen(output, "we");
data/kmod-27+20200310/tools/static-nodes.c:245: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 modname[PATH_MAX];
data/kmod-27+20200310/tools/static-nodes.c:246: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[PATH_MAX];
data/kmod-27+20200310/libkmod/libkmod-builtin.c:64:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(dirname);
data/kmod-27+20200310/libkmod/libkmod-builtin.c:68:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((len + 1 + strlen(MODULES_BUILTIN_MODINFO) + 1) >= PATH_MAX) {
data/kmod-27+20200310/libkmod/libkmod-builtin.c:153:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(iter->buf + linesz, buf, partsz);
data/kmod-27+20200310/libkmod/libkmod-builtin.c:254:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(modname, line, len);
data/kmod-27+20200310/libkmod/libkmod-builtin.c:297:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	modlen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:121: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 modnamelen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:122: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 commandlen = strlen(command) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:159: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 modnamelen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:160: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 optionslen = strlen(options) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:198:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t namelen = strlen(name) + 1, modnamelen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:198: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).
	size_t namelen = strlen(name) + 1, modnamelen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:267: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 modnamelen = strlen(modname) + 1;
data/kmod-27+20200310/libkmod/libkmod-config.c:410: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(dep->pre[dep->n_pre - 1]);
data/kmod-27+20200310/libkmod/libkmod-config.c:419: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(dep->post[dep->n_post - 1]);
data/kmod-27+20200310/libkmod/libkmod-config.c:704:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(fn);
data/kmod-27+20200310/libkmod/libkmod-config.c:759: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).
	namelen = strlen(name);
data/kmod-27+20200310/libkmod/libkmod-config.c:848: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).
		pathlen = strlen(path) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:542:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen += strlen(symbol) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:563: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).
		symbollen = strlen(symbol) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:634: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).
			i += strlen(s);
data/kmod-27+20200310/libkmod/libkmod-elf.c:648: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(s);
data/kmod-27+20200310/libkmod/libkmod-elf.c:838:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen += strlen(name + crc_strlen) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:890:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen = strlen(name);
data/kmod-27+20200310/libkmod/libkmod-elf.c:1075:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen += strlen(name) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:1091: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).
				slen += strlen(name) + 1;
data/kmod-27+20200310/libkmod/libkmod-elf.c:1172:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen = strlen(name);
data/kmod-27+20200310/libkmod/libkmod-elf.c:1200:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen = strlen(name);
data/kmod-27+20200310/libkmod/libkmod-file.c:102:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t rdret = read(file->fd, in_buf, sizeof(in_buf));
data/kmod-27+20200310/libkmod/libkmod-index.c:376:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		write_str_safe(fd, v->value, strlen(v->value));
data/kmod-27+20200310/libkmod/libkmod-index.c:663: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 len = *rlen = strlen(addr);
data/kmod-27+20200310/libkmod/libkmod-module.c:118: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).
	pathlen = strlen(path);
data/kmod-27+20200310/libkmod/libkmod-module.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).
	dirnamelen = strlen(dirname);
data/kmod-27+20200310/libkmod/libkmod-module.c:349:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t namelen = strlen(name);
data/kmod-27+20200310/libkmod/libkmod-module.c:350:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t aliaslen = strlen(alias);
data/kmod-27+20200310/libkmod/libkmod-module.c:1018: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).
	options_len = strlen(options);
data/kmod-27+20200310/libkmod/libkmod-module.c:1019:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cmdlen = strlen(command);
data/kmod-27+20200310/libkmod/libkmod-module.c:1056: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).
	size_t optlen = opt == NULL ? 0 : strlen(opt);
data/kmod-27+20200310/libkmod/libkmod-module.c:1057:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t xoptlen = xopt == NULL ? 0 : strlen(xopt);
data/kmod-27+20200310/libkmod/libkmod-module.c:1411:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(str);
data/kmod-27+20200310/libkmod/libkmod-module.c:1676: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 len = strlen(line);
data/kmod-27+20200310/libkmod/libkmod-module.c:1695:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(line);
data/kmod-27+20200310/libkmod/libkmod-module.c:1845: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 len = strlen(line);
data/kmod-27+20200310/libkmod/libkmod-module.c:1871:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(line);
data/kmod-27+20200310/libkmod/libkmod-module.c:2057: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).
		namesz = strlen(dent->d_name) + 1;
data/kmod-27+20200310/libkmod/libkmod-module.c:2248: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).
		n = kmod_module_info_append(list, key, keylen, hex, strlen(hex));
data/kmod-27+20200310/libkmod/libkmod-module.c:2319: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).
			keylen = strlen(key);
data/kmod-27+20200310/libkmod/libkmod-module.c:2325: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).
			valuelen = strlen(value);
data/kmod-27+20200310/libkmod/libkmod-module.c:2336:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		n = kmod_module_info_append(list, "sig_id", strlen("sig_id"),
data/kmod-27+20200310/libkmod/libkmod-module.c:2337: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).
				sig_info.id_type, strlen(sig_info.id_type));
data/kmod-27+20200310/libkmod/libkmod-module.c:2342:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		n = kmod_module_info_append(list, "signer", strlen("signer"),
data/kmod-27+20200310/libkmod/libkmod-module.c:2349:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		n = kmod_module_info_append_hex(list, "sig_key", strlen("sig_key"),
data/kmod-27+20200310/libkmod/libkmod-module.c:2357: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).
				"sig_hashalgo", strlen("sig_hashalgo"),
data/kmod-27+20200310/libkmod/libkmod-module.c:2358: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).
				sig_info.hash_algo, strlen(sig_info.hash_algo));
data/kmod-27+20200310/libkmod/libkmod-module.c:2368: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).
						strlen("signature"),
data/kmod-27+20200310/libkmod/libkmod-module.c:2453: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).
	size_t symbollen = strlen(symbol) + 1;
data/kmod-27+20200310/libkmod/libkmod-module.c:2593: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).
	size_t symbollen = strlen(symbol) + 1;
data/kmod-27+20200310/libkmod/libkmod-module.c:2734: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).
	size_t symbollen = strlen(symbol) + 1;
data/kmod-27+20200310/libkmod/libkmod-signature.c:269: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).
		sig_info->signer_len = strlen(issuer_str);
data/kmod-27+20200310/libkmod/libkmod-signature.c:333: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 (size < (off_t)strlen(SIG_MAGIC))
data/kmod-27+20200310/libkmod/libkmod-signature.c:335:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size -= strlen(SIG_MAGIC);
data/kmod-27+20200310/libkmod/libkmod-signature.c:336: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 (memcmp(SIG_MAGIC, mem + size, strlen(SIG_MAGIC)) != 0)
data/kmod-27+20200310/shared/hash.c:148:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int keylen = strlen(key);
data/kmod-27+20200310/shared/hash.c:191:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int keylen = strlen(key);
data/kmod-27+20200310/shared/hash.c:236:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int keylen = strlen(key);
data/kmod-27+20200310/shared/hash.c:254:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int keylen = strlen(key);
data/kmod-27+20200310/shared/strbuf.c:101: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).
	len = strlen(str);
data/kmod-27+20200310/shared/util.c:205:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t r = read(fd, buf + done, todo);
data/kmod-27+20200310/shared/util.c:374: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).
	plen = strlen(p);
data/kmod-27+20200310/shared/util.c:375:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cwdlen = strlen(cwd);
data/kmod-27+20200310/shared/util.c:413:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			end += strlen(end);
data/kmod-27+20200310/shared/util.c:442:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		end += strlen(end);
data/kmod-27+20200310/shared/util.h:16: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).
#define strstartswith(a, b) (strncmp(a, b, strlen(b)) == 0)
data/kmod-27+20200310/testsuite/init_module.c:154: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).
	int len = strlen(sysfsmod);
data/kmod-27+20200310/testsuite/init_module.c:158: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(modname);
data/kmod-27+20200310/testsuite/init_module.c:163: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).
	return write_one_line_file(buf, "live\n", strlen("live\n"));
data/kmod-27+20200310/testsuite/path.c:53: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).
	len = strlen(path);
data/kmod-27+20200310/testsuite/path.c:77: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).
	rootpathlen = strlen(rootpath);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:34: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).
	assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:39: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).
	assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:43: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).
	memcpy(scratchbuf_str(&sbuf), smallstr, strlen(smallstr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:63: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).
	assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:65: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).
	memcpy(scratchbuf_str(&sbuf), smallstr, strlen(smallstr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:68: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).
	assert_return(scratchbuf_alloc(&sbuf, strlen(largestr) + 1) == 0, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:70: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).
	assert_return(sbuf.size == strlen(largestr) + 1, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:72: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).
	memcpy(scratchbuf_str(&sbuf), largestr, strlen(largestr) + 1);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:76: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).
	assert_return(scratchbuf_alloc(&sbuf, strlen(largestr2) + 1) == 0, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:78: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).
	assert_return(sbuf.size == strlen(largestr2) + 1, EXIT_FAILURE);
data/kmod-27+20200310/testsuite/test-scratchbuf.c:79:43:  [1] (buffer) strlen:
  Does not handle 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(scratchbuf_str(&sbuf), largestr2, strlen(largestr2) + 1);
data/kmod-27+20200310/testsuite/test-strbuf.c:73: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).
		lastwordlen = strlen(c);
data/kmod-27+20200310/testsuite/test-strbuf.c:84: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).
	assert_return(strncmp(TEXT, result2, strlen(TEXT) - lastwordlen) == 0,
data/kmod-27+20200310/testsuite/test-strbuf.c:86: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).
	assert_return(result2[strlen(TEXT) - lastwordlen] == '\0',
data/kmod-27+20200310/testsuite/test-testsuite.c:97:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int r = read(fd, buf + done, sizeof(buf) - 1 - done);
data/kmod-27+20200310/testsuite/test-util.c:169: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).
						      strlen(iter->val)) == iter->res,
data/kmod-27+20200310/testsuite/test-util.c:190: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).
	write_str_safe(fd, s, strlen(s));
data/kmod-27+20200310/testsuite/testsuite.c:197: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).
		ldpreloadlen = strlen(ldpreload);
data/kmod-27+20200310/testsuite/testsuite.c:454:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(fd_cmp->fd, fd_cmp->buf + fd_cmp->head,
data/kmod-27+20200310/testsuite/testsuite.c:482:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			r = read(fd_cmp->fd_match, fd_cmp->buf_match + fd_cmp->head_match,
data/kmod-27+20200310/testsuite/testsuite.c:534:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(fd_cmp->fd, fd_cmp->buf, sizeof(fd_cmp->buf) - 1);
data/kmod-27+20200310/testsuite/testsuite.c:541:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rmatch = read(fd_cmp->fd_match, fd_cmp->buf_match + done, r - done);
data/kmod-27+20200310/testsuite/testsuite.c:678:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		r = read(fd, buf, count);
data/kmod-27+20200310/testsuite/testsuite.c:860: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).
		bufsz += strlen(dirent->d_name) + 1;
data/kmod-27+20200310/testsuite/testsuite.c:884:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size = strlen(dirent->d_name) + 1;
data/kmod-27+20200310/testsuite/uname.c:63: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).
	sz = strlen(release) + 1;
data/kmod-27+20200310/tools/depmod.c:251: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).
	len = strlen(value);
data/kmod-27+20200310/tools/depmod.c:493: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) + 1;
data/kmod-27+20200310/tools/depmod.c:523: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 modnamelen = strlen(modname);
data/kmod-27+20200310/tools/depmod.c:524: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).
	size_t subdirlen = strlen(subdir);
data/kmod-27+20200310/tools/depmod.c:559:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(path);
data/kmod-27+20200310/tools/depmod.c:680:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/kmod-27+20200310/tools/depmod.c:720:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	dirlen = strlen(dir);
data/kmod-27+20200310/tools/depmod.c:722: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).
		namelen = strlen(name);
data/kmod-27+20200310/tools/depmod.c:725: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).
		namelen = strlen(name);
data/kmod-27+20200310/tools/depmod.c:1002:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	modnamesz = strlen(modname) + 1;
data/kmod-27+20200310/tools/depmod.c:1032:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				       + strlen(KMOD_EXTENSION_UNCOMPRESSED);
data/kmod-27+20200310/tools/depmod.c:1247: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).
		namelen = strlen(name);
data/kmod-27+20200310/tools/depmod.c:1330: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).
	baselen = strlen(path);
data/kmod-27+20200310/tools/depmod.c:1433: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 len = strlen(line);
data/kmod-27+20200310/tools/depmod.c:1447: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 len = strlen(line);
data/kmod-27+20200310/tools/depmod.c:1482: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).
	namelen = strlen(name) + 1;
data/kmod-27+20200310/tools/depmod.c:1691: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).
	buf = malloc(sz + n * strlen(sep) + 1);
data/kmod-27+20200310/tools/depmod.c:1703: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).
		sz += strlen(sep);
data/kmod-27+20200310/tools/depmod.c:2094: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).
		linelen = strlen(p) + 1;
data/kmod-27+20200310/tools/depmod.c:2097: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).
			linelen += 1 + strlen(mod_get_compressed_path(d));
data/kmod-27+20200310/tools/depmod.c:2108:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		slen = strlen(p);
data/kmod-27+20200310/tools/depmod.c:2122:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			slen = strlen(dp);
data/kmod-27+20200310/tools/depmod.c:2286: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(sym->name);
data/kmod-27+20200310/tools/depmod.c:2701: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).
		namelen = strlen(name);
data/kmod-27+20200310/tools/depmod.c:2789: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).
	baselen = strlen(dirname);
data/kmod-27+20200310/tools/insmod.c:118: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 len = strlen(argv[i]);
data/kmod-27+20200310/tools/modinfo.c:102:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		paramlen = strlen(param);
data/kmod-27+20200310/tools/modinfo.c:109: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).
		typelen = strlen(type);
data/kmod-27+20200310/tools/modinfo.c:237: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).
		keylen = strlen(key);
data/kmod-27+20200310/tools/modinfo.c:357: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).
		path_ends_with_kmod_ext(name, strlen(name)))
data/kmod-27+20200310/tools/modprobe.c:275: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).
	cmdline_opts_len = strlen(cmdline_opts);
data/kmod-27+20200310/tools/modprobe.c:280:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cmdlen = strlen(cmd);
data/kmod-27+20200310/tools/modprobe.c:634: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 len = strlen(args[i]);

ANALYSIS SUMMARY:

Hits = 393
Lines analyzed = 22159 in approximately 1.17 seconds (18893 lines/second)
Physical Source Lines of Code (SLOC) = 16106
Hits@level = [0] 113 [1] 136 [2] 217 [3]  19 [4]  21 [5]   0
Hits@level+ = [0+] 506 [1+] 393 [2+] 257 [3+]  40 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 31.4169 [1+] 24.4008 [2+] 15.9568 [3+] 2.48355 [4+] 1.30386 [5+]   0
Dot directories skipped = 2 (--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.