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/opensmtpd-extras-6.7.1/openbsd-compat/asr.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/openbsd-compat.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/strsep.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/strlcpy.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/base64.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-misc.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/imsg.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/defines.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/sys/tree.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/sys/queue.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/strtonum.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/base64.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/imsg-buffer.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/mktemp.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/chacha_private.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-closefrom.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/strlcat.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-misc.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/event_asr_run.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/arc4random.c
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/imsg.h
Examining data/opensmtpd-extras-6.7.1/openbsd-compat/includes.h
Examining data/opensmtpd-extras-6.7.1/api/dict.c
Examining data/opensmtpd-extras-6.7.1/api/log.c
Examining data/opensmtpd-extras-6.7.1/api/to.c
Examining data/opensmtpd-extras-6.7.1/api/rfc2822.c
Examining data/opensmtpd-extras-6.7.1/api/util.c
Examining data/opensmtpd-extras-6.7.1/api/iobuf.h
Examining data/opensmtpd-extras-6.7.1/api/ioev.c
Examining data/opensmtpd-extras-6.7.1/api/smtpd-defines.h
Examining data/opensmtpd-extras-6.7.1/api/table_api.c
Examining data/opensmtpd-extras-6.7.1/api/log.h
Examining data/opensmtpd-extras-6.7.1/api/filter_api.c
Examining data/opensmtpd-extras-6.7.1/api/queue_api.c
Examining data/opensmtpd-extras-6.7.1/api/iobuf.c
Examining data/opensmtpd-extras-6.7.1/api/queue_utils.c
Examining data/opensmtpd-extras-6.7.1/api/rfc2822.h
Examining data/opensmtpd-extras-6.7.1/api/scheduler_api.c
Examining data/opensmtpd-extras-6.7.1/api/ioev.h
Examining data/opensmtpd-extras-6.7.1/api/smtpd-api.h
Examining data/opensmtpd-extras-6.7.1/api/mproc.c
Examining data/opensmtpd-extras-6.7.1/api/tree.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-redis/table_redis.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.h
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.h
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-postgres/table_postgres.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-stub/table_stub.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-python/table_python.c
Examining data/opensmtpd-extras-6.7.1/extras/tables/table-sqlite/table_sqlite.c
Examining data/opensmtpd-extras-6.7.1/extras/queues/queue-ram/queue_ram.c
Examining data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c
Examining data/opensmtpd-extras-6.7.1/extras/queues/queue-null/queue_null.c
Examining data/opensmtpd-extras-6.7.1/extras/queues/queue-stub/queue_stub.c
Examining data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-stub/scheduler_stub.c
Examining data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c
Examining data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-python/scheduler_python.c

FINAL RESULTS:

