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/libpam-ssh-2.3+ds/atomicio.c
Examining data/libpam-ssh-2.3+ds/atomicio.h
Examining data/libpam-ssh-2.3+ds/authfd.c
Examining data/libpam-ssh-2.3+ds/authfd.h
Examining data/libpam-ssh-2.3+ds/authfile.c
Examining data/libpam-ssh-2.3+ds/authfile.h
Examining data/libpam-ssh-2.3+ds/base64.c
Examining data/libpam-ssh-2.3+ds/base64.h
Examining data/libpam-ssh-2.3+ds/bcrypt_pbkdf.c
Examining data/libpam-ssh-2.3+ds/blf.h
Examining data/libpam-ssh-2.3+ds/blocks.c
Examining data/libpam-ssh-2.3+ds/blowfish.c
Examining data/libpam-ssh-2.3+ds/bufaux.c
Examining data/libpam-ssh-2.3+ds/bufbn.c
Examining data/libpam-ssh-2.3+ds/bufec.c
Examining data/libpam-ssh-2.3+ds/buffer.c
Examining data/libpam-ssh-2.3+ds/buffer.h
Examining data/libpam-ssh-2.3+ds/chacha.c
Examining data/libpam-ssh-2.3+ds/chacha.h
Examining data/libpam-ssh-2.3+ds/cipher-aesctr.h
Examining data/libpam-ssh-2.3+ds/cipher-chachapoly.c
Examining data/libpam-ssh-2.3+ds/cipher-chachapoly.h
Examining data/libpam-ssh-2.3+ds/cipher-ctr.c
Examining data/libpam-ssh-2.3+ds/cipher.c
Examining data/libpam-ssh-2.3+ds/cipher.h
Examining data/libpam-ssh-2.3+ds/cleanup.c
Examining data/libpam-ssh-2.3+ds/crypto_api.h
Examining data/libpam-ssh-2.3+ds/defines.h
Examining data/libpam-ssh-2.3+ds/digest-openssl.c
Examining data/libpam-ssh-2.3+ds/digest.h
Examining data/libpam-ssh-2.3+ds/ed25519.c
Examining data/libpam-ssh-2.3+ds/explicit_bzero.c
Examining data/libpam-ssh-2.3+ds/fatal.c
Examining data/libpam-ssh-2.3+ds/fe25519.c
Examining data/libpam-ssh-2.3+ds/fe25519.h
Examining data/libpam-ssh-2.3+ds/ge25519.c
Examining data/libpam-ssh-2.3+ds/hash.c
Examining data/libpam-ssh-2.3+ds/includes.h
Examining data/libpam-ssh-2.3+ds/kex.h
Examining data/libpam-ssh-2.3+ds/key.c
Examining data/libpam-ssh-2.3+ds/key.h
Examining data/libpam-ssh-2.3+ds/log.c
Examining data/libpam-ssh-2.3+ds/log.h
Examining data/libpam-ssh-2.3+ds/misc.c
Examining data/libpam-ssh-2.3+ds/misc.h
Examining data/libpam-ssh-2.3+ds/openpam_borrow_cred.c
Examining data/libpam-ssh-2.3+ds/openpam_cred.h
Examining data/libpam-ssh-2.3+ds/openpam_restore_cred.c
Examining data/libpam-ssh-2.3+ds/openssl_compat.h
Examining data/libpam-ssh-2.3+ds/pam_get_pass.c
Examining data/libpam-ssh-2.3+ds/pam_get_pass.h
Examining data/libpam-ssh-2.3+ds/pam_option.h
Examining data/libpam-ssh-2.3+ds/pam_opttab.h
Examining data/libpam-ssh-2.3+ds/pam_ssh.c
Examining data/libpam-ssh-2.3+ds/pam_ssh_log.c
Examining data/libpam-ssh-2.3+ds/pam_ssh_log.h
Examining data/libpam-ssh-2.3+ds/pam_std_option.c
Examining data/libpam-ssh-2.3+ds/pam_test.c
Examining data/libpam-ssh-2.3+ds/poly1305.c
Examining data/libpam-ssh-2.3+ds/poly1305.h
Examining data/libpam-ssh-2.3+ds/rijndael.c
Examining data/libpam-ssh-2.3+ds/rijndael.h
Examining data/libpam-ssh-2.3+ds/rsa.c
Examining data/libpam-ssh-2.3+ds/rsa.h
Examining data/libpam-ssh-2.3+ds/sc25519.c
Examining data/libpam-ssh-2.3+ds/sc25519.h
Examining data/libpam-ssh-2.3+ds/ssh-dss.c
Examining data/libpam-ssh-2.3+ds/ssh-ecdsa.c
Examining data/libpam-ssh-2.3+ds/ssh-ed25519.c
Examining data/libpam-ssh-2.3+ds/ssh-rsa.c
Examining data/libpam-ssh-2.3+ds/ssh.h
Examining data/libpam-ssh-2.3+ds/ssh2.h
Examining data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c
Examining data/libpam-ssh-2.3+ds/sshbuf-getput-crypto.c
Examining data/libpam-ssh-2.3+ds/sshbuf-misc.c
Examining data/libpam-ssh-2.3+ds/sshbuf.c
Examining data/libpam-ssh-2.3+ds/sshbuf.h
Examining data/libpam-ssh-2.3+ds/ssherr.c
Examining data/libpam-ssh-2.3+ds/ssherr.h
Examining data/libpam-ssh-2.3+ds/sshkey.c
Examining data/libpam-ssh-2.3+ds/sshkey.h
Examining data/libpam-ssh-2.3+ds/strlcpy.c
Examining data/libpam-ssh-2.3+ds/strlcpy.h
Examining data/libpam-ssh-2.3+ds/strnvis.c
Examining data/libpam-ssh-2.3+ds/strnvis.h
Examining data/libpam-ssh-2.3+ds/timingsafe_bcmp.c
Examining data/libpam-ssh-2.3+ds/verify.c
Examining data/libpam-ssh-2.3+ds/xmalloc.c
Examining data/libpam-ssh-2.3+ds/xmalloc.h
Examining data/libpam-ssh-2.3+ds/ge25519.h

FINAL RESULTS:

data/libpam-ssh-2.3+ds/defines.h:665:7:  [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/libpam-ssh-2.3+ds/defines.h:667:9:  [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.
  char *crypt (const char *, const char *);
data/libpam-ssh-2.3+ds/log.c:436:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args);
data/libpam-ssh-2.3+ds/log.c:438:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
data/libpam-ssh-2.3+ds/log.h:67:27:  [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/libpam-ssh-2.3+ds/log.h:68:72:  [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     unambigous_log_error(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:70:27:  [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/libpam-ssh-2.3+ds/log.h:71:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void     logit(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:72: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     verbose(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:73:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void     debug(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:74:58:  [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     debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:75:58:  [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     debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
data/libpam-ssh-2.3+ds/log.h:80:27:  [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/libpam-ssh-2.3+ds/pam_ssh.c:977:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if ((access(dotdir,F_OK)) == -1) {
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:269:13:  [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.
	if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) {
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:281:11:  [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.
	if ((r = vsnprintf((char *)p, len + 1, fmt, ap2)) != len) {
data/libpam-ssh-2.3+ds/sshbuf.h:167: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/libpam-ssh-2.3+ds/sshbuf.h:326:3:  [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 x; \
data/libpam-ssh-2.3+ds/xmalloc.h:24:44:  [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/libpam-ssh-2.3+ds/authfd.c:105: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.
	authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME);
data/libpam-ssh-2.3+ds/authfd.c:220:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv(SSH_AUTHSOCKET_ENV_NAME))
data/libpam-ssh-2.3+ds/defines.h:565:9:  [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.
# undef getopt
data/libpam-ssh-2.3+ds/defines.h:571:10:  [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.
# define getopt(ac, av, o)  BSDgetopt(ac, av, o)
data/libpam-ssh-2.3+ds/misc.c:984:16:  [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 ((tmpdir = getenv("TMPDIR")) != NULL) {
data/libpam-ssh-2.3+ds/atomicio.c:114: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(iov, _iov, iovcnt * sizeof(*_iov));
data/libpam-ssh-2.3+ds/atomicio.c:153:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			iov[0].iov_base = ((char *)iov[0].iov_base) + rem;
data/libpam-ssh-2.3+ds/authfd.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 buf[1024];
data/libpam-ssh-2.3+ds/authfile.c:69:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0)
data/libpam-ssh-2.3+ds/authfile.c:224:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_RDONLY)) < 0) {
data/libpam-ssh-2.3+ds/authfile.c:269:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_RDONLY)) < 0)
data/libpam-ssh-2.3+ds/authfile.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 line[SSH_MAX_PUBKEY_BYTES];
data/libpam-ssh-2.3+ds/authfile.c:305: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(filename, "r")) == NULL)
data/libpam-ssh-2.3+ds/authfile.c:348:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char file[MAXPATHLEN];
data/libpam-ssh-2.3+ds/authfile.c:356:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_RDONLY)) < 0)
data/libpam-ssh-2.3+ds/authfile.c:480:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[SSH_MAX_PUBKEY_BYTES];
data/libpam-ssh-2.3+ds/authfile.c:488: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(filename, "r")) == NULL) {
data/libpam-ssh-2.3+ds/bcrypt_pbkdf.c:129: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(countsalt, salt, saltlen);
data/libpam-ssh-2.3+ds/chacha.c:52:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char sigma[16] = "expand 32-byte k";
data/libpam-ssh-2.3+ds/chacha.c: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 tau[16] = "expand 16-byte k";
data/libpam-ssh-2.3+ds/cipher-ctr.c:101: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(c->aes_counter, iv, AES_BLOCK_SIZE);
data/libpam-ssh-2.3+ds/cipher-ctr.c:126: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(c->aes_counter, iv, len);
data/libpam-ssh-2.3+ds/cipher-ctr.c:128: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(iv, c->aes_counter, len);
data/libpam-ssh-2.3+ds/cipher.c:135: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(ret + rlen, c->name, nlen + 1);
data/libpam-ssh-2.3+ds/cipher.c:388: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(dest, src, aadlen);
data/libpam-ssh-2.3+ds/cipher.c:394: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(dest, src, aadlen + len);
data/libpam-ssh-2.3+ds/cipher.c:418: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(dest, src, aadlen);
data/libpam-ssh-2.3+ds/cipher.c:554: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(iv, EVP_CIPHER_CTX_iv(cc->evp), len);
data/libpam-ssh-2.3+ds/cipher.c:590: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(EVP_CIPHER_CTX_iv_noconst(cc->evp), iv, evplen);
data/libpam-ssh-2.3+ds/cipher.c:615: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(dat, EVP_X_STATE(cc->evp), plen);
data/libpam-ssh-2.3+ds/cipher.c:632: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(EVP_X_STATE(cc->evp), dat, plen);
data/libpam-ssh-2.3+ds/defines.h:347:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/libpam-ssh-2.3+ds/defines.h:603: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/libpam-ssh-2.3+ds/defines.h:666:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  int mkstemp (char *);
data/libpam-ssh-2.3+ds/ed25519.c:34:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char extsk[64];
data/libpam-ssh-2.3+ds/ed25519.c:62:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char r[32];
data/libpam-ssh-2.3+ds/ed25519.c:63:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char s[32];
data/libpam-ssh-2.3+ds/ed25519.c:64:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char extsk[64];
data/libpam-ssh-2.3+ds/ed25519.c:66:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char hmg[crypto_hash_sha512_BYTES];
data/libpam-ssh-2.3+ds/ed25519.c:67:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char hram[crypto_hash_sha512_BYTES];
data/libpam-ssh-2.3+ds/ed25519.c:115:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char t2[32];
data/libpam-ssh-2.3+ds/ed25519.c:118:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char hram[crypto_hash_sha512_BYTES];
data/libpam-ssh-2.3+ds/fe25519.c:100:48:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void fe25519_unpack(fe25519 *r, const unsigned char x[32])
data/libpam-ssh-2.3+ds/fe25519.c:108:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void fe25519_pack(unsigned char r[32], const fe25519 *x)
data/libpam-ssh-2.3+ds/fe25519.h:40:48:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void fe25519_unpack(fe25519 *r, const unsigned char x[32]);
data/libpam-ssh-2.3+ds/fe25519.h:42:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void fe25519_pack(unsigned char r[32], const fe25519 *x);
data/libpam-ssh-2.3+ds/ge25519.c:196:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int ge25519_unpackneg_vartime(ge25519_p3 *r, const unsigned char p[32])
data/libpam-ssh-2.3+ds/ge25519.c:243:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ge25519_pack(unsigned char r[32], const ge25519_p3 *p)
data/libpam-ssh-2.3+ds/ge25519.c:266:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char b[127];
data/libpam-ssh-2.3+ds/ge25519.c:308:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  signed char b[85];
data/libpam-ssh-2.3+ds/ge25519.h:33:58:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]);
data/libpam-ssh-2.3+ds/ge25519.h:35:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ge25519_pack(unsigned char r[32], const ge25519 *p);
data/libpam-ssh-2.3+ds/hash.c:17:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char iv[64] = {
data/libpam-ssh-2.3+ds/hash.c:32:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char h[64];
data/libpam-ssh-2.3+ds/hash.c:33:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char padded[256];
data/libpam-ssh-2.3+ds/kex.h:151:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
Kex	*kex_setup(char *[PROPOSAL_MAX]);
data/libpam-ssh-2.3+ds/log.c:357: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(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600)) == -1) {
data/libpam-ssh-2.3+ds/log.c: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 msgbuf[MSGBUFSIZ];
data/libpam-ssh-2.3+ds/log.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 fmtbuf[MSGBUFSIZ];
data/libpam-ssh-2.3+ds/misc.c:525:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[128], *ret;
data/libpam-ssh-2.3+ds/misc.c:538: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(user, filename, slash);
data/libpam-ssh-2.3+ds/misc.c:577:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/libpam-ssh-2.3+ds/misc.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 name[100];
data/libpam-ssh-2.3+ds/misc.c:662: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(name, O_RDWR);
data/libpam-ssh-2.3+ds/misc.c:666:14:  [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_RDWR)) >= 0)
data/libpam-ssh-2.3+ds/misc.c:725: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 ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
data/libpam-ssh-2.3+ds/misc.c:747:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[3], *r;
data/libpam-ssh-2.3+ds/misc.c:1049: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 iptos_str[sizeof "0xff"];
data/libpam-ssh-2.3+ds/pam_ssh.c:341:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *arg[2], *env[2];		/* to pass to execve() */
data/libpam-ssh-2.3+ds/pam_ssh.c:343: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.
        char env_tmpdir[8+MAXPATHLEN];  /* TMPDIR=$TMPDIR env equation to pass to execve() */
data/libpam-ssh-2.3+ds/pam_ssh.c:466:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char env_string[BUFSIZ];	/* environment string */
data/libpam-ssh-2.3+ds/pam_ssh.c:915:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hname[MAXHOSTNAMELEN];	/* local hostname */
data/libpam-ssh-2.3+ds/pam_ssh.c:1013:33:  [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 ((env_write = open(per_agent, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR)) < 0
data/libpam-ssh-2.3+ds/pam_ssh.c:1014:48:  [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).
                               && !(env_read = fopen(per_agent, "r")))
data/libpam-ssh-2.3+ds/pam_ssh.c:1203:8:  [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).
	pid = atoi(ssh_agent_pid);
data/libpam-ssh-2.3+ds/poly1305.c:34:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/libpam-ssh-2.3+ds/poly1305.c:34:66:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/libpam-ssh-2.3+ds/poly1305.c:34:104:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/libpam-ssh-2.3+ds/poly1305.c:45:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char mp[16];
data/libpam-ssh-2.3+ds/sc25519.c:36:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char t[32];
data/libpam-ssh-2.3+ds/sc25519.c:102:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_from32bytes(sc25519 *r, const unsigned char x[32])
data/libpam-ssh-2.3+ds/sc25519.c:111: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.
void shortsc25519_from16bytes(shortsc25519 *r, const unsigned char x[16])
data/libpam-ssh-2.3+ds/sc25519.c:117:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_from64bytes(sc25519 *r, const unsigned char x[64])
data/libpam-ssh-2.3+ds/sc25519.c:134:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_to32bytes(unsigned char r[32], const sc25519 *x)
data/libpam-ssh-2.3+ds/sc25519.c:221:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_window3(signed char r[85], const sc25519 *s)
data/libpam-ssh-2.3+ds/sc25519.c:258:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_window5(signed char r[51], const sc25519 *s)
data/libpam-ssh-2.3+ds/sc25519.c:295:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_2interleave2(unsigned char r[127], const sc25519 *s1, const sc25519 *s2)
data/libpam-ssh-2.3+ds/sc25519.h:44:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_from32bytes(sc25519 *r, const unsigned char x[32]);
data/libpam-ssh-2.3+ds/sc25519.h:46: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.
void shortsc25519_from16bytes(shortsc25519 *r, const unsigned char x[16]);
data/libpam-ssh-2.3+ds/sc25519.h:48:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_from64bytes(sc25519 *r, const unsigned char x[64]);
data/libpam-ssh-2.3+ds/sc25519.h:52:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_to32bytes(unsigned char r[32], const sc25519 *x);
data/libpam-ssh-2.3+ds/sc25519.h:71:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_window3(signed char r[85], const sc25519 *s);
data/libpam-ssh-2.3+ds/sc25519.h:76:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_window5(signed char r[51], const sc25519 *s);
data/libpam-ssh-2.3+ds/sc25519.h:78:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void sc25519_2interleave2(unsigned char r[127], const sc25519 *s1, const sc25519 *s2);
data/libpam-ssh-2.3+ds/ssh-dss.c:96: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(*sigp, sigblob, SIGBLOB_LEN);
data/libpam-ssh-2.3+ds/ssh-dss.c:116: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(*sigp, sshbuf_ptr(b), len);
data/libpam-ssh-2.3+ds/ssh-dss.c:155: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(sigblob, signature, signaturelen);
data/libpam-ssh-2.3+ds/ssh-ecdsa.c:97: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(*sigp, sshbuf_ptr(b), len);
data/libpam-ssh-2.3+ds/ssh-ed25519.c:80: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(*sigp, sshbuf_ptr(b), len);
data/libpam-ssh-2.3+ds/ssh-ed25519.c:141: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(sm, sigblob, len);
data/libpam-ssh-2.3+ds/ssh-ed25519.c:142: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(sm+len, data, datalen);
data/libpam-ssh-2.3+ds/ssh-rsa.c:103: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(*sigp, sshbuf_ptr(b), len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:38: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(v, p, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:112: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(*valp, val, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:203: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(*valp, p, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:239: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(p, v, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:355:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d + 4, v, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:419: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(d + 4 + prepend, s, len);
data/libpam-ssh-2.3+ds/sshbuf-getput-crypto.c:198: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(dp + 2, d, len_bytes);
data/libpam-ssh-2.3+ds/sshkey.c:221: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(ret + rlen, kt->name, nlen + 1);
data/libpam-ssh-2.3+ds/sshkey.c:876: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(*blobp, sshbuf_ptr(b), len);
data/libpam-ssh-2.3+ds/sshkey.c:967: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 hex[4];
data/libpam-ssh-2.3+ds/sshkey.c:1071:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*retval, *p, title[FLDSIZE_X];
data/libpam-ssh-2.3+ds/sshkey.c:1126: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(p, title, tlen);
data/libpam-ssh-2.3+ds/sshkey.c:1720: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(n->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
data/libpam-ssh-2.3+ds/sshkey.c:2232: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(pk->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
data/libpam-ssh-2.3+ds/strnvis.c:148:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/libpam-ssh-2.3+ds/strnvis.c:170: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/libpam-ssh-2.3+ds/atomicio.c:61:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	pfd.events = f == read ? POLLIN : POLLOUT;
data/libpam-ssh-2.3+ds/authfd.c:185:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (atomicio(read, auth->fd, buf, 4) != 4) {
data/libpam-ssh-2.3+ds/authfd.c:201:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (atomicio(read, auth->fd, buf, l) != l) {
data/libpam-ssh-2.3+ds/authfile.c:123:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
data/libpam-ssh-2.3+ds/blowfish.c:683: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).
	blf_key(&c, (u_int8_t *) key2, strlen(key2));
data/libpam-ssh-2.3+ds/cipher.c:129: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).
		nlen = strlen(c->name);
data/libpam-ssh-2.3+ds/cipher.c:483: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).
	    passphrase, strlen(passphrase),
data/libpam-ssh-2.3+ds/fe25519.c:16:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static crypto_uint32 equal(crypto_uint32 a,crypto_uint32 b) /* 16-bit inputs */
data/libpam-ssh-2.3+ds/fe25519.c:87:21:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  crypto_uint32 m = equal(r->v[31],127);
data/libpam-ssh-2.3+ds/fe25519.c:89:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    m &= equal(r->v[i],255);
data/libpam-ssh-2.3+ds/fe25519.c:123:7:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  r = equal(t.v[0],0);
data/libpam-ssh-2.3+ds/fe25519.c:125:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    r &= equal(t.v[i],0);
data/libpam-ssh-2.3+ds/ge25519.c:152:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static unsigned char equal(signed char b,signed char c)
data/libpam-ssh-2.3+ds/ge25519.c:175:55:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+1],equal(b,1) | equal(b,-1));
data/libpam-ssh-2.3+ds/ge25519.c:175:68:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+1],equal(b,1) | equal(b,-1));
data/libpam-ssh-2.3+ds/ge25519.c:176:55:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+2],equal(b,2) | equal(b,-2));
data/libpam-ssh-2.3+ds/ge25519.c:176:68:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+2],equal(b,2) | equal(b,-2));
data/libpam-ssh-2.3+ds/ge25519.c:177:55:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+3],equal(b,3) | equal(b,-3));
data/libpam-ssh-2.3+ds/ge25519.c:177:68:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+3],equal(b,3) | equal(b,-3));
data/libpam-ssh-2.3+ds/ge25519.c:178:55:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  cmov_aff(t, &ge25519_base_multiples_affine[5*pos+4],equal(b,-4));
data/libpam-ssh-2.3+ds/log.c:450: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).
		(void)write(log_stderr_fd, msgbuf, strlen(msgbuf));
