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/yp-tools-3.3/src/yppoll.c
Examining data/yp-tools-3.3/src/ypmatch.c
Examining data/yp-tools-3.3/src/ypwhich.c
Examining data/yp-tools-3.3/src/yppasswd.c
Examining data/yp-tools-3.3/src/yppasswd_xdr.c
Examining data/yp-tools-3.3/src/yptest.c
Examining data/yp-tools-3.3/src/yp_dump_binding.c
Examining data/yp-tools-3.3/src/domainname.c
Examining data/yp-tools-3.3/src/ypcat.c
Examining data/yp-tools-3.3/src/ypset.c
Examining data/yp-tools-3.3/lib/host2ypbind3_binding.c
Examining data/yp-tools-3.3/lib/taddr2host.c
Examining data/yp-tools-3.3/lib/rpcsvc/ypupd.h
Examining data/yp-tools-3.3/lib/rpcsvc/yppasswd.h
Examining data/yp-tools-3.3/lib/rpcsvc/ypclnt.h
Examining data/yp-tools-3.3/lib/rpcsvc/yp_prot.h
Examining data/yp-tools-3.3/lib/yperr_string.c
Examining data/yp-tools-3.3/lib/ypbinderr_string.c
Examining data/yp-tools-3.3/lib/ypprot_err.c
Examining data/yp-tools-3.3/lib/yp_get_default_domain.c
Examining data/yp-tools-3.3/lib/ypbind3_binding_free.c
Examining data/yp-tools-3.3/lib/yp_xdr.c
Examining data/yp-tools-3.3/lib/taddr2ipstr.c
Examining data/yp-tools-3.3/lib/yp_all_host.h
Examining data/yp-tools-3.3/lib/nicknames.c
Examining data/yp-tools-3.3/lib/yp_first.c
Examining data/yp-tools-3.3/lib/taddr2port.c
Examining data/yp-tools-3.3/lib/xdrfile-test.c
Examining data/yp-tools-3.3/lib/nicknames.h
Examining data/yp-tools-3.3/lib/ypbind3_binding_dup.c
Examining data/yp-tools-3.3/lib/libnis/ypclnt.h
Examining data/yp-tools-3.3/lib/yp_all_host.c
Examining data/yp-tools-3.3/lib/do_ypcall.c
Examining data/yp-tools-3.3/lib/internal.h
Examining data/yp-tools-3.3/lib/yp_maplist.c
Examining data/yp-tools-3.3/lib/yp_master.c
Examining data/yp-tools-3.3/lib/yp_match.c
Examining data/yp-tools-3.3/lib/yp_next.c
Examining data/yp-tools-3.3/lib/yp_order.c
Examining data/yp-tools-3.3/nss_nis6/nis-grp.c
Examining data/yp-tools-3.3/nss_nis6/nis-network.c
Examining data/yp-tools-3.3/nss_nis6/nis-initgroups.c
Examining data/yp-tools-3.3/nss_nis6/nis-netgrp.c
Examining data/yp-tools-3.3/nss_nis6/nss-nis6.c
Examining data/yp-tools-3.3/nss_nis6/libc-lock.h
Examining data/yp-tools-3.3/nss_nis6/nss_loader-test.c
Examining data/yp-tools-3.3/nss_nis6/nis-proto.c
Examining data/yp-tools-3.3/nss_nis6/nss-default.c
Examining data/yp-tools-3.3/nss_nis6/files-parse.c
Examining data/yp-tools-3.3/nss_nis6/nis-alias.c
Examining data/yp-tools-3.3/nss_nis6/netgroup.h
Examining data/yp-tools-3.3/nss_nis6/nis-publickey.c
Examining data/yp-tools-3.3/nss_nis6/nsswitch.h
Examining data/yp-tools-3.3/nss_nis6/nis-service.c
Examining data/yp-tools-3.3/nss_nis6/nis-ethers.c
Examining data/yp-tools-3.3/nss_nis6/nss-nis6.h
Examining data/yp-tools-3.3/nss_nis6/nis-spwd.c
Examining data/yp-tools-3.3/nss_nis6/nis-pwd.c
Examining data/yp-tools-3.3/nss_nis6/nis-rpc.c
Examining data/yp-tools-3.3/nss_nis6/libc-symbols.h
Examining data/yp-tools-3.3/nss_nis6/nis-hosts.c