data/opensmtpd-extras-6.7.1/api/ioev.c:81:47:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define io_debug(args...) do { if (_io_debug) printf(args); } while(0)
data/opensmtpd-extras-6.7.1/api/log.c:45:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 2, 3)));
data/opensmtpd-extras-6.7.1/api/log.c:86:4:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			vfprintf(stderr, fmt, ap);
data/opensmtpd-extras-6.7.1/api/log.c:89:4:  [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, nfmt, ap);
data/opensmtpd-extras-6.7.1/api/log.c:176:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			(void)vsnprintf(ebuffer, sizeof ebuffer, emsg, ap);
data/opensmtpd-extras-6.7.1/api/log.c:181:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			(void)vsnprintf(ebuffer, sizeof ebuffer, emsg, ap);
data/opensmtpd-extras-6.7.1/api/log.h:22:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/log.h:24:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/log.h:26:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/log.h:28:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/log.h:30:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 2, 3)));
data/opensmtpd-extras-6.7.1/api/log.h:32:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/log.h:34:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format (printf, 1, 2)));
data/opensmtpd-extras-6.7.1/api/mproc.c:91:3:  [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(path, argv);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:48:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DPRINTF(x...)	printf(x)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:56:22:  [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 DPRINTF(...)	printf(__VA_ARGS__)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:431:6:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	if (snprintf(filter, sizeof(filter), q->filter, key)
data/opensmtpd-extras-6.7.1/openbsd-compat/openbsd-compat.h:87:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
data/opensmtpd-extras-6.7.1/openbsd-compat/openbsd-compat.h:111:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int vsnprintf(char *, size_t, const char *, va_list);
data/opensmtpd-extras-6.7.1/api/filter_api.c:1054:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(fi.rootpath) == -1) {
data/opensmtpd-extras-6.7.1/api/ioev.c:226:14:  [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.
	_io_debug = getenv("IO_DEBUG") != NULL;
data/opensmtpd-extras-6.7.1/api/queue_api.c:412:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(rootpath) == -1) {
data/opensmtpd-extras-6.7.1/api/scheduler_api.c:431:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(rootpath) == -1) {
data/opensmtpd-extras-6.7.1/api/table_api.c:292:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(rootpath) == -1) {
data/opensmtpd-extras-6.7.1/extras/queues/queue-null/queue_null.c:129:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c:417:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/queues/queue-ram/queue_ram.c:347:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/queues/queue-stub/queue_stub.c:125:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-python/scheduler_python.c:516:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c:1192:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-stub/scheduler_stub.c:124:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:519:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:574:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:211:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-postgres/table_postgres.c:509:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-python/table_python.c:269:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-redis/table_redis.c:522:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:208:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-sqlite/table_sqlite.c:460:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/extras/tables/table-stub/table_stub.c:55:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "")) != -1) {
data/opensmtpd-extras-6.7.1/api/filter_api.c:812:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[32];
data/opensmtpd-extras-6.7.1/api/filter_api.c:1201:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[NI_MAXHOST];
data/opensmtpd-extras-6.7.1/api/filter_api.c:1213:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char  buffer[LINE_MAX];
data/opensmtpd-extras-6.7.1/api/filter_api.c:1319:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(pathname);
data/opensmtpd-extras-6.7.1/api/ioev.c:87:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[128];
data/opensmtpd-extras-6.7.1/api/ioev.c:88:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		ssl[128];
data/opensmtpd-extras-6.7.1/api/ioev.c:118:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[32];
data/opensmtpd-extras-6.7.1/api/ioev.c:445:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[64];
data/opensmtpd-extras-6.7.1/api/ioev.c:475:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[64];
data/opensmtpd-extras-6.7.1/api/ioev.c:476:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[16];
data/opensmtpd-extras-6.7.1/api/ioev.c:661:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[128];
data/opensmtpd-extras-6.7.1/api/log.c:170:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	ebuffer[FATALBUFSIZE];
data/opensmtpd-extras-6.7.1/api/mproc.c:249: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[CMSG_SPACE(sizeof(int))];
data/opensmtpd-extras-6.7.1/api/mproc.c:471:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	buf[512];
data/opensmtpd-extras-6.7.1/api/queue_api.c:114:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 buffer[8192], path[PATH_MAX];
data/opensmtpd-extras-6.7.1/api/queue_api.c:169:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		fd = mkstemp(path);
data/opensmtpd-extras-6.7.1/api/queue_utils.c:62:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 path[PATH_MAX];
data/opensmtpd-extras-6.7.1/api/queue_utils.c:73:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(path)) == -1) {
data/opensmtpd-extras-6.7.1/api/rfc2822.c:109: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.
		(void)memcpy(rp->header.name, line, pos - line);
data/opensmtpd-extras-6.7.1/api/rfc2822.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			buffer[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.c:218:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			buffer[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.c:246:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			buffer[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.h:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char				buffer[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.h:34:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.h: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[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/rfc2822.h:49:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char					name[RFC2822_MAX_LINE_SIZE+1];
data/opensmtpd-extras-6.7.1/api/smtpd-api.h:82:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	user[SMTPD_MAXLOCALPARTSIZE];
data/opensmtpd-extras-6.7.1/api/smtpd-api.h:83:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	domain[SMTPD_MAXDOMAINPARTSIZE];
data/opensmtpd-extras-6.7.1/api/smtpd-api.h:233:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[LINE_MAX];
data/opensmtpd-extras-6.7.1/api/table_api.c:138:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 res[4096];
data/opensmtpd-extras-6.7.1/api/to.c:58:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[NI_MAXHOST];
data/opensmtpd-extras-6.7.1/api/to.c:95:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char  buffer[LINE_MAX];
data/opensmtpd-extras-6.7.1/api/to.c:132:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char  buffer[LINE_MAX];
data/opensmtpd-extras-6.7.1/api/to.c:146:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 buf[NI_MAXHOST + 5];
data/opensmtpd-extras-6.7.1/api/to.c:187:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[40];
data/opensmtpd-extras-6.7.1/api/to.c:216:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	dst[64];
data/opensmtpd-extras-6.7.1/api/to.c:217:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		buf[64];
data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c:265: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, view.buf, view.len);
data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c:303: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, py_view.buf, py_view.len);
data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c:342: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, py_view.buf, py_view.len);
data/opensmtpd-extras-6.7.1/extras/queues/queue-python/queue_python.c:380:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(path, "r")) == NULL)
data/opensmtpd-extras-6.7.1/extras/queues/queue-ram/queue_ram.c:91:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(path, "rb")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-python/scheduler_python.c:475:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(path, "r")) == NULL)
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c:131:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	dst[64];
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c:132:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[64];
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c:1087:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[256];
data/opensmtpd-extras-6.7.1/extras/schedulers/scheduler-ram/scheduler_ram.c:1088:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		t[64];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:346: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(page->cookie, s, page->cookie_len);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:1223:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	 hex[3];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.h:77:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		*attributes[MAXATTR];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:418:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			*sp, *p, str[BUFSIZ];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:60:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*attrs[MAX_ATTRS];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:159:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	buffer[1024];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:202:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(config, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:357:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char				 basedn__[MAX_LDAP_BASELEN];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:358:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char				 filter__[MAX_LDAP_FILTERLEN];
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:415:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		**res[4], filter[MAX_LDAP_FILTERLEN];
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:72: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.
static char		 results_buffer[SQL_MAX_RESULT][LINE_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:134:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(path, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:342:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 buffer[LINE_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:93:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(config, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:165:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[LINE_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-postgres/table_postgres.c:51:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		*statements[SQL_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-postgres/table_postgres.c:149:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(path, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/tables/table-python/table_python.c:228:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(path, "r")) == NULL)
data/opensmtpd-extras-6.7.1/extras/tables/table-redis/table_redis.c:52:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		*queries[REDIS_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-redis/table_redis.c:76:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(path, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:38: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.
static char		repbuffer[REPLYBUFFERSIZE+1];
data/opensmtpd-extras-6.7.1/extras/tables/table-sqlite/table_sqlite.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		*queries[SQL_MAX];
data/opensmtpd-extras-6.7.1/extras/tables/table-sqlite/table_sqlite.c:138:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(config, "r")) == NULL) {
data/opensmtpd-extras-6.7.1/openbsd-compat/arc4random.c:61:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char rs_buf[RSBUFSZ];	/* keystream blocks */
data/opensmtpd-extras-6.7.1/openbsd-compat/arc4random.c:79:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char rnd[KEYSZ + IVSZ];
data/opensmtpd-extras-6.7.1/openbsd-compat/arc4random.c:143: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(buf, rs_buf + RSBUFSZ - rs_have, m);
data/opensmtpd-extras-6.7.1/openbsd-compat/arc4random.c:160: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(val, rs_buf + RSBUFSZ - rs_have, sizeof(*val));
data/opensmtpd-extras-6.7.1/openbsd-compat/base64.c:137:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char input[3];
data/opensmtpd-extras-6.7.1/openbsd-compat/base64.c:138:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char output[4];
data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-closefrom.c:73: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 fdpath[PATH_MAX], *endp;
data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-misc.c:49:10:  [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(cp, str, len));
data/opensmtpd-extras-6.7.1/openbsd-compat/chacha_private.h:51: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 sigma[16] = "expand 32-byte k";
data/opensmtpd-extras-6.7.1/openbsd-compat/chacha_private.h:52: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 tau[16] = "expand 16-byte k";
data/opensmtpd-extras-6.7.1/openbsd-compat/defines.h:101:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	sun_path[108];		/* path name (gag) */
data/opensmtpd-extras-6.7.1/openbsd-compat/imsg-buffer.c:98: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->buf + buf->wpos, data, len);
data/opensmtpd-extras-6.7.1/openbsd-compat/imsg-buffer.c:234: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[CMSG_SPACE(sizeof(int))];
data/opensmtpd-extras-6.7.1/openbsd-compat/imsg.c:79: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[CMSG_SPACE(sizeof(int) * 1)];
data/opensmtpd-extras-6.7.1/openbsd-compat/imsg.c:178: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(imsg->data, ibuf->r.rptr, datalen);
data/opensmtpd-extras-6.7.1/openbsd-compat/imsg.h:45:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char		 buf[IBUF_READ_SIZE];
data/opensmtpd-extras-6.7.1/openbsd-compat/mktemp.c:71:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
data/opensmtpd-extras-6.7.1/openbsd-compat/mktemp.c:81:1:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
mkstemp(char *path)
data/opensmtpd-extras-6.7.1/openbsd-compat/openbsd-compat.h:62:5:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
int mkstemp(char *path);
data/opensmtpd-extras-6.7.1/api/dict.c:53: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			 s = strlen(k) + 1;
data/opensmtpd-extras-6.7.1/api/filter_api.c:1146: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).
	s->pipe.odatalen += strlen(line) + 1;
data/opensmtpd-extras-6.7.1/api/filter_api.c:1292: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).
	lowercase(key, key, strlen(key)+1);
data/opensmtpd-extras-6.7.1/api/filter_api.c:1405: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).
	lowercase(key, key, strlen(key)+1);
data/opensmtpd-extras-6.7.1/api/filter_api.c:1427: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).
	lowercase(key, key, strlen(key)+1);
data/opensmtpd-extras-6.7.1/api/iobuf.c:210:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(fd, io->buf + io->wpos, iobuf_left(io));
data/opensmtpd-extras-6.7.1/api/ioev.c:546:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				goto read;
data/opensmtpd-extras-6.7.1/api/ioev.c:560:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read:
data/opensmtpd-extras-6.7.1/api/mproc.c:539: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).
	m_add(m, v, strlen(v) + 1);
data/opensmtpd-extras-6.7.1/api/queue_utils.c:72:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	omode = umask(7077);
data/opensmtpd-extras-6.7.1/api/queue_utils.c:77:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(omode);
data/opensmtpd-extras-6.7.1/api/table_api.c:117: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).
		table_msg_get(NULL, strlen(key) + 1);