data/libpam-ssh-2.3+ds/misc.c:182: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).
		memmove(*s, *s + 1, strlen(*s)); /* move nul too */
data/libpam-ssh-2.3+ds/misc.c:402: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).
		s = *cp + strlen(*cp); /* skip to end (see first case below) */
data/libpam-ssh-2.3+ds/misc.c:425:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (*host == '[' && host[strlen(host) - 1] == ']') {
data/libpam-ssh-2.3+ds/misc.c:426: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).
		host[strlen(host) - 1] = '\0';
data/libpam-ssh-2.3+ds/misc.c:546: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(pw->pw_dir);
data/libpam-ssh-2.3+ds/misc.c:636: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 (buf[strlen(buf) - 1] == '\n' || feof(f)) {
data/libpam-ssh-2.3+ds/misc.c:642:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while (fgetc(f) != '\n' && !feof(f))
data/libpam-ssh-2.3+ds/pam_get_pass.c:69: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).
	memset(resp[0].resp, 0, strlen(resp[0].resp));
data/libpam-ssh-2.3+ds/pam_ssh.c:475: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).
			write(env_write, env_string, strlen(env_string));
data/libpam-ssh-2.3+ds/pam_ssh.c:493: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 (strcmp(&env_string[strlen(env_string) -
data/libpam-ssh-2.3+ds/pam_ssh.c:494: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_SOCKET_SUFFIX)], ENV_SOCKET_SUFFIX) == 0 &&
data/libpam-ssh-2.3+ds/pam_ssh.c:498: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).
		} else if (strcmp(&env_string[strlen(env_string) -
data/libpam-ssh-2.3+ds/pam_ssh.c:499: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_PID_SUFFIX)], ENV_PID_SUFFIX) == 0 &&
data/libpam-ssh-2.3+ds/pam_std_option.c:96: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).
			arglen = strlen(options->opt[i].name);
data/libpam-ssh-2.3+ds/sshbuf-getput-basic.c:362:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return sshbuf_put_string(buf, (u_char *)v, strlen(v));
data/libpam-ssh-2.3+ds/sshbuf-misc.c:113: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 plen = strlen(b64);
data/libpam-ssh-2.3+ds/sshkey.c:215: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).
		nlen = strlen(kt->name);
data/libpam-ssh-2.3+ds/sshkey.c:1076:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t	 len = strlen(augmentation_string) - 1;
data/libpam-ssh-2.3+ds/sshkey.c:1119: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).
	tlen = strlen(title);
data/libpam-ssh-2.3+ds/sshkey.c:1364: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 ((ret = sshbuf_put(b, uu, strlen(uu))) != 0)
data/libpam-ssh-2.3+ds/sshkey.c:3003: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 (passphrase == NULL || !strlen(passphrase)) {
data/libpam-ssh-2.3+ds/sshkey.c:3033: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 (bcrypt_pbkdf(passphrase, strlen(passphrase),
data/libpam-ssh-2.3+ds/sshkey.c:3100: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).
	for (i = 0; i < strlen((char *)(b64)); i++) {
data/libpam-ssh-2.3+ds/sshkey.c:3130: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).
		explicit_bzero(b64, strlen((char *)(b64)));
data/libpam-ssh-2.3+ds/sshkey.c:3227: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 ((passphrase == NULL || strlen(passphrase) == 0) &&
data/libpam-ssh-2.3+ds/sshkey.c:3265: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 (bcrypt_pbkdf(passphrase, strlen(passphrase), salt, slen,
data/libpam-ssh-2.3+ds/sshkey.c:3360: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).
	int blen, len = strlen(_passphrase);
data/libpam-ssh-2.3+ds/xmalloc.c:87:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(str) + 1;

ANALYSIS SUMMARY:

Hits = 186
Lines analyzed = 21857 in approximately 0.86 seconds (25357 lines/second)
Physical Source Lines of Code (SLOC) = 16178
Hits@level = [0]  39 [1]  49 [2] 113 [3]   5 [4]  19 [5]   0
Hits@level+ = [0+] 225 [1+] 186 [2+] 137 [3+]  24 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 13.9078 [1+] 11.4971 [2+] 8.46829 [3+] 1.4835 [4+] 1.17443 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.