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-6.7.1p1/smtpd/dict.c Examining data/opensmtpd-6.7.1p1/smtpd/waitq.c Examining data/opensmtpd-6.7.1p1/smtpd/log.c Examining data/opensmtpd-6.7.1p1/smtpd/proxy.c Examining data/opensmtpd-6.7.1p1/smtpd/aliases.c Examining data/opensmtpd-6.7.1p1/smtpd/smtpd.h Examining data/opensmtpd-6.7.1p1/smtpd/scheduler_ramqueue.c Examining data/opensmtpd-6.7.1p1/smtpd/rfc5322.h Examining data/opensmtpd-6.7.1p1/smtpd/spfwalk.c Examining data/opensmtpd-6.7.1p1/smtpd/stat_backend.c Examining data/opensmtpd-6.7.1p1/smtpd/smtp.h Examining data/opensmtpd-6.7.1p1/smtpd/queue_fs.c Examining data/opensmtpd-6.7.1p1/smtpd/ssl_smtpd.c Examining data/opensmtpd-6.7.1p1/smtpd/ssl.c Examining data/opensmtpd-6.7.1p1/smtpd/to.c Examining data/opensmtpd-6.7.1p1/smtpd/queue_null.c Examining data/opensmtpd-6.7.1p1/smtpd/compress_backend.c Examining data/opensmtpd-6.7.1p1/smtpd/enqueue.c Examining data/opensmtpd-6.7.1p1/smtpd/table.c Examining data/opensmtpd-6.7.1p1/smtpd/util.c Examining data/opensmtpd-6.7.1p1/smtpd/queue_ram.c Examining data/opensmtpd-6.7.1p1/smtpd/iobuf.h Examining data/opensmtpd-6.7.1p1/smtpd/cert.c Examining data/opensmtpd-6.7.1p1/smtpd/resolver.c Examining data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c Examining data/opensmtpd-6.7.1p1/smtpd/limit.c Examining data/opensmtpd-6.7.1p1/smtpd/unpack_dns.c Examining data/opensmtpd-6.7.1p1/smtpd/ioev.c Examining data/opensmtpd-6.7.1p1/smtpd/dns.c Examining data/opensmtpd-6.7.1p1/smtpd/mail.lmtp.c Examining data/opensmtpd-6.7.1p1/smtpd/parser.h Examining data/opensmtpd-6.7.1p1/smtpd/smtpd-defines.h Examining data/opensmtpd-6.7.1p1/smtpd/smtpctl.c Examining data/opensmtpd-6.7.1p1/smtpd/runq.c Examining data/opensmtpd-6.7.1p1/smtpd/libressl.c Examining data/opensmtpd-6.7.1p1/smtpd/envelope.c Examining data/opensmtpd-6.7.1p1/smtpd/srs.c Examining data/opensmtpd-6.7.1p1/smtpd/forward.c Examining data/opensmtpd-6.7.1p1/smtpd/smtp_client.c Examining data/opensmtpd-6.7.1p1/smtpd/ca.c Examining data/opensmtpd-6.7.1p1/smtpd/lka_filter.c Examining data/opensmtpd-6.7.1p1/smtpd/tree.h Examining data/opensmtpd-6.7.1p1/smtpd/queue.c Examining data/opensmtpd-6.7.1p1/smtpd/makemap.c Examining data/opensmtpd-6.7.1p1/smtpd/mta.c Examining data/opensmtpd-6.7.1p1/smtpd/filter.c Examining data/opensmtpd-6.7.1p1/smtpd/table_getpwnam.c Examining data/opensmtpd-6.7.1p1/smtpd/queue_proc.c Examining data/opensmtpd-6.7.1p1/smtpd/control.c Examining data/opensmtpd-6.7.1p1/smtpd/lka.c Examining data/opensmtpd-6.7.1p1/smtpd/mail.mda.c Examining data/opensmtpd-6.7.1p1/smtpd/smtp.c Examining data/opensmtpd-6.7.1p1/smtpd/ssl.h Examining data/opensmtpd-6.7.1p1/smtpd/table_proc.c Examining data/opensmtpd-6.7.1p1/smtpd/table_static.c Examining data/opensmtpd-6.7.1p1/smtpd/compress_gzip.c Examining data/opensmtpd-6.7.1p1/smtpd/smtpd.c Examining data/opensmtpd-6.7.1p1/smtpd/mailaddr.c Examining data/opensmtpd-6.7.1p1/smtpd/rfc5322.c Examining data/opensmtpd-6.7.1p1/smtpd/dict.h Examining data/opensmtpd-6.7.1p1/smtpd/queue_backend.c Examining data/opensmtpd-6.7.1p1/smtpd/ruleset.c Examining data/opensmtpd-6.7.1p1/smtpd/log.h Examining data/opensmtpd-6.7.1p1/smtpd/mda_mbox.c Examining data/opensmtpd-6.7.1p1/smtpd/table_db.c Examining data/opensmtpd-6.7.1p1/smtpd/scheduler_backend.c Examining data/opensmtpd-6.7.1p1/smtpd/scheduler_null.c Examining data/opensmtpd-6.7.1p1/smtpd/mail.mboxfile.c Examining data/opensmtpd-6.7.1p1/smtpd/iobuf.c Examining data/opensmtpd-6.7.1p1/smtpd/config.c Examining data/opensmtpd-6.7.1p1/smtpd/ssl_verify.c Examining data/opensmtpd-6.7.1p1/smtpd/scheduler_proc.c Examining data/opensmtpd-6.7.1p1/smtpd/esc.c Examining data/opensmtpd-6.7.1p1/smtpd/smtpc.c Examining data/opensmtpd-6.7.1p1/smtpd/lka_session.c Examining data/opensmtpd-6.7.1p1/smtpd/stat_ramstat.c Examining data/opensmtpd-6.7.1p1/smtpd/scheduler.c Examining data/opensmtpd-6.7.1p1/smtpd/report_smtp.c Examining data/opensmtpd-6.7.1p1/smtpd/ioev.h Examining data/opensmtpd-6.7.1p1/smtpd/smtpd-api.h Examining data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h Examining data/opensmtpd-6.7.1p1/smtpd/mta_session.c Examining data/opensmtpd-6.7.1p1/smtpd/parser.c Examining data/opensmtpd-6.7.1p1/smtpd/bounce.c Examining data/opensmtpd-6.7.1p1/smtpd/crypto.c Examining data/opensmtpd-6.7.1p1/smtpd/mda_unpriv.c Examining data/opensmtpd-6.7.1p1/smtpd/smtp_session.c Examining data/opensmtpd-6.7.1p1/smtpd/expand.c Examining data/opensmtpd-6.7.1p1/smtpd/mda.c Examining data/opensmtpd-6.7.1p1/smtpd/mproc.c Examining data/opensmtpd-6.7.1p1/smtpd/pony.c Examining data/opensmtpd-6.7.1p1/smtpd/mda_variables.c Examining data/opensmtpd-6.7.1p1/smtpd/tree.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-waitpid.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/strsep.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/err_h/err.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/strlcpy.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/base64.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-misc.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/strnlen.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/usleep.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libressl.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/setproctitle.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/setresuid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/strmode.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/imsg.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/setresgid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/pipe2.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/entropy.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/res_hnok.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/dirname.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/defines.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/basename.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/res_randomid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/vis.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/seteuid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/paths_h/paths.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-waitpid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/sys/tree.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/sys/queue.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/errc.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/pidfile.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/SSL_CTX_use_certificate_chain_mem.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/strtonum.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/strndup.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/daemon.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/closefrom.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/getpeereid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/reallocarray.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/base64.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/imsg-buffer.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/setegid.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/fmt_scaled.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/fgetln.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/strerror.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/chacha_private.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/recallocarray.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/explicit_bzero.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/nanosleep.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/signal.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/freezero.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/strlcat.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/bsd-vis.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/event_asr_run.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/empty.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/entropy.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/inet_net_pton.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/getopt.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/progname.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/clock_gettime.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/crypt_checkpass.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/arc4random.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_utils.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/thread_private.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_compat.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnetnamadr_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_debug.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnetnamadr.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_query.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/sethostent.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_compat.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_init.c Examining data/opensmtpd-6.7.1p1/openbsd-compat/imsg.h Examining data/opensmtpd-6.7.1p1/openbsd-compat/includes.h Examining data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/lockspool.c Examining data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/pathnames.h Examining data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/mail.local.h Examining data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c Examining data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c Examining data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c Examining data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/pathnames.h Examining data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.h Examining data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c Examining data/opensmtpd-6.7.1p1/smtpscript/ssl.c Examining data/opensmtpd-6.7.1p1/smtpscript/iobuf.h Examining data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c Examining data/opensmtpd-6.7.1p1/smtpscript/iobuf.c Examining data/opensmtpd-6.7.1p1/smtpscript/smtpscript.h FINAL RESULTS: data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:87:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (readlink(lpath, buf, sizeof buf-1) != -1) { data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:88:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (readlink(lpath, buf, sizeof buf-1) != -1) { data/opensmtpd-6.7.1p1/smtpd/control.c:199:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(SMTPD_SOCKET, data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:280:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, mode) == -1) data/opensmtpd-6.7.1p1/smtpd/util.c:207:7: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(path, owner, group) == -1) { data/opensmtpd-6.7.1p1/smtpd/util.c:212:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, mode) == -1) { data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c:83:12: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if ((p = crypt(string, buffer)) == NULL) data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c:92:17: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. printf("%s\n", crypt(string, salt)); data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:100:25: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. if (!from && (!(from = getlogin()) || data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:356:3: [4] (shell) execl: 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. execl(_PATH_LOCKSPOOL, "lockspool", (char *)NULL); data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.c:46:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.c:62:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.c:76:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.c:91:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/opensmtpd-6.7.1p1/openbsd-compat/bsd-err.h:25:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, format "\n", ## args) data/opensmtpd-6.7.1p1/openbsd-compat/crypt_checkpass.c:23:6: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. c = crypt(pass, goodhash); data/opensmtpd-6.7.1p1/openbsd-compat/errc.c:39:23: [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. (void)vfprintf(stderr, fmt, ap); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:281:45: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define PRINTOPT(flag, n) if (o & (flag)) { fprintf(f, " " n); o &= ~(flag); } data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:327:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(_asr_debug, __VA_ARGS__); \ data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:156: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, const char *, ...); data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:184: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-6.7.1p1/openbsd-compat/setproctitle.c:147:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. r = vsnprintf(buf + len, sizeof(buf) - len , fmt, ap); data/opensmtpd-6.7.1p1/smtpd/enqueue.c:272:15: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. if ((user = getlogin()) != NULL && *user != '\0') { data/opensmtpd-6.7.1p1/smtpd/enqueue.c:520:6: [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. if (vfprintf(fp, fmt, ap) >= 0) data/opensmtpd-6.7.1p1/smtpd/enqueue.c:527:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/opensmtpd-6.7.1p1/smtpd/envelope.c:60:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ret = vsnprintf(e->errorline, sizeof(e->errorline), fmt, ap); data/opensmtpd-6.7.1p1/smtpd/ioev.c:104: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-6.7.1p1/smtpd/ioev.h:62: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. __attribute__((__format__ (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/lka_filter.c:1306:51: [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 *, ...) __attribute__((__format__ (printf, 5, 6))); data/opensmtpd-6.7.1p1/smtpd/lka_session.c:549:10: [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. (void)snprintf(ep->mda_exec, sizeof(ep->mda_exec), data/opensmtpd-6.7.1p1/smtpd/log.c:38:33: [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-6.7.1p1/smtpd/log.c:40:33: [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-6.7.1p1/smtpd/log.c:42:33: [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-6.7.1p1/smtpd/log.c:44:33: [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-6.7.1p1/smtpd/log.c:46:33: [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-6.7.1p1/smtpd/log.c:48:33: [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, 0))); data/opensmtpd-6.7.1p1/smtpd/log.c:50:33: [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-6.7.1p1/smtpd/log.c:52:33: [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-6.7.1p1/smtpd/log.c:107: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-6.7.1p1/smtpd/log.c:110: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-6.7.1p1/smtpd/log.c:187:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(s, sizeof(s), emsg, ap); data/opensmtpd-6.7.1p1/smtpd/log.h:36:33: [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-6.7.1p1/smtpd/log.h:38:33: [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-6.7.1p1/smtpd/log.h:40:33: [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-6.7.1p1/smtpd/log.h:42:33: [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-6.7.1p1/smtpd/log.h:44:33: [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-6.7.1p1/smtpd/log.h:46:33: [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, 0))); data/opensmtpd-6.7.1p1/smtpd/log.h:48:33: [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-6.7.1p1/smtpd/log.h:50:33: [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-6.7.1p1/smtpd/mail.mda.c:61:13: [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. if ((ret = system(argv[0])) == -1) data/opensmtpd-6.7.1p1/smtpd/makemap.c:184:3: [4] (shell) execl: 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. execl(PATH_MAKEMAP, "makemap", "-d", argv[0], "-o", dbname, data/opensmtpd-6.7.1p1/smtpd/mda_mbox.c:65:2: [4] (shell) execle: 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. execle(PATH_MAILLOCAL, PATH_MAILLOCAL, "-f", data/opensmtpd-6.7.1p1/smtpd/mda_unpriv.c:104:2: [4] (shell) execle: 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. execle("/bin/sh", "/bin/sh", "-c", mda_command, (char *)NULL, data/opensmtpd-6.7.1p1/smtpd/mproc.c:66: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-6.7.1p1/smtpd/parser.c:253:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(" msgid:%08"PRIx32, argv[i].u.u_msgid); data/opensmtpd-6.7.1p1/smtpd/parser.c:256:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(" evpid:%016"PRIx64, argv[i].u.u_evpid); data/opensmtpd-6.7.1p1/smtpd/parser.c:259:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(" routeid:%016"PRIx64, argv[i].u.u_routeid); data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:347:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(msgid_str, sizeof msgid_str, "%08" PRIx32, msgid); data/opensmtpd-6.7.1p1/smtpd/smtp_client.c:98: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-6.7.1p1/smtpd/smtp_session.c:225: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. __attribute__((__format__ (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:227: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. __attribute__((__format__ (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2115:6: [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. n = vsnprintf(buf, sizeof buf, fmt, ap); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:3002:8: [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. len = vfprintf(tx->ofile, fmt, ap); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:969:2: [4] (shell) execl: 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. execl(PATH_ENCRYPT, "encrypt", "--", p, (char *)NULL); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1341:10: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. key = getpass("key> "); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1362:3: [4] (shell) execl: 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. execl(PATH_GZCAT, gzcat_argv0, (char *)NULL); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1364:3: [4] (shell) execl: 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. execl(PATH_CAT, "cat", (char *)NULL); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:719:16: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. password = getpass("queue key: "); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:917:2: [4] (shell) execvp: 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. execvp(argv[0], argv); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1226: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(path, sizeof(path), PATH_LIBEXEC "/%s-%s", key, name) >= data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1252:3: [4] (shell) execl: 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. execl(path, procname, arg, (char *)NULL); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1452:6: [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. if (system(exec) == -1) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1792:3: [4] (shell) execvp: 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. execvp(PATH_SMTPCTL, args.list); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:2280:18: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if ((ep = crypt(password, pw->sp_pwdp)) == NULL) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:2307:18: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if ((ep = crypt(password, pw->pw_passwd)) == NULL) data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1439:59: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void logit(int, const char *, ...) __attribute__((format (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1727:24: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1729:25: [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, 3, 4))); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1749: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. __attribute__((__format__ (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1757: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. __attribute__((__format__ (printf, 2, 3))); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1770: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-6.7.1p1/smtpd/ssl.c:169:9: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. pass = getpass((const char *)u); data/opensmtpd-6.7.1p1/smtpd/table.c:211:15: [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 ((size_t)snprintf(path, sizeof(path), PATH_LIBEXEC"/table-%s", data/opensmtpd-6.7.1p1/smtpd/util.c:179:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ret = vsnprintf(str, size, format, ap); data/opensmtpd-6.7.1p1/smtpd/util.c:746:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, MAILNAME_FILE " entry too long"); data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:69: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, "lLdf:r:")) != -1) data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:79:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("ASR_DEBUG")) data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:746:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((e = getenv("RES_OPTIONS")) != NULL) { data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:754:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((e = getenv("LOCALDOMAIN")) != NULL) { data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:59:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *realpath(const char *path, char *resolved); data/opensmtpd-6.7.1p1/smtpd/ca.c:95:6: [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(PATH_CHROOT) == -1) data/opensmtpd-6.7.1p1/smtpd/control.c:224:6: [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(PATH_CHROOT) == -1) data/opensmtpd-6.7.1p1/smtpd/enqueue.c:207: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, data/opensmtpd-6.7.1p1/smtpd/ioev.c:243: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-6.7.1p1/smtpd/mail.lmtp.c:68: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. session.mailfrom = getenv("SENDER"); data/opensmtpd-6.7.1p1/smtpd/mail.lmtp.c:71: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, "d:l:f:ru")) != -1) { data/opensmtpd-6.7.1p1/smtpd/mail.lmtp.c:84: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. session.rcptto = getenv("RECIPIENT"); data/opensmtpd-6.7.1p1/smtpd/mail.lmtp.c:88: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. session.rcptto = getenv("USER"); data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:56: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, "j")) != -1) { data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:143:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = getenv("HOME")) == NULL) data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:160:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((extension = getenv("EXTENSION")) != NULL) { data/opensmtpd-6.7.1p1/smtpd/mail.mboxfile.c:46: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, "f:")) != -1) { data/opensmtpd-6.7.1p1/smtpd/mail.mda.c:44: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-6.7.1p1/smtpd/makemap.c:120: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, opts)) != -1) { data/opensmtpd-6.7.1p1/smtpd/pony.c:171:6: [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(PATH_CHROOT) == -1) data/opensmtpd-6.7.1p1/smtpd/queue.c:639:6: [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(PATH_SPOOL) == -1) data/opensmtpd-6.7.1p1/smtpd/scheduler.c:447:6: [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(PATH_CHROOT) == -1) data/opensmtpd-6.7.1p1/smtpd/smtpc.c:96: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, "CF:H:S:hns:v")) != -1) { data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:787: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(PATH_SPOOL) == -1 || chdir("/") == -1) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:557:14: [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 ((c = getopt(argc, argv, "B:dD:hnP:f:FT:vx:")) != -1) { data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1304:8: [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(PATH_SPOOL PATH_PURGE) == -1) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1356:67: [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. fork_filter_process(name, fp->command, fp->user, fp->group, fp->chroot, fp->filter_subsystem); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1414: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(chroot_path) != 0 || chdir("/") != 0) data/opensmtpd-6.7.1p1/smtpd/smtpd.h:1077:22: [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. const char *chroot; data/opensmtpd-6.7.1p1/smtpd/util.c:557:6: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(path, buf) == NULL) data/opensmtpd-6.7.1p1/smtpd/util.c:560:6: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(userdir, homedir) == NULL) data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:78:5: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. } random; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:230:6: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. o.u.random.block = op; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:375: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, "d:rvt")) != -1) { data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:624:35: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. printf("=> random: %i\n", op->u.random.block->u.block.count); data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:732:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (op->u.random.block->u.block.count == 0) data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:737:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. i = arc4random_uniform(op->u.random.block->u.block.count); data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:738:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. for (o = op->u.random.block->u.block.start; i; i--, o = o->next) data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char salt[SALT_LEN+1]; data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[PASSWORD_LEN]; data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:49: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 lpath[PATH_MAX]; data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.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 buf[8*1024]; data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:96: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). if ((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL|O_EXLOCK, data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:106: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). (lfd = open(lpath, O_WRONLY|O_EXLOCK, 0)) != -1) { data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:129: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). if ((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL, data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char npath[PATH_MAX]; data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/locking.c:152: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(npath)) == -1) data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:50: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 lpath[PATH_MAX]; data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8*1024]; data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:97: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). if ((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL|O_EXLOCK, data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:107: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). (lfd = open(lpath, O_WRONLY|O_EXLOCK, 0)) != -1) { data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:130: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). if ((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL, data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:147:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char npath[PATH_MAX]; data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/locking.c:153: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(npath)) == -1) data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:123: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(tbuf)) == -1 || !(fp = fdopen(fd, "w+"))) data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:139: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(tbuf, line, len); data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:171:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char biffmsg[100], buf[8*1024], path[PATH_MAX]; data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:200: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). if ((mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY|O_EXLOCK, data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:229: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). if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, data/opensmtpd-6.7.1p1/openbsd-compat/arc4random.c:141: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-6.7.1p1/openbsd-compat/arc4random.c:158: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-6.7.1p1/openbsd-compat/basename.c:29: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 bname[MAXPATHLEN]; data/opensmtpd-6.7.1p1/openbsd-compat/basename.c:62: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(bname, startp, len); data/opensmtpd-6.7.1p1/openbsd-compat/chacha_private.h:53: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-6.7.1p1/openbsd-compat/chacha_private.h:54: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-6.7.1p1/openbsd-compat/closefrom.c:71: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-6.7.1p1/openbsd-compat/daemon.c:71:24: [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 (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { data/opensmtpd-6.7.1p1/openbsd-compat/defines.h:204:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sun_path[108]; /* path name (gag) */ data/opensmtpd-6.7.1p1/openbsd-compat/defines.h:383:29: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memmove(s1, s2, n) bcopy((s2), (s1), (n)) data/opensmtpd-6.7.1p1/openbsd-compat/dirname.c:31:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char dname[MAXPATHLEN]; data/opensmtpd-6.7.1p1/openbsd-compat/dirname.c:68: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(dname, path, len); data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c:75: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 * data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c:76:56: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c:79:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 dstr[3] = { '\\', '\\', '#' }; data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c:140: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. (void) memcpy(buf + len, ptr, s); data/opensmtpd-6.7.1p1/openbsd-compat/imsg-buffer.c:101: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-6.7.1p1/openbsd-compat/imsg-buffer.c:237: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-6.7.1p1/openbsd-compat/imsg.c:82: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-6.7.1p1/openbsd-compat/imsg.c:181:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(imsg->data, ibuf->r.rptr, datalen); data/opensmtpd-6.7.1p1/openbsd-compat/inet_net_pton.c:207:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255:255:255:255/128")]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:517:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:636:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], *ch; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:676:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:679: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). cf = fopen(path, "re"); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:705:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:706:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tok[10]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:738:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096], *e; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:839: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(lbuf, buf, len); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:70:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp2[256]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:141:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[256]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:174:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:231:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char h[256]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_debug.c:262:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:61:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char q_dname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:67:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rr_dname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:73: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 cname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:77: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 exchange[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:80: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 nsname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:83: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 ptrname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:86: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 mname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:87: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 rname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:131:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ac_dom[ASR_MAXDOM]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ac_db[ASR_MAXDB + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_private.h:228: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 addr[16]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c:120:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fqdn[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c:395: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). f = fopen(_PATH_HOSTS, "re"); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c:621:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tokens[MAXTOKEN], *c, buf[ASR_BUFSIZ + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c:668:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME], *c; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr.c:37: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 _entbuf[4096]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.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 *aliases[MAXALIASES + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *addrs[MAXADDRS + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:54:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *aliases[MAXALIASES + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAXDNAME], *data, addr[16], *c; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:256: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). if ((f = fopen(_PATH_HOSTS, "re")) == NULL) data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:406:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tokens[MAXTOKEN], addr[16], buf[ASR_BUFSIZ + 1]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.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 dname[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:552:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:579:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:654: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(n->pos, h->h.h_name, sz); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:665: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(n->pos, *ha, sz); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo.c:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo.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 scope[IF_NAMESIZE + 1], *ifname; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo_async.c:266:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char scope[IF_NAMESIZE + 1], *ifname; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnetnamadr.c:34: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 _entbuf[4096]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c:345: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(rdata->rdi_data, rr->rdata, rr->size); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c:379:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&resp->header, cp, HFIXEDSZ); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c:434:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c:481:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getrrsetbyname_async.c:532: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(curr->rdata, *cp, curr->size); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_init.c:68: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(&_res_ext.nsaddr_list[i], ac->ac_ns[i], data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_init.c:71: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(&_res.nsaddr_list[i], ac->ac_ns[i], data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.c:40:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fqdn[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.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 dn[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.c:98:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fqdn[MAXDNAME], ndom[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.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 fqdn[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.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 fqdn[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c:359:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXDNAME]; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c:440:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c:515:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:202: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 * fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags); data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:202:63: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags); data/opensmtpd-6.7.1p1/openbsd-compat/pidfile.c:70: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(pidfile_path, "w")) == NULL) { data/opensmtpd-6.7.1p1/openbsd-compat/recallocarray.c:75: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(newptr, ptr, oldsize); data/opensmtpd-6.7.1p1/openbsd-compat/recallocarray.c:78: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(newptr, ptr, newsize); data/opensmtpd-6.7.1p1/openbsd-compat/setproctitle.c:127:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], ptitle[1024]; data/opensmtpd-6.7.1p1/openbsd-compat/strndup.c:34: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(copy, str, len); data/opensmtpd-6.7.1p1/openbsd-compat/vis.c:168:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tbuf[5]; data/opensmtpd-6.7.1p1/openbsd-compat/vis.c:190: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(dst, tbuf, i); data/opensmtpd-6.7.1p1/smtpd/aliases.c:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTPD_MAXLOCALPARTSIZE]; data/opensmtpd-6.7.1p1/smtpd/aliases.c:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/aliases.c:104:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/aliases.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 tag[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/aliases.c:106:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char domain[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/aliases.c:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char delim[3] = { '\\', '#', '\0' }; data/opensmtpd-6.7.1p1/smtpd/aliases.c:221: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/opensmtpd-6.7.1p1/smtpd/bounce.c:131:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX], *line; data/opensmtpd-6.7.1p1/smtpd/bounce.c:323: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-6.7.1p1/smtpd/bounce.c:373:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/ca.c:422: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(to, toptr, tlen); data/opensmtpd-6.7.1p1/smtpd/cert.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *cert[MAX_CERTS]; data/opensmtpd-6.7.1p1/smtpd/cert.c:107: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 *cert_der[MAX_CERTS]; data/opensmtpd-6.7.1p1/smtpd/cert.c:202:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/compress_gzip.c:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ibuf[GZIP_BUFFER_SIZE]; data/opensmtpd-6.7.1p1/smtpd/compress_gzip.c:163:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obuf[GZIP_BUFFER_SIZE]; data/opensmtpd-6.7.1p1/smtpd/config.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 hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/config.c:188:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NI_MAXHOST + 5]; data/opensmtpd-6.7.1p1/smtpd/crypto.c:47: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 key[KEY_SIZE]; data/opensmtpd-6.7.1p1/smtpd/crypto.c:59:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp.key, key, sizeof cp.key); data/opensmtpd-6.7.1p1/smtpd/crypto.c:244: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(out + len, iv, sizeof iv); data/opensmtpd-6.7.1p1/smtpd/crypto.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(out + len, tag, sizeof tag); data/opensmtpd-6.7.1p1/smtpd/crypto.c:288: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(tag, in + inlen - sizeof tag, sizeof tag); data/opensmtpd-6.7.1p1/smtpd/crypto.c:299: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(iv, in, sizeof iv); data/opensmtpd-6.7.1p1/smtpd/crypto.c:342: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 encbuffer[4096]; data/opensmtpd-6.7.1p1/smtpd/crypto.c:344: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 decbuffer[4096]; data/opensmtpd-6.7.1p1/smtpd/crypto.c:372:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpin = fopen("/etc/passwd", "r"); data/opensmtpd-6.7.1p1/smtpd/crypto.c:373: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). fpout = fopen("/tmp/passwd.enc", "w"); data/opensmtpd-6.7.1p1/smtpd/crypto.c:387:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpin = fopen("/tmp/passwd.enc", "r"); data/opensmtpd-6.7.1p1/smtpd/crypto.c:388: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). fpout = fopen("/tmp/passwd.dec", "w"); data/opensmtpd-6.7.1p1/smtpd/dns.c:66:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/dns.c: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 buf[SMTPD_MAXDOMAINPARTSIZE]; data/opensmtpd-6.7.1p1/smtpd/dns.c:256:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/dns.c:305:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/dns.c:351:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostcopy[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:105: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 host[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:136:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINELEN]; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:290:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((fp = tmpfile()) == NULL) data/opensmtpd-6.7.1p1/smtpd/enqueue.c:879:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:890: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(buffer, "w")) == NULL) data/opensmtpd-6.7.1p1/smtpd/envelope.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 lbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/envelope.c:307: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(ss, &ssin6, sizeof(ssin6)); data/opensmtpd-6.7.1p1/smtpd/envelope.c:317: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(ss, &ssin6, sizeof(ssin6)); data/opensmtpd-6.7.1p1/smtpd/envelope.c:326: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(ss, &ssin, sizeof(ssin)); data/opensmtpd-6.7.1p1/smtpd/envelope.c:765:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192]; data/opensmtpd-6.7.1p1/smtpd/esc.c:100: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[6]; data/opensmtpd-6.7.1p1/smtpd/expand.c:199: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-6.7.1p1/smtpd/expand.c:244:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/expand.c:275: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[1024]; data/opensmtpd-6.7.1p1/smtpd/expand.c:278:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; data/opensmtpd-6.7.1p1/smtpd/filter.c:95: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 hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/filter.c:97: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 line[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/filter.c:740: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[1024]; data/opensmtpd-6.7.1p1/smtpd/filter.c:741:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1024]; data/opensmtpd-6.7.1p1/smtpd/filter.c:778: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[1024]; data/opensmtpd-6.7.1p1/smtpd/filter.c:793: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[1024]; data/opensmtpd-6.7.1p1/smtpd/filter.c:803: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[1024]; data/opensmtpd-6.7.1p1/smtpd/ioev.c:110: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-6.7.1p1/smtpd/ioev.c:111:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ssl[128]; data/opensmtpd-6.7.1p1/smtpd/ioev.c:136: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-6.7.1p1/smtpd/ioev.c:599: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-6.7.1p1/smtpd/ioev.c:629: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-6.7.1p1/smtpd/ioev.c:630:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/ioev.c:816: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-6.7.1p1/smtpd/lka.c:80:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/lka_filter.c:344:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; /* for traces */ data/opensmtpd-6.7.1p1/smtpd/lka_filter.c:615:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/lka_filter.c:1411:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char src[NI_MAXHOST + 5]; data/opensmtpd-6.7.1p1/smtpd/lka_filter.c:1412:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dest[NI_MAXHOST + 5]; data/opensmtpd-6.7.1p1/smtpd/lka_filter.c:1709:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/log.c:183: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 s[BUFSIZ]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:96:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rootpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:119:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char junkpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:120:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char extpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subdir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.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 filename[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:123:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:126:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:185: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(tmp, O_CREAT | O_EXCL | O_WRONLY, 0600); data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:243:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/mail.mboxfile.c:81:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_CREAT | O_APPEND | O_WRONLY | O_EXLOCK, 0600); data/opensmtpd-6.7.1p1/smtpd/mailaddr.c:40: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-6.7.1p1/smtpd/mailaddr.c:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/makemap.c:94:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dbname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/makemap.c:215: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(dbname)) == -1) data/opensmtpd-6.7.1p1/smtpd/makemap.c:281: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). fp = fopen(filename, "r"); data/opensmtpd-6.7.1p1/smtpd/mda.c:79:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LOGIN_NAME_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda.c:80:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char usertable[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda.c:135:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out[256], buf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda.c:675:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rcpt[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda.c:795: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mda.c:806:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda_mbox.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sender[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda_mbox.c:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/mda_mbox.c:83: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(buffer, O_CREAT|O_EXCL, 0)) == -1) { data/opensmtpd-6.7.1p1/smtpd/mda_unpriv.c:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *mda_environ[11]; data/opensmtpd-6.7.1p1/smtpd/mda_unpriv.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 mda_exec[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda_unpriv.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_wrapper[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rtoken[MAXTOKENLEN]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:66:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:253:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpbuf[EXPAND_BUFFER], *ptmp, *pbuf, *ebuf; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:254:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exptok[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:256:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[MAXTOKENLEN]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:306: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(token, pbuf+2, ebuf-pbuf-1); data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:320: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(ptmp, exptok, exptoklen); data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:337:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/mproc.c:377:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/mproc.c:501:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[sizeof(*evp)]; data/opensmtpd-6.7.1p1/smtpd/mta.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 name[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mta.c:171:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta.c:202:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta.c:626:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta.c:1384:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/mta.c:1851: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mta.c:1852:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32]; data/opensmtpd-6.7.1p1/smtpd/mta.c:1937:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], flags[1024], dur[64]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2155: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2287: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2351: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2458: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[1024]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2589:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2608:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mta.c:2624:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/mta_session.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 replybuf[2048]; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:574:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ibuf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:575:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obuf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:902:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:1480:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char relay[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:1734: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-6.7.1p1/smtpd/parser.c:61:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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, *str, *argv[ARGVMAX], **ap; data/opensmtpd-6.7.1p1/smtpd/proxy.c:184: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((uint8_t *) &s->hdr + s->header_len, buf, off); data/opensmtpd-6.7.1p1/smtpd/proxy.c:204: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((uint8_t *) &s->addr + s->addr_len, buf, off); data/opensmtpd-6.7.1p1/smtpd/proxy.c:365: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(sin6->sin6_addr.s6_addr, s->addr.ipv6.src_addr, data/opensmtpd-6.7.1p1/smtpd/proxy.c:379: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(sun->sun_path, s->addr.un.src_addr, sun_len); data/opensmtpd-6.7.1p1/smtpd/queue.c:733:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rcpt[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:191:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:225:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:226:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmppath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:236: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). ifp = fopen(msgpath, "r"); data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:237: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). ofp = fopen(tmppath, "w+"); data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:258: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). ifp = fopen(msgpath, "r"); data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:259: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). ofp = fopen(tmppath, "w+"); data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:378:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/queue_backend.c:382: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). return open(buf, O_RDWR | O_CREAT | O_EXCL, 0600); data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:391:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char compbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:393:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char encbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:426:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char compbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:428:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char encbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:501:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char evpbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:556:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char evpbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:597:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char evpbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:622:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char evpbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_backend.c:662:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char evpbuf[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:84:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rootdir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char incomingdir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:126:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char queuedir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:127:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgdir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgpath[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:180:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/queue_fs.c:187: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(path, O_RDONLY)) == -1) { data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/queue_fs.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 path[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:258:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:264: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(pathname, "r"); data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:288:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dest[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:298:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:325:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/queue_fs.c:326:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgid_str[9]; data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:499: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(path, O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) { data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:568:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/queue_fs.c:656:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/queue_proc.c:151:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY); data/opensmtpd-6.7.1p1/smtpd/queue_ram.c:105:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "rb"); data/opensmtpd-6.7.1p1/smtpd/rfc5322.c:159: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. (void)memcpy(parser->hdr.buf, line, len); data/opensmtpd-6.7.1p1/smtpd/scheduler_ramqueue.c:1109: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-6.7.1p1/smtpd/scheduler_ramqueue.c:1110:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/smtp_client.c:114: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 *strstate[STATE_LAST] = { data/opensmtpd-6.7.1p1/smtpd/smtp_client.c:259:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ibuf[LINE_MAX], obuf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rdns[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char smtpname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:153:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char helo[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:154:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmd[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:155:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char username[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:331:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char copy[APPEND_DOMAIN_BUFFER_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:402:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, copy, len); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:414:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char copy[APPEND_DOMAIN_BUFFER_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:482:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, copy, len); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:491:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[APPEND_DOMAIN_BUFFER_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:693:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fwd[64], rev[64]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:724:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:725:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1541:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1812:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1846:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1940:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], *user, *pass; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2000:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX*2], tmp[LINE_MAX*2]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2461:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2542:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTP_LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:3020: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-6.7.1p1/smtpd/smtp_session.c:3118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mailaddr[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:3137:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mailaddr[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpc.c:70:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[256]; data/opensmtpd-6.7.1p1/smtpd/smtpc.c:290:17: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((mail.fp = tmpfile()) == NULL) data/opensmtpd-6.7.1p1/smtpd/smtpc.c:318:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[256]; data/opensmtpd-6.7.1p1/smtpd/smtpc.c:319:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[16]; data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:166:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/smtpctl.c:174: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 || (fp = fdopen(fd, "w+")) == NULL) { data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:725:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/smtpctl.c:751:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char status[128], runstate[128], errline[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1280:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[sizeof(struct envelope)]; data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1293: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(pathname, "r"); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1330: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(s, "r")) == NULL) data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1337:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((ofp = tmpfile()) == NULL) data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1417: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(&magic, buffer, sizeof magic); data/opensmtpd-6.7.1p1/smtpd/smtpd-api.h:27:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/smtpd-api.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 domain[SMTPD_MAXDOMAINPARTSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd-api.h:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/smtpd.c:872:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[SMTPD_MAXARG]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1213:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/smtpd.c:1214:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/smtpd.c:1368:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exec[_POSIX_ARG_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1462:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ebuf[128], sfn[32]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1538:11: [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). allout = mkstemp(sfn); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1618:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_argv[2]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1704: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 *envp[2], *p = NULL, *tmp; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1715: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). if ((fd = open(path, O_RDONLY|O_NOFOLLOW|O_NONBLOCK)) == -1) { data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1843:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1865: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(pathname, O_RDONLY|O_NOFOLLOW|O_NONBLOCK); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1923: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 key[STAT_KEY_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:2017: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-6.7.1p1/smtpd/smtpd.c:2199:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LOGIN_NAME_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.c:2200:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pass[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h: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 username[SMTPD_VUSERNAME_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h: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 directory[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h: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 hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:154:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char authlabel[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h: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 username[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h: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 password[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:163:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:172:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:185:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char relayhost[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:388:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_name[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:390:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_config[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:402: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). int (*open)(struct table *); data/opensmtpd-6.7.1p1/smtpd/smtpd.h:473: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 user[SMTPD_MAXLOCALPARTSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:474: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 buffer[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:477:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subaddress[SMTPD_SUBADDRESS_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:508:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dispatcher[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:510:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tag[SMTPD_TAG_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:516:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char smtpname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:517:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char helo[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:518:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:519:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char username[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:520:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errorline[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:527:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_user[SMTPD_VUSERNAME_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:528:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_subaddress[SMTPD_SUBADDRESS_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:529:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_exec[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:544:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dsn_envid[DSN_ENVID_LEN+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:559:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_name[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:560:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pki_name[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:561:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ca_name[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:562:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tag[SMTPD_TAG_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:563:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char authtable[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:565:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostnametable[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:566:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sendertable[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:574:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sc_conffile[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:620:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sc_hostname[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:679:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user[SMTPD_VUSERNAME_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:682:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directory[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:686:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dispatcher[EXPAND_BUFFER]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:692:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_subaddress[SMTPD_SUBADDRESS_SIZE]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:693:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mda_exec[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:882:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dsn_envid[DSN_ENVID_LEN+1]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:886:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char status[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/smtpd.h:963:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[STAT_KEY_SIZE]; data/opensmtpd-6.7.1p1/smtpd/spfwalk.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 buf[4096]; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:166:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[512]; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:167:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:274:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/spfwalk.c:295:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:313:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/opensmtpd-6.7.1p1/smtpd/srs.c:95:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char md[SHA_DIGEST_LENGTH]; data/opensmtpd-6.7.1p1/smtpd/srs.c:107: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 dest[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:108:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:109:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char md[SHA_DIGEST_LENGTH*4+1]; data/opensmtpd-6.7.1p1/smtpd/srs.c:145: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 dest[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:147:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char md[SHA_DIGEST_LENGTH*4+1]; data/opensmtpd-6.7.1p1/smtpd/srs.c:177: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 dest[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:178:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:179:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char md[SHA_DIGEST_LENGTH*4+1]; data/opensmtpd-6.7.1p1/smtpd/srs.c:226: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 dest[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:227:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char md[SHA_DIGEST_LENGTH*4+1]; data/opensmtpd-6.7.1p1/smtpd/srs.c:294: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 dest[SMTPD_MAXMAILADDRSIZE]; data/opensmtpd-6.7.1p1/smtpd/srs.c:295:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char md[SHA_DIGEST_LENGTH*4+1]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:111:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[12]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:113: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(name, O_RDONLY)) == -1) data/opensmtpd-6.7.1p1/smtpd/ssl.c:191:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[12]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:192:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[2048]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:200: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(name, "r")) == NULL) data/opensmtpd-6.7.1p1/smtpd/ssl.c:240:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, data, size); data/opensmtpd-6.7.1p1/smtpd/ssl.c:317:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pass[1024]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:337: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-6.7.1p1/smtpd/ssl.c:351:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[128]; data/opensmtpd-6.7.1p1/smtpd/ssl.c:397: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(exdata, data, datalen); data/opensmtpd-6.7.1p1/smtpd/ssl.h:22:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pki_name[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/ssl.h:38:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ca_name[HOST_NAME_MAX+1]; data/opensmtpd-6.7.1p1/smtpd/stat_ramstat.c:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[STAT_KEY_SIZE]; data/opensmtpd-6.7.1p1/smtpd/table.c:123:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lkey[1024], *buf = NULL; data/opensmtpd-6.7.1p1/smtpd/table.c:203:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/table.c:288:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/table.c:343:24: [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). return (t->t_backend->open(t)); data/opensmtpd-6.7.1p1/smtpd/table.c:526:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], *p; data/opensmtpd-6.7.1p1/smtpd/table_db.c:87:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/table_db.c:268:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pkey[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/table_static.c: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 lkey[1024]; data/opensmtpd-6.7.1p1/smtpd/table_static.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(path, "r")) == NULL) { data/opensmtpd-6.7.1p1/smtpd/to.c:66: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-6.7.1p1/smtpd/to.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 buffer[LINE_MAX]; data/opensmtpd-6.7.1p1/smtpd/to.c:142: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-6.7.1p1/smtpd/to.c:156: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-6.7.1p1/smtpd/to.c:196: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-6.7.1p1/smtpd/to.c:233: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-6.7.1p1/smtpd/to.c:234:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/to.c:283:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[NI_MAXHOST]; data/opensmtpd-6.7.1p1/smtpd/to.c:296: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(&ss, &ssin, sizeof(ssin)); data/opensmtpd-6.7.1p1/smtpd/to.c:326: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(&ss, &ssin6, sizeof(ssin6)); data/opensmtpd-6.7.1p1/smtpd/to.c:359:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/to.c:482: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[4096]; data/opensmtpd-6.7.1p1/smtpd/to.c:576:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/to.c:625:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/to.c:855:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255:255:255:255/128")]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h: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 q_dname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.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 rr_dname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:55: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 cname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:59: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 exchange[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:62: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 nsname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:65: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 ptrname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:68: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 mname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/unpack_dns.h:69: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 rname[MAXDNAME]; data/opensmtpd-6.7.1p1/smtpd/util.c:191:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode_str[12]; data/opensmtpd-6.7.1p1/smtpd/util.c:255:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *path_argv[2]; data/opensmtpd-6.7.1p1/smtpd/util.c:306:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/opensmtpd-6.7.1p1/smtpd/util.c:336:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-6.7.1p1/smtpd/util.c:345: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-6.7.1p1/smtpd/util.c:454:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *c, domain[SMTPD_MAXDOMAINPARTSIZE]; data/opensmtpd-6.7.1p1/smtpd/util.c:552:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/util.c:553:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char homedir[PATH_MAX]; data/opensmtpd-6.7.1p1/smtpd/util.c:736: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(MAILNAME_FILE, "r")) == NULL) data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:381:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rundelay = atoi(optarg) * 1000; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:585: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[8192 + 3]; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:586:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:698:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], *servname, *line; data/opensmtpd-6.7.1p1/smtpscript/ssl.c:74:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[128]; data/opensmtpd-6.7.1p1/contrib/libexec/encrypt/encrypt.c:85: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). if (strncmp(p, buffer, strlen(buffer)) != 0) data/opensmtpd-6.7.1p1/contrib/libexec/lockspool/lockspool.c:103:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(STDIN_FILENO, &c, 1); data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:258:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nr = read(fd, buf, sizeof(buf))) > 0) data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:324: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(msg) + 1; /* XXX */ data/opensmtpd-6.7.1p1/contrib/libexec/mail.local/mail.local.c:367:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(lockfd, &ch, 1) != 1 || ch != '1') { data/opensmtpd-6.7.1p1/openbsd-compat/basename.c:41: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). endp = path + strlen(path) - 1; data/opensmtpd-6.7.1p1/openbsd-compat/closefrom.c:33: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-6.7.1p1/openbsd-compat/crypt_checkpass.c:20: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(goodhash) == 0 && strlen(pass) == 0) data/opensmtpd-6.7.1p1/openbsd-compat/crypt_checkpass.c:20: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 (strlen(goodhash) == 0 && strlen(pass) == 0) data/opensmtpd-6.7.1p1/openbsd-compat/dirname.c:43: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). endp = path + strlen(path) - 1; data/opensmtpd-6.7.1p1/openbsd-compat/fgetln.c:44:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fp)) != EOF) { data/opensmtpd-6.7.1p1/openbsd-compat/fparseln.c:173: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(buf); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:436: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). else if ((len = strlen(domain)) == 0) data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:441: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(name); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr.c:457: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). return (strlen(buf)); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/asr_utils.c:394: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). return (pack_data(p, dname, strlen(dname) + 1)); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getaddrinfo_async.c:701: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:560: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:566: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). n = strlen(name) + 1; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:590: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). buf[strlen(buf)-1] = '\0'; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:596: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). n = strlen(name) + 1; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:653: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(h->h.h_name) + 1; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/gethostnamadr_async.c:664: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). sz = strlen(*ha) + 1; data/opensmtpd-6.7.1p1/openbsd-compat/libasr/getnameinfo.c:91: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). s += strlen(scope); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_init.c:96: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). ac->ac_dbcount = strlen(ac->ac_db); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.c:47: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). if (dname[0] == '\0' || dname[strlen(dname) - 1] != '.') { data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_mkquery.c:102: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). if (domain && ((n = strlen(domain)) == 0 || domain[n - 1 ] != '.')) { data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.c:262: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(name) && name[strlen(name) - 1] == '.') { data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.c:262:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) && name[strlen(name) - 1] == '.') { data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.c:287: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). return (strlen(buf)); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_search_async.c:318: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). return (strlen(buf)); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c:611:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(as->as_fd, pos, len); data/opensmtpd-6.7.1p1/openbsd-compat/libasr/res_send_async.c:647:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(as->as_fd, pos, len); data/opensmtpd-6.7.1p1/openbsd-compat/openbsd-compat.h:334:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. int usleep(unsigned int useconds); data/opensmtpd-6.7.1p1/openbsd-compat/setproctitle.c:101: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). lastargv = argv[i] + strlen(argv[i]); data/opensmtpd-6.7.1p1/openbsd-compat/setproctitle.c:105: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). lastargv = envp[i] + strlen(envp[i]); data/opensmtpd-6.7.1p1/openbsd-compat/setproctitle.c:157:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0); data/opensmtpd-6.7.1p1/openbsd-compat/strlcat.c:48: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)); data/opensmtpd-6.7.1p1/openbsd-compat/usleep.c:36:1: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(unsigned int useconds) data/opensmtpd-6.7.1p1/smtpd/bounce.c:187: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(line) > 4 && (*line == '1' || *line == '6')) data/opensmtpd-6.7.1p1/smtpd/control.c:192:14: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). old_umask = umask(S_IXUSR|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH); data/opensmtpd-6.7.1p1/smtpd/control.c:194:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(old_umask); data/opensmtpd-6.7.1p1/smtpd/control.c:197:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(old_umask); data/opensmtpd-6.7.1p1/smtpd/control.c:746: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(imsg->data); data/opensmtpd-6.7.1p1/smtpd/crypto.c:336: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). if (!crypto_setup(argv[1], strlen(argv[1]))) { data/opensmtpd-6.7.1p1/smtpd/crypto.c:348: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). enclen = crypto_encrypt_buffer(argv[2], strlen(argv[2]), data/opensmtpd-6.7.1p1/smtpd/dict.c:55: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-6.7.1p1/smtpd/dns.c:286: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/dns.c:327: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:339: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). envid_sz = strlen(msg.dsn_envid); data/opensmtpd-6.7.1p1/smtpd/enqueue.c:543: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). if (fake_from[strlen(fake_from) - 1] != '>') data/opensmtpd-6.7.1p1/smtpd/enqueue.c:545: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). fake_from[strlen(fake_from) - 1] = 0; data/opensmtpd-6.7.1p1/smtpd/enqueue.c:613: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). if ((size_t)len > strlen(keywords[i].word) && data/opensmtpd-6.7.1p1/smtpd/enqueue.c:615: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(keywords[i].word))) data/opensmtpd-6.7.1p1/smtpd/enqueue.c:757: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(in) > 0 && strchr(in, '@') == NULL) { data/opensmtpd-6.7.1p1/smtpd/enqueue.c:855:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = fgetc(ifile)) != EOF) { data/opensmtpd-6.7.1p1/smtpd/envelope.c:312: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). else if (buf[0] == '[' && buf[strlen(buf)-1] == ']') { data/opensmtpd-6.7.1p1/smtpd/envelope.c:313: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). buf[strlen(buf)-1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/iobuf.c:209: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-6.7.1p1/smtpd/ioev.c:451:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return io_write(io, s, strlen(s)); data/opensmtpd-6.7.1p1/smtpd/ioev.c:700:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). goto read; data/opensmtpd-6.7.1p1/smtpd/ioev.c:714:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read: data/opensmtpd-6.7.1p1/smtpd/mail.maildir.c:255: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(path) >= sizeof buf) { data/opensmtpd-6.7.1p1/smtpd/makemap.c:348: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). key.size = strlen(keyp) + 1; data/opensmtpd-6.7.1p1/smtpd/makemap.c:350: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). xlowercase(key.data, key.data, strlen(key.data) + 1); data/opensmtpd-6.7.1p1/smtpd/makemap.c:395: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). val.size = strlen(val.data) + 1; data/opensmtpd-6.7.1p1/smtpd/makemap.c:399: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). key.size = strlen(keyp) + 1; data/opensmtpd-6.7.1p1/smtpd/makemap.c:400: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). xlowercase(key.data, key.data, strlen(key.data) + 1); data/opensmtpd-6.7.1p1/smtpd/makemap.c:420: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). val->size = strlen(text) + 1; data/opensmtpd-6.7.1p1/smtpd/makemap.c:448: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). val->size = strlen(origtext) + 1; data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:202:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; (size_t)i < strlen(tmp); ++i) data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:207: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). i = strlen(string); data/opensmtpd-6.7.1p1/smtpd/mda_variables.c:368: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). for (i = 0; i <= strlen(at); ++i) data/opensmtpd-6.7.1p1/smtpd/mproc.c:454: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). m_add(m, v, strlen(v) + 1); data/opensmtpd-6.7.1p1/smtpd/mproc.c:643: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 (!envelope_load_buffer(evp, buf, strlen(buf))) data/opensmtpd-6.7.1p1/smtpd/mta.c:362:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf, strlen(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta.c:393:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf, strlen(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta.c:409:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf, strlen(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta.c:456: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). imsg->hdr.peerid, 0, -1, buf, strlen(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta.c:1972:57: [1] (buffer) strlen: Does not handle 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_compose(p, IMSG_CTL_MTA_SHOW_RELAYS, id, 0, -1, buf, strlen(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta.c:2019: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(buf) + 1); data/opensmtpd-6.7.1p1/smtpd/mta_session.c:690: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). base64_encode((unsigned char *)ibuf + 1, strlen(ibuf + 1), obuf, sizeof obuf); data/opensmtpd-6.7.1p1/smtpd/mta_session.c:706: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). offset = strlen(ibuf+1)+2; data/opensmtpd-6.7.1p1/smtpd/mta_session.c:708:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). base64_encode((unsigned char *)ibuf + offset, strlen(ibuf + offset), obuf, sizeof obuf); data/opensmtpd-6.7.1p1/smtpd/mta_session.c:788: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). envid_sz = strlen(e->dsn_envid); data/opensmtpd-6.7.1p1/smtpd/mta_session.c:915: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(line) > 4) { data/opensmtpd-6.7.1p1/smtpd/mta_session.c:1751: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(buf); data/opensmtpd-6.7.1p1/smtpd/parser.c:144: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(str) != 8) data/opensmtpd-6.7.1p1/smtpd/parser.c:152: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(str) != 16) data/opensmtpd-6.7.1p1/smtpd/queue.c:650: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). if (!crypto_setup(env->sc_queue_key, strlen(env->sc_queue_key))) data/opensmtpd-6.7.1p1/smtpd/queue_fs.c:355: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(dp->d_name) != 16 || data/opensmtpd-6.7.1p1/smtpd/rfc5322.c:258: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(s); data/opensmtpd-6.7.1p1/smtpd/smtp_client.c:359: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(proto->params.auth_user), obuf, data/opensmtpd-6.7.1p1/smtpd/smtp_client.c:372: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(proto->params.auth_pass), obuf, data/opensmtpd-6.7.1p1/smtpd/smtp_client.c:801: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(line); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:475: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). address_len = strlen(address); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:476: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(buffer) - (insert_end - insert_beg) + address_len >= len) data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:508: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). linelen = strlen(line); data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:524: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). if (!skip && j + strlen(tx->session->listener->hostname) + 1 < sizeof buffer) { data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:574: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). if (j + strlen(tx->session->listener->hostname) + 1 < sizeof buffer) { data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:1153: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->tx->datain += strlen(line) + 1; data/opensmtpd-6.7.1p1/smtpd/smtp_session.c:2250:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(maddr->user, p, strlen(p) + 1); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:302: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). envelope_load_buffer(evp, str, strlen(str)); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:956: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). srv_send(IMSG_CTL_UPDATE_TABLE, name, strlen(name) + 1); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:981: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). sizeof(argv[0].u.u_ss) + strlen(argv[1].u.u_str) + 1); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:984:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (imsg_add(m, argv[1].u.u_str, strlen(argv[1].u.u_str) + 1) == -1) data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1000: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). sizeof(argv[0].u.u_ss) + strlen(argv[1].u.u_str) + 1); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1003:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (imsg_add(m, argv[1].u.u_str, strlen(argv[1].u.u_str) + 1) == -1) data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1187: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). srv_send(IMSG_CTL_UPDATE_TABLE, "aliases", strlen("aliases") + 1); data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1227: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). status[strlen(status) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/smtpctl.c:1342: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). if (crypto_setup(key, strlen(key))) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:683: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(env->sc_queue_key)) == 0) { data/opensmtpd-6.7.1p1/smtpd/smtpd.c:724: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). explicit_bzero(password, strlen(password)); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:782:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). 0, -1, env->sc_queue_key, strlen(env->sc_queue_key) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1450:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(STDERR_FILENO, &buf, 1) != 0) data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1812: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). q = malloc(sizeof(*q) + strlen(path) + 1); data/opensmtpd-6.7.1p1/smtpd/smtpd.c:1818: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). memmove(q->path, path, strlen(path) + 1); data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:189: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). end = *ap + strlen(*ap)-1; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:220: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). buf2[strlen(buf2) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:254: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). buf2[strlen(buf2) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:281: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:282: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). if (buf[strlen(buf) - 1] == '.') data/opensmtpd-6.7.1p1/smtpd/spfwalk.c:283: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). buf[strlen(buf) - 1] = '\0'; data/opensmtpd-6.7.1p1/smtpd/srs.c:98: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). SHA1_Update(&c, key, strlen(key)); data/opensmtpd-6.7.1p1/smtpd/srs.c:99: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). SHA1_Update(&c, value, strlen(value)); data/opensmtpd-6.7.1p1/smtpd/srs.c:195: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(tmp) < 5) data/opensmtpd-6.7.1p1/smtpd/srs.c:235: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(rcpt) < 5) data/opensmtpd-6.7.1p1/smtpd/srs.c:254: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(rcpt) < 3) data/opensmtpd-6.7.1p1/smtpd/srs.c:303: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(rcpt) < 5) data/opensmtpd-6.7.1p1/smtpd/srs.c:340: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) < 6) data/opensmtpd-6.7.1p1/smtpd/srs.c:345: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) < 3) data/opensmtpd-6.7.1p1/smtpd/ssl.c:132:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buf, size) != size) data/opensmtpd-6.7.1p1/smtpd/ssl.c:172: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(pass); data/opensmtpd-6.7.1p1/smtpd/ssl.c:288: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). pkinamelen = strlen(pkiname) + 1; data/opensmtpd-6.7.1p1/smtpd/ssl_verify.c:89: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). if (domain == NULL || strlen(domain) == 1) data/opensmtpd-6.7.1p1/smtpd/ssl_verify.c:154:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len < 0 || (size_t)len != strlen(data)) { data/opensmtpd-6.7.1p1/smtpd/ssl_verify.c:251: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). (size_t)common_name_len != strlen(common_name)) { data/opensmtpd-6.7.1p1/smtpd/table.c:529: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(line); data/opensmtpd-6.7.1p1/smtpd/table_db.c:274: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). dbk.size = strlen(pkey) + 1; data/opensmtpd-6.7.1p1/smtpd/table_proc.c:198: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). sizeof(s) + strlen(k) + 1); data/opensmtpd-6.7.1p1/smtpd/table_proc.c:206: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). if (imsg_add(buf, k, strlen(k) + 1) == -1) data/opensmtpd-6.7.1p1/smtpd/to.c:370: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(schemas[i].name)) == 0) data/opensmtpd-6.7.1p1/smtpd/to.c:383: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). p = buffer + strlen(schemas[i].name); data/opensmtpd-6.7.1p1/smtpd/to.c:660: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). l = strlen(s); data/opensmtpd-6.7.1p1/smtpd/to.c:704: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). v = strlen(alias->u.buffer); data/opensmtpd-6.7.1p1/smtpd/to.c:835: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(alias->u.buffer) < 5) data/opensmtpd-6.7.1p1/smtpd/util.c:163: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-6.7.1p1/smtpd/util.c:308: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). if ((n = strlen(to)) == 0) data/opensmtpd-6.7.1p1/smtpd/util.c:484: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). dlen = strlen(s); data/opensmtpd-6.7.1p1/smtpd/util.c:537: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(s) < 5) data/opensmtpd-6.7.1p1/smtpscript/iobuf.c:209: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-6.7.1p1/smtpscript/smtpscript.c:469:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(rdelay); data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:597:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf[max - strlen(tmp)] = '\0'; data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:822:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(op->u.sleep.ms * 1000); data/opensmtpd-6.7.1p1/smtpscript/smtpscript.c:943: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). printf(" >>> %s\n", show_data(line, strlen(line), 70)); ANALYSIS SUMMARY: Hits = 752 Lines analyzed = 65156 in approximately 1.58 seconds (41179 lines/second) Physical Source Lines of Code (SLOC) = 49260 Hits@level = [0] 328 [1] 155 [2] 474 [3] 38 [4] 79 [5] 6 Hits@level+ = [0+] 1080 [1+] 752 [2+] 597 [3+] 123 [4+] 85 [5+] 6 Hits/KSLOC@level+ = [0+] 21.9245 [1+] 15.2659 [2+] 12.1194 [3+] 2.49695 [4+] 1.72554 [5+] 0.121803 Dot directories skipped = 3 (--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.