data/opensmtpd-extras-6.7.1/api/table_api.c:119: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).
		table_msg_get(NULL, strlen(value) + 1);
data/opensmtpd-extras-6.7.1/api/table_api.c:219: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).
			table_msg_add(res, strlen(res) + 1);
data/opensmtpd-extras-6.7.1/api/table_api.c:236: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).
			table_msg_add(res, strlen(res) + 1);
data/opensmtpd-extras-6.7.1/api/util.c:121:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (l = strlen(s); l; l--) {
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:578:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncasecmp(LDAP_URL, p, strlen(LDAP_URL)) != 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:581: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).
	p += strlen(LDAP_URL);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:600:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:607:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:618:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:626:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:639:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:656:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(p) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:922:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				    strlen(parsed_val));
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/aldap.c:935: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).
		elm = ber_add_nstring(elm, parsed_val, strlen(parsed_val));
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:263:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return ber_add_nstring(prev, string, strlen(string));
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:636:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t			*len, ret = 0, n = strlen(fmt);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:1237:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		r = read(b->fd, c, 1);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/ber.c:1257:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			r = read(ber->fd, b, remain);
data/opensmtpd-extras-6.7.1/extras/tables/table-ldap/table_ldap.c:188: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).
		p += strlen(p) + 1;
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:86: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).
	if (mysql_stmt_prepare(stmt, query, strlen(query))) {
data/opensmtpd-extras-6.7.1/extras/tables/table-mysql/table_mysql.c:361: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).
	keylen = strlen(key);
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:42:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!(pw->pw_name = strsep(&buf, ":")) || !strlen(pw->pw_name))
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:47: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).
	    (service == K_CREDENTIALS && !strlen(pw->pw_passwd)))
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:54: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).
	if (service == K_USERINFO && (!strlen(p) || e))
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:61: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).
	if (service == K_USERINFO && (!strlen(p) || e))
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:70: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).
	    (service == K_USERINFO && !strlen(pw->pw_dir)))
data/opensmtpd-extras-6.7.1/extras/tables/table-passwd/table_passwd.c:115:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(buf) == 0)
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:117:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(repbuffer, repbuffer+3, strlen(repbuffer)-2);
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:121:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(repbuffer, repbuffer+9, strlen(repbuffer)-8);
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:125:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(repbuffer, repbuffer+5, strlen(repbuffer)-4);
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:129:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(repbuffer, repbuffer+8, strlen(repbuffer)-7);
data/opensmtpd-extras-6.7.1/extras/tables/table-socketmap/table_socketmap.c:133:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(repbuffer, repbuffer+5, strlen(repbuffer)-4);
data/opensmtpd-extras-6.7.1/extras/tables/table-sqlite/table_sqlite.c:293: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).
	if (sqlite3_bind_text(stmt, 1, key, strlen(key), NULL) != SQLITE_OK) {
data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-closefrom.c:35: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/opensmtpd-extras-6.7.1/openbsd-compat/bsd-misc.c:46: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) + 1;
data/opensmtpd-extras-6.7.1/openbsd-compat/mktemp.c:51: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/opensmtpd-extras-6.7.1/openbsd-compat/strlcat.c:49: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).
		return(dlen + strlen(s));

ANALYSIS SUMMARY:

Hits = 178
Lines analyzed = 20948 in approximately 0.49 seconds (42601 lines/second)
Physical Source Lines of Code (SLOC) = 15861
Hits@level = [0]  99 [1]  49 [2]  89 [3]  21 [4]  19 [5]   0
Hits@level+ = [0+] 277 [1+] 178 [2+] 129 [3+]  40 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 17.4642 [1+] 11.2225 [2+] 8.13316 [3+] 2.52191 [4+] 1.19791 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.