FINAL RESULTS:

data/yp-tools-3.3/nss_nis6/nis-alias.c:51:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy (first_unused, key);
data/yp-tools-3.3/nss_nis6/nis-publickey.c:127:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy (skey, buf);
data/yp-tools-3.3/nss_nis6/nis-service.c:298:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy (cp, protocol);
data/yp-tools-3.3/src/domainname.c:160:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy (buf, argv[0]);
data/yp-tools-3.3/src/yppasswd.c:327:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (field, def);
data/yp-tools-3.3/src/yppasswd.c:433:36:  [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.
      && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen)
data/yp-tools-3.3/src/yppasswd.c:608:8:  [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.
	  if (execl (PASSWD_PROG, "passwd", user, NULL) == -1)
data/yp-tools-3.3/src/yppasswd.c:672:11:  [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.
      s = getpass (prompt);
data/yp-tools-3.3/src/yppasswd.c:675:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy (cp, pwd->pw_name);
data/yp-tools-3.3/src/yppasswd.c:695:16:  [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 (strcmp (crypt (s, sane_passwd), sane_passwd))
data/yp-tools-3.3/src/yppasswd.c:727:8:  [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.
	  p = getpass (_("Please enter new password:"));
data/yp-tools-3.3/src/yppasswd.c:751:8:  [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.
	  p = getpass (_("Please retype new password:"));
data/yp-tools-3.3/src/yppasswd.c:782:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy (salt + 3 + 7, rounds);
data/yp-tools-3.3/src/yppasswd.c:790:39:  [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.
      yppwd.newpw.pw_passwd = strdup (crypt (buf, salt));
data/yp-tools-3.3/src/yppasswd.c:821:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf (new_gecos, "%s,%s,%s,%s", name, location, office, phone);
data/yp-tools-3.3/src/domainname.c:124:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "?", long_options, &option_index);
data/yp-tools-3.3/src/yp_dump_binding.c:208:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:p:v:?", long_options, &option_index);
data/yp-tools-3.3/src/ypcat.c:138:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:h:ktx?", long_options, &option_index);
data/yp-tools-3.3/src/ypmatch.c:110:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:ktx?", long_options, &option_index);
data/yp-tools-3.3/src/yppasswd.c:486: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.
        c = random ();
data/yp-tools-3.3/src/yppasswd.c:514:3:  [3] (random) srandom:
  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.
  srandom (time (NULL));
data/yp-tools-3.3/src/yppasswd.c:540:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv,
data/yp-tools-3.3/src/yppoll.c:118:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:h:?", long_options, &option_index);
data/yp-tools-3.3/src/ypset.c:221:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:h:?", long_options, &option_index);
data/yp-tools-3.3/src/yptest.c:274:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:h:m:u:q?", long_options, &option_index);
data/yp-tools-3.3/src/ypwhich.c:301:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "d:mtV:x?", long_options, &option_index);
data/yp-tools-3.3/lib/do_ypcall.c:40: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 dom_domain[YPMAXDOMAIN + 1];
data/yp-tools-3.3/lib/do_ypcall.c:65: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[INET6_ADDRSTRLEN];
data/yp-tools-3.3/lib/do_ypcall.c:96:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[sizeof (BINDINGDIR) + strlen (domain) + 3 * sizeof (unsigned) + 3];
data/yp-tools-3.3/lib/do_ypcall.c:100:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *in = fopen (path, "rce");
data/yp-tools-3.3/lib/do_ypcall.c:128: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).
      fd = open (path, O_RDONLY);
data/yp-tools-3.3/lib/do_ypcall.c:493:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[resp.ypresp_all_u.val.keydat.keydat_len + 1];
data/yp-tools-3.3/lib/do_ypcall.c:494:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char val[resp.ypresp_all_u.val.valdat.valdat_len + 1];
data/yp-tools-3.3/lib/do_ypcall.c:503:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (key, resp.ypresp_all_u.val.keydat.keydat_val,
data/yp-tools-3.3/lib/do_ypcall.c:506:6:  [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, resp.ypresp_all_u.val.valdat.valdat_val,
data/yp-tools-3.3/lib/nicknames.c:58: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 (NICKNAMEFILE, "r");
data/yp-tools-3.3/lib/rpcsvc/yp_prot.h:310: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 ypoldsetdom_domain[YPMAXDOMAIN];
data/yp-tools-3.3/lib/xdrfile-test.c:40: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[INET6_ADDRSTRLEN];
data/yp-tools-3.3/lib/xdrfile-test.c:65: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 path3[MAXPATHLEN + 1];
data/yp-tools-3.3/lib/xdrfile-test.c:68:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf (path3, "binding.3");
data/yp-tools-3.3/lib/xdrfile-test.c:70: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 ((fp = fopen (path3, "wce")) == NULL)
data/yp-tools-3.3/lib/xdrfile-test.c:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[100];
data/yp-tools-3.3/lib/xdrfile-test.c:96:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *in = fopen (path, "rce");
data/yp-tools-3.3/lib/yp_all_host.c:65:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[resp.ypresp_all_u.val.keydat.keydat_len + 1];
data/yp-tools-3.3/lib/yp_all_host.c:66:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char val[resp.ypresp_all_u.val.valdat.valdat_len + 1];
data/yp-tools-3.3/lib/yp_all_host.c:75:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy (key, resp.ypresp_all_u.val.keydat.keydat_val, keylen);
data/yp-tools-3.3/lib/yp_all_host.c:77:13:  [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, resp.ypresp_all_u.val.valdat.valdat_val, vallen);
data/yp-tools-3.3/lib/yp_first.c:59:7:  [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 (*outkey, resp.keydat.keydat_val, *outkeylen);
data/yp-tools-3.3/lib/yp_first.c:63:7:  [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 (*outval, resp.valdat.valdat_val, *outvallen);
data/yp-tools-3.3/lib/yp_get_default_domain.c:28: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 ypdomainname[NIS_MAXNAMELEN + 1];
data/yp-tools-3.3/lib/yp_match.c:59:7:  [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 (*outval, resp.valdat.valdat_val, *outvallen);
data/yp-tools-3.3/lib/yp_next.c:61:7:  [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 (*outkey, resp.keydat.keydat_val, *outkeylen);
data/yp-tools-3.3/lib/yp_next.c:65:7:  [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 (*outval, resp.valdat.valdat_val, *outvallen);
data/yp-tools-3.3/lib/yp_xdr.c:395: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 key[YPMAXRECORD], val[YPMAXRECORD];
data/yp-tools-3.3/lib/ypbind3_binding_dup.c:92: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 (dst->ypbind_svcaddr->buf, src->ypbind_svcaddr->buf,
data/yp-tools-3.3/nss_nis6/files-parse.c:64: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 linebuffer[0];
data/yp-tools-3.3/nss_nis6/nis-ethers.c:74: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 val[0];
data/yp-tools-3.3/nss_nis6/nis-ethers.c:278: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[33];
data/yp-tools-3.3/nss_nis6/nis-grp.c:320: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[32];
data/yp-tools-3.3/nss_nis6/nis-grp.c:321:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  int nlen = sprintf (buf, "%lu", (unsigned long int) gid);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:48: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.
    unsigned char host_addr[16];	/* IPv4 or IPv6 address.  */
data/yp-tools-3.3/nss_nis6/nis-hosts.c:49: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 *h_addr_ptrs[2];	/* Points to that and null terminator.  */
data/yp-tools-3.3/nss_nis6/nis-hosts.c:277: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 name2[namlen + 1];
data/yp-tools-3.3/nss_nis6/nis-hosts.c:462: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 name2[namlen + 1];
data/yp-tools-3.3/nss_nis6/nis-hosts.c:536: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 ((*pat)->addr, host.h_addr_list[0], host.h_length);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:547:18:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  (*pat)->name = memcpy (buffer, host.h_name, h_name_len);
data/yp-tools-3.3/nss_nis6/nis-initgroups.c:103:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      p = memcpy (buffer, &bucket->mem[intern->offset], len);
data/yp-tools-3.3/nss_nis6/nis-initgroups.c:163: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 key[sizeof ("unix.@") + sizeof (uid_t) * 3 + strlen (domainname)];
data/yp-tools-3.3/nss_nis6/nis-netgrp.c:124:7:  [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, host, cp - host);
data/yp-tools-3.3/nss_nis6/nis-network.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 name2[namlen + 1];
data/yp-tools-3.3/nss_nis6/nis-proto.c:52: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 val[0];
data/yp-tools-3.3/nss_nis6/nis-proto.c:250: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[32];
data/yp-tools-3.3/nss_nis6/nis-publickey.c:118:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buf[2 * (HEXKEYBYTES + 1)];
data/yp-tools-3.3/nss_nis6/nis-publickey.c:194:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
_nss_nis6_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
data/yp-tools-3.3/nss_nis6/nis-pwd.c:486: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[32];
data/yp-tools-3.3/nss_nis6/nis-rpc.c:164:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      p = memcpy (buffer, &bucket->mem[intern->offset], len);
data/yp-tools-3.3/nss_nis6/nis-rpc.c:247: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[32];
data/yp-tools-3.3/nss_nis6/nis-service.c:238:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      p = memcpy (buffer, &bucket->mem[intern.offset], len);
data/yp-tools-3.3/nss_nis6/nis-service.c:291: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 key[keylen + 1];
data/yp-tools-3.3/nss_nis6/nis-service.c:385:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char key[sizeof (int) * 3 + strlen (proto) + 2];
data/yp-tools-3.3/nss_nis6/nis-spwd.c:126:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy (&buffer[len], "::");
data/yp-tools-3.3/nss_nis6/nis-spwd.c:217:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy (&buffer[len], "::");
data/yp-tools-3.3/nss_nis6/nss-default.c:41: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 name[23];
data/yp-tools-3.3/nss_nis6/nss-default.c:59:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *fp = fopen (default_nss, "rce");
data/yp-tools-3.3/nss_nis6/nss-nis6.h:51: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 mem[0];
data/yp-tools-3.3/nss_nis6/nss_loader-test.c:38: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 pwdbuffer[2048];
data/yp-tools-3.3/nss_nis6/nsswitch.h:71: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 name[0];
data/yp-tools-3.3/nss_nis6/nsswitch.h:85: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 name[0];
data/yp-tools-3.3/src/domainname.c:157:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[strlen (argv[0]) + 1];
data/yp-tools-3.3/src/domainname.c:186:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buf[256];
data/yp-tools-3.3/src/yp_dump_binding.c:104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[sizeof (dir) + strlen (domain) + 3 * sizeof (unsigned) + 3];
data/yp-tools-3.3/src/yp_dump_binding.c:110:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      FILE *in = fopen (path, "rce");
data/yp-tools-3.3/src/yp_dump_binding.c:126: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.
	        char buf[INET6_ADDRSTRLEN];
data/yp-tools-3.3/src/yp_dump_binding.c:158: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).
      fd = open (path, O_RDONLY);
data/yp-tools-3.3/src/yp_dump_binding.c:165:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	      char straddr[INET_ADDRSTRLEN];
data/yp-tools-3.3/src/yp_dump_binding.c:220:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  vers = atoi (optarg);
data/yp-tools-3.3/src/yppasswd.c:233: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, uidbuf[256], *ptr, *keyval;
data/yp-tools-3.3/src/yppasswd.c:296:16:  [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).
  pwd.pw_uid = atoi (val (strsep (&ptr, ":")));
data/yp-tools-3.3/src/yppasswd.c:297:16:  [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).
  pwd.pw_gid = atoi (val (strsep (&ptr, ":")));
data/yp-tools-3.3/src/yppasswd.c:477: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 ("/dev/urandom", O_RDONLY);
data/yp-tools-3.3/src/yppasswd.c:503: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 rounds[11] = "\0"; /* max length is '999999999$' */
data/yp-tools-3.3/src/yppasswd.c:664:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char prompt[130];
data/yp-tools-3.3/src/yppasswd.c:709:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char *buf, salt[37], *p = NULL;
data/yp-tools-3.3/src/yppasswd.c:770:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	  strcpy (salt, "$1$");
data/yp-tools-3.3/src/yppasswd.c:781:8:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	      strcpy (salt + 3, "rounds=");
data/yp-tools-3.3/src/yppasswd.c:795:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char gecos[1024], *sp, new_gecos[1024];
data/yp-tools-3.3/src/yppasswd.c:796:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char name[254], location[254], office[254], phone[254];
data/yp-tools-3.3/src/yppasswd.c:797:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char oname[254], olocation[254], ooffice[254], ophone[254];
data/yp-tools-3.3/src/yppasswd.c:831:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char new_shell[PATH_MAX];
data/yp-tools-3.3/src/yppoll.c:193: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 char straddr[INET_ADDRSTRLEN];
data/yp-tools-3.3/src/ypset.c:116: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 (&ypsd.ypsetdom_binding.ypbind_binding_addr, &server_addr.s_addr,
data/yp-tools-3.3/src/yptest.c:111: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[INET6_ADDRSTRLEN];
data/yp-tools-3.3/src/ypwhich.c:131:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char host[NI_MAXHOST];
data/yp-tools-3.3/src/ypwhich.c:183: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 straddr[INET_ADDRSTRLEN];
data/yp-tools-3.3/src/ypwhich.c:231: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 namebuf6[INET6_ADDRSTRLEN];
data/yp-tools-3.3/src/ypwhich.c:251: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 hostbuf[NI_MAXHOST];
data/yp-tools-3.3/src/ypwhich.c:318:21:  [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).
	  ypbind_version = atoi (optarg);
data/yp-tools-3.3/lib/do_ypcall.c:70:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
data/yp-tools-3.3/lib/do_ypcall.c:84:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
data/yp-tools-3.3/lib/do_ypcall.c:96:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char path[sizeof (BINDINGDIR) + strlen (domain) + 3 * sizeof (unsigned) + 3];
data/yp-tools-3.3/nss_nis6/nis-alias.c:42: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).
  char *first_unused = buffer + strlen (alias) + 1;
data/yp-tools-3.3/nss_nis6/nis-alias.c:44:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    buflen - (buflen % __alignof__ (char *)) - strlen (alias) - 2;
data/yp-tools-3.3/nss_nis6/nis-alias.c:68:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  first_unused += strlen (result->alias_name) + 1;
data/yp-tools-3.3/nss_nis6/nis-alias.c:167:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-alias.c:221:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t namlen = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-alias.c:257:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-ethers.c:181:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      p = strncpy (buffer, next->val, buflen);
data/yp-tools-3.3/nss_nis6/nis-ethers.c:227:56:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "ethers.byname", name, strlen (name), &result,
data/yp-tools-3.3/nss_nis6/nis-ethers.c:246:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-ethers.c:307:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-grp.c:170:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  len = strlen (result);
data/yp-tools-3.3/nss_nis6/nis-grp.c:212:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-grp.c:275:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int yperr = yp_match (domain, "group.byname", name, strlen (name), &result,
data/yp-tools-3.3/nss_nis6/nis-grp.c:294:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-grp.c:343:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:197:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (data->linebuffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:269:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t namlen = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:311:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (data->linebuffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:388:54:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "hosts.byaddr", buf, strlen (buf), &result,
data/yp-tools-3.3/nss_nis6/nis-hosts.c:415:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (data->linebuffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:454:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t namlen = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-hosts.c:544:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t h_name_len = strlen (host.h_name) + 1;
data/yp-tools-3.3/nss_nis6/nis-initgroups.c:88:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (p) + 1;
data/yp-tools-3.3/nss_nis6/nis-initgroups.c:155: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 (domainname) > UDPMSGSIZE)
data/yp-tools-3.3/nss_nis6/nis-initgroups.c:163:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char key[sizeof ("unix.@") + sizeof (uid_t) * 3 + strlen (domainname)];
data/yp-tools-3.3/nss_nis6/nis-netgrp.c:172:60:  [1] (buffer) strlen:
  Does not handle 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 = yperr2nss (yp_match (domain, "netgroup", group, strlen (group),
data/yp-tools-3.3/nss_nis6/nis-network.c:74: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).
       char *newp = (char *) alloca (strlen (addr) + (4 - n) * 2 + 1);
data/yp-tools-3.3/nss_nis6/nis-network.c:165:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-network.c:229:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t namlen = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-network.c:269:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-network.c:300:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t blen = strlen (buf);
data/yp-tools-3.3/nss_nis6/nis-network.c:343:19:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-proto.c:159:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      p = strncpy (buffer, next->val, buflen);
data/yp-tools-3.3/nss_nis6/nis-proto.c:205:59:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "protocols.byname", name, strlen (name),
data/yp-tools-3.3/nss_nis6/nis-proto.c:224:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-proto.c:274:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-publickey.c:55:62:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "publickey.byname", netname, strlen (netname),
data/yp-tools-3.3/nss_nis6/nis-publickey.c:72:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (pkey, result, HEXKEYBYTES + 1);
data/yp-tools-3.3/nss_nis6/nis-publickey.c:101:62:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "publickey.byname", netname, strlen (netname),
data/yp-tools-3.3/nss_nis6/nis-publickey.c:121:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy (buf, p, 2 * (HEXKEYBYTES + 1));
data/yp-tools-3.3/nss_nis6/nis-publickey.c:208:58:  [1] (buffer) strlen:
  Does not handle 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 yperr = yp_match (domain, "netid.byname", netname, strlen (netname),
data/yp-tools-3.3/nss_nis6/nis-pwd.c:228:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  len = strlen (result);
data/yp-tools-3.3/nss_nis6/nis-pwd.c:385:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t namelen = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-pwd.c:457:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-pwd.c:562:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-rpc.c:149:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (p) + 1;
data/yp-tools-3.3/nss_nis6/nis-rpc.c:270:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-service.c:81:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (req->buffer, inval, invallen);
data/yp-tools-3.3/nss_nis6/nis-service.c:223:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (p) + 1;
data/yp-tools-3.3/nss_nis6/nis-service.c:283:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t keylen = strlen (name) + (protocol ? 1 + strlen (protocol) : 0);
data/yp-tools-3.3/nss_nis6/nis-service.c:283:51:  [1] (buffer) strlen:
  Does not handle 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 keylen = strlen (name) + (protocol ? 1 + strlen (protocol) : 0);
data/yp-tools-3.3/nss_nis6/nis-service.c:318:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-service.c:376: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 (proto) > UDPMSGSIZE)
data/yp-tools-3.3/nss_nis6/nis-service.c:385: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).
      char key[sizeof (int) * 3 + strlen (proto) + 2];
data/yp-tools-3.3/nss_nis6/nis-service.c:406:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  char  *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-spwd.c:121:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/nss_nis6/nis-spwd.c:176: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).
  const size_t name_len = strlen (name);
data/yp-tools-3.3/nss_nis6/nis-spwd.c:212:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  char *p = strncpy (buffer, result, len);
data/yp-tools-3.3/src/domainname.c:157: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).
      char buf[strlen (argv[0]) + 1];
data/yp-tools-3.3/src/domainname.c:163: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 (setdomainname (buf, strlen (buf)) < 0)
data/yp-tools-3.3/src/yp_dump_binding.c:104: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).
  char path[sizeof (dir) + strlen (domain) + 3 * sizeof (unsigned) + 3];
data/yp-tools-3.3/src/ypmatch.c:187:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  res = yp_match (domainname, map, argv[i], strlen (argv[i]),
data/yp-tools-3.3/src/ypmatch.c:190: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).
	    res = yp_match (domainname, map,  argv[i], strlen (argv[i]) + 1,
data/yp-tools-3.3/src/yppasswd.c:260: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).
  key.keydat.keydat_len = strlen (keyval);
data/yp-tools-3.3/src/yppasswd.c:282:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (buffer, resp.valdat.valdat_val, resp.valdat.valdat_len);
data/yp-tools-3.3/src/yppasswd.c:329:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy (field, "");
data/yp-tools-3.3/src/yppasswd.c:349:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (field, gecos, size - 1);
data/yp-tools-3.3/src/yppasswd.c:377:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int passwdlen = strlen (passwd);
data/yp-tools-3.3/src/yppasswd.c:410:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((strlen (pwdstr) < 6) && uid)
data/yp-tools-3.3/src/yppasswd.c:448: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 (p = pwdstr + strlen (pwdstr) - 1, q = pwd->pw_name;
data/yp-tools-3.3/src/yppasswd.c:483:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        res = read (fd, &c, 1);
data/yp-tools-3.3/src/yppasswd.c:661: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).
  if ((pwd->pw_passwd != NULL && strlen (pwd->pw_passwd) > 0) ||
data/yp-tools-3.3/src/yppasswd.c:673: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).
      hashpass = alloca (strlen (pwd->pw_name) + 3);
data/yp-tools-3.3/src/yppasswd.c:683:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy (rounds, pwd->pw_passwd + 10, strcspn (pwd->pw_passwd + 10, "$") + 1);
data/yp-tools-3.3/src/yppasswd.c:693:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy (sane_passwd, pwd->pw_passwd, passwdlen);
data/yp-tools-3.3/src/yppasswd.c:734:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy (buf, p, 128);
data/yp-tools-3.3/src/yppasswd.c:779:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (strlen (rounds) != 0)
data/yp-tools-3.3/src/yppasswd.c:783: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).
	      create_random_salt (salt + 3 + 7 + strlen (rounds), 16);
data/yp-tools-3.3/src/yppasswd.c:804:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (gecos, pwd->pw_gecos, sizeof (gecos));
data/yp-tools-3.3/src/yppasswd.c:822:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sp = new_gecos + strlen (new_gecos);
data/yp-tools-3.3/src/yppoll.c:285: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).
      c[strlen(c)-1] = '\0';
data/yp-tools-3.3/src/yptest.c:361:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  KeyLen = strlen (key);
data/yp-tools-3.3/src/ypwhich.c:240:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (yp3_r.ypbind3_servername && strlen (yp3_r.ypbind3_servername) > 0)
data/yp-tools-3.3/src/ypwhich.c:247: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).
      else if (yp3_r.ypbind3_servername && strlen (yp3_r.ypbind3_servername) > 0)
data/yp-tools-3.3/src/ypwhich.c:387: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).
	  if (domainname == NULL || strlen (domainname) == 0)

ANALYSIS SUMMARY:

Hits = 205
Lines analyzed = 12329 in approximately 0.40 seconds (30660 lines/second)
Physical Source Lines of Code (SLOC) = 8986
Hits@level = [0] 253 [1]  88 [2]  91 [3]  11 [4]  15 [5]   0
Hits@level+ = [0+] 458 [1+] 205 [2+] 117 [3+]  26 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 50.9682 [1+] 22.8133 [2+] 13.0203 [3+] 2.89339 [4+] 1.66926 [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.