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/binkd-1.1a-99/amiga/getfree.c
Examining data/binkd-1.1a-99/amiga/rename.c
Examining data/binkd-1.1a-99/amiga/sem.c
Examining data/binkd-1.1a-99/assert.h
Examining data/binkd-1.1a-99/binkd.c
Examining data/binkd-1.1a-99/binlog.c
Examining data/binkd-1.1a-99/binlog.h
Examining data/binkd-1.1a-99/branch.c
Examining data/binkd-1.1a-99/breaksig.c
Examining data/binkd-1.1a-99/bsy.c
Examining data/binkd-1.1a-99/bsy.h
Examining data/binkd-1.1a-99/btypes.h
Examining data/binkd-1.1a-99/client.c
Examining data/binkd-1.1a-99/client.h
Examining data/binkd-1.1a-99/common.h
Examining data/binkd-1.1a-99/compress.c
Examining data/binkd-1.1a-99/compress.h
Examining data/binkd-1.1a-99/confopt.h
Examining data/binkd-1.1a-99/crypt.c
Examining data/binkd-1.1a-99/crypt.h
Examining data/binkd-1.1a-99/dos/dirent.c
Examining data/binkd-1.1a-99/dos/dirent.h
Examining data/binkd-1.1a-99/dos/getfree.c
Examining data/binkd-1.1a-99/dos/sleep.c
Examining data/binkd-1.1a-99/dos/tcperr.c
Examining data/binkd-1.1a-99/exitproc.c
Examining data/binkd-1.1a-99/ftnaddr.c
Examining data/binkd-1.1a-99/ftnaddr.h
Examining data/binkd-1.1a-99/ftndom.c
Examining data/binkd-1.1a-99/ftndom.h
Examining data/binkd-1.1a-99/ftnnode.c
Examining data/binkd-1.1a-99/ftnnode.h
Examining data/binkd-1.1a-99/ftnq.c
Examining data/binkd-1.1a-99/ftnq.h
Examining data/binkd-1.1a-99/getopt.c
Examining data/binkd-1.1a-99/getopt.h
Examining data/binkd-1.1a-99/getw.c
Examining data/binkd-1.1a-99/getw.h
Examining data/binkd-1.1a-99/https.c
Examining data/binkd-1.1a-99/https.h
Examining data/binkd-1.1a-99/inbound.c
Examining data/binkd-1.1a-99/inbound.h
Examining data/binkd-1.1a-99/iphdr.h
Examining data/binkd-1.1a-99/iptools.c
Examining data/binkd-1.1a-99/iptools.h
Examining data/binkd-1.1a-99/md5b.c
Examining data/binkd-1.1a-99/md5b.h
Examining data/binkd-1.1a-99/nt/TCPErr.c
Examining data/binkd-1.1a-99/nt/WSock.c
Examining data/binkd-1.1a-99/nt/WSock.h
Examining data/binkd-1.1a-99/nt/breaksig.c
Examining data/binkd-1.1a-99/nt/dirwin32.c
Examining data/binkd-1.1a-99/nt/dirwin32.h
Examining data/binkd-1.1a-99/nt/getfree.c
Examining data/binkd-1.1a-99/nt/sem.c
Examining data/binkd-1.1a-99/nt/service.c
Examining data/binkd-1.1a-99/nt/service.h
Examining data/binkd-1.1a-99/nt/tray.c
Examining data/binkd-1.1a-99/nt/tray.h
Examining data/binkd-1.1a-99/nt/w32tools.c
Examining data/binkd-1.1a-99/nt/w32tools.h
Examining data/binkd-1.1a-99/nt/win9x.c
Examining data/binkd-1.1a-99/nt/win9x.h
Examining data/binkd-1.1a-99/ntlm/des.h
Examining data/binkd-1.1a-99/ntlm/des_enc.c
Examining data/binkd-1.1a-99/ntlm/des_locl.h
Examining data/binkd-1.1a-99/ntlm/ecb_enc.c
Examining data/binkd-1.1a-99/ntlm/helpers.c
Examining data/binkd-1.1a-99/ntlm/helpers.h
Examining data/binkd-1.1a-99/ntlm/md32_com.h
Examining data/binkd-1.1a-99/ntlm/md4.h
Examining data/binkd-1.1a-99/ntlm/md4_dgst.c
Examining data/binkd-1.1a-99/ntlm/md4_locl.h
Examining data/binkd-1.1a-99/ntlm/ncbc_enc.c
Examining data/binkd-1.1a-99/ntlm/set_key.c
Examining data/binkd-1.1a-99/ntlm/spr.h
Examining data/binkd-1.1a-99/os2/dirent.c
Examining data/binkd-1.1a-99/os2/dirent.h
Examining data/binkd-1.1a-99/os2/getfree.c
Examining data/binkd-1.1a-99/os2/gettid.c
Examining data/binkd-1.1a-99/os2/ns_parse.c
Examining data/binkd-1.1a-99/os2/ns_parse.h
Examining data/binkd-1.1a-99/os2/sem.c
Examining data/binkd-1.1a-99/os2/tcperr.c
Examining data/binkd-1.1a-99/perlhooks.c
Examining data/binkd-1.1a-99/perlhooks.h
Examining data/binkd-1.1a-99/pmatch.c
Examining data/binkd-1.1a-99/prothlp.c
Examining data/binkd-1.1a-99/prothlp.h
Examining data/binkd-1.1a-99/protoco2.h
Examining data/binkd-1.1a-99/protocol.c
Examining data/binkd-1.1a-99/protocol.h
Examining data/binkd-1.1a-99/readcfg.h
Examining data/binkd-1.1a-99/readdir.h
Examining data/binkd-1.1a-99/readflo.c
Examining data/binkd-1.1a-99/readflo.h
Examining data/binkd-1.1a-99/rfc2553.c
Examining data/binkd-1.1a-99/rfc2553.h
Examining data/binkd-1.1a-99/run.c
Examining data/binkd-1.1a-99/run.h
Examining data/binkd-1.1a-99/sem.h
Examining data/binkd-1.1a-99/server.c
Examining data/binkd-1.1a-99/server.h
Examining data/binkd-1.1a-99/setpttl.c
Examining data/binkd-1.1a-99/setpttl.h
Examining data/binkd-1.1a-99/snprintf.c
Examining data/binkd-1.1a-99/srif.c
Examining data/binkd-1.1a-99/srif.h
Examining data/binkd-1.1a-99/srv_gai.c
Examining data/binkd-1.1a-99/srv_gai.h
Examining data/binkd-1.1a-99/sys.h
Examining data/binkd-1.1a-99/tools.c
Examining data/binkd-1.1a-99/tools.h
Examining data/binkd-1.1a-99/unix/daemonize.c
Examining data/binkd-1.1a-99/unix/daemonize.h
Examining data/binkd-1.1a-99/unix/getfree.c
Examining data/binkd-1.1a-99/unix/ns_parse.c
Examining data/binkd-1.1a-99/unix/rename.c
Examining data/binkd-1.1a-99/unix/sem.c
Examining data/binkd-1.1a-99/unix/setpttl.c
Examining data/binkd-1.1a-99/xalloc.c
Examining data/binkd-1.1a-99/zlibdl.c
Examining data/binkd-1.1a-99/zlibdl.h
Examining data/binkd-1.1a-99/readcfg.c
Examining data/binkd-1.1a-99/Config.h

FINAL RESULTS:

data/binkd-1.1a-99/protocol.c:622:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      if (chmod(path, S_IREAD | S_IWRITE) == 0 && delete(path) != 0) {
data/binkd-1.1a-99/binkd.c:175: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 ("usage: binkd [-Cc"
data/binkd-1.1a-99/bsy.c:122:9:  [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 (buf, F_OK) == -1)
data/binkd-1.1a-99/dos/dirent.c:35:4:  [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(name,dirname);
data/binkd-1.1a-99/ftnaddr.c:123: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 (fa->domain, (d = get_domain_info (token[i + 1].s, pDomains)) ?
data/binkd-1.1a-99/ftnaddr.c:157:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    n += sprintf (s + n, "@%s", fa->domain);
data/binkd-1.1a-99/ftnaddr.c:174: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 (fa->domain, get_matched_domain(fa->z, pAddr, nAddr, pDomains));
data/binkd-1.1a-99/ftnaddr.c:263:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (pnt, ".pnt%s%08x", PATH_SEPARATOR, fa->p);
data/binkd-1.1a-99/ftnnode.c:264:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (host+strlen(host), ":%s", port);
data/binkd-1.1a-99/ftnq.c:118:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat (outb_path, PATH_SEPARATOR);
data/binkd-1.1a-99/ftnq.c:149:6:  [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 (fa.domain, curr_domain->name);
data/binkd-1.1a-99/ftnq.c:259: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(boxpath, R_OK | W_OK) != 0) {
data/binkd-1.1a-99/ftnq.c:260:9:  [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(boxpath, F_OK) == 0)
data/binkd-1.1a-99/getw.c:124:4:  [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 (dest + i, var);
data/binkd-1.1a-99/https.c:296:6:  [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+i, sp);
data/binkd-1.1a-99/inbound.c:482:9:  [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(tmp_name, 0) == 0) sdelete (tmp_name);
data/binkd-1.1a-99/ntlm/des.h:203:7:  [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 *buf,const char *salt);
data/binkd-1.1a-99/ntlm/helpers.c:259: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(m.host_dom, host);
data/binkd-1.1a-99/ntlm/helpers.c:260: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(m.host_dom + strlen(host), domain);
data/binkd-1.1a-99/os2/dirent.c:40:4:  [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(name,dirname);
data/binkd-1.1a-99/perlhooks.c:468:101:  [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.
VK_MAKE_DFL(void, dl_Perl_sv_setpvf_nocontext, (SV* sv, const char* pat, ...) __attribute__((format(printf,2,3))) );
data/binkd-1.1a-99/perlhooks.c:597:22:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define def_state()  sprintf(sv_state,  sv_state_format,  (unsigned)PID())
data/binkd-1.1a-99/perlhooks.c:598:22:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define def_config() sprintf(sv_config, sv_config_format, (unsigned)PID())
data/binkd-1.1a-99/perlhooks.c:1288: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(perlfile, R_OK)) {
data/binkd-1.1a-99/prothlp.c:146:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(s, "%08lx.%s",  /* Convert long name to CRC32 from zone,net,node,point numbers */
data/binkd-1.1a-99/protocol.c:272: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 (state->msgs[state->n_msgs].s + 3, s1);
data/binkd-1.1a-99/protocol.c:273:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat (state->msgs[state->n_msgs].s + 3, s2);
data/binkd-1.1a-99/protocol.c:294: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 (msg_text, sizeof (msg_text), s, ap);
data/binkd-1.1a-99/protocol.c:774:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(s, "%" PRIuMAX " %" PRIuMAX, netsize, filessize);
data/binkd-1.1a-99/protocol.c:981:15:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
              strcat(ad, szFTNAddr);
data/binkd-1.1a-99/protocol.c:1056:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat (szAkas, szFTNAddr);
data/binkd-1.1a-99/protocol.c:1099:9:  [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(ss, s);
data/binkd-1.1a-99/protocol.c:1100:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(ss, ad);
data/binkd-1.1a-99/protocol.c:1146: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 (fa.domain, get_matched_domain(fa.z, config->pAddr, config->nAddr, config->pDomains.first));
data/binkd-1.1a-99/protocol.c:2117:9:  [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(buf, F_OK) == 0)
data/binkd-1.1a-99/protocol.c:2805:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (szLocalTime, "%s, %2d %s %d %02d:%02d:%02d %c%02d%02d (%s)",
data/binkd-1.1a-99/protocol.c:2890:9:  [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 (state->flo.path, file->path);
data/binkd-1.1a-99/protocol.c:2903: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 (state->out.flo, state->flo.path);
data/binkd-1.1a-99/protocol.c:2953: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 (state->out.path, file->path);
data/binkd-1.1a-99/readcfg.c:232: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(c->root_domain, ROOT_DOMAIN);
data/binkd-1.1a-99/readcfg.c:812:9:  [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 (work_config.inbound_nonsecure, work_config.inbound);
data/binkd-1.1a-99/readcfg.c:1037: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 (a.domain, get_matched_domain(a.z, work_config.pAddr, work_config.nAddr, work_config.pDomains.first));
data/binkd-1.1a-99/readcfg.c:1990: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(pwd, fn->pwd);
data/binkd-1.1a-99/readcfg.c:1992:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(strcat(pwd, ","), (fn->pkt_pwd) ? fn->pkt_pwd : "-");
data/binkd-1.1a-99/readcfg.c:1993:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(strcat(pwd, ","), (fn->out_pwd) ? fn->out_pwd : "-");
data/binkd-1.1a-99/readcfg.c:2059:7:  [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(*(int *)(k->var) ? "[yes]" : "<not defined>");
data/binkd-1.1a-99/readcfg.c:2121:9:  [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(work_config.havedefnode ? "[see 0:0/0@defnode]" : "<not defined>");
data/binkd-1.1a-99/readflo.c:48:4:  [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 (dst, buf + 1);
data/binkd-1.1a-99/readflo.c:52:4:  [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 (dst, buf + 1);
data/binkd-1.1a-99/readflo.c:56:4:  [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 (dst, buf);
data/binkd-1.1a-99/run.c:53:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  Log (3, "rc=%i", (rc=system (cmd)));
data/binkd-1.1a-99/run.c:67: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(cs, sp);
data/binkd-1.1a-99/run.c:83:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(cs, sp);
data/binkd-1.1a-99/run.c:100:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  Log (3, "rc=%i", (rc=system (cmd)));
data/binkd-1.1a-99/run.c:187:7:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      execl(shell, shell, SHELLOPT, cmd, (char *)NULL);
data/binkd-1.1a-99/run.c:204:7:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      execvp(args[0], args);
data/binkd-1.1a-99/snprintf.c:717:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
data/binkd-1.1a-99/snprintf.c:728:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf (char *str,size_t count,const char *fmt,...)
data/binkd-1.1a-99/snprintf.c:730:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf (va_alist) va_dcl
data/binkd-1.1a-99/snprintf.c:744:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  (void) vsnprintf(str, count, fmt, ap);
data/binkd-1.1a-99/snprintf.c:795: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.
      snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
data/binkd-1.1a-99/snprintf.c:796:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (buf2, fp_fmt[x], fp_nums[y]);
data/binkd-1.1a-99/snprintf.c:809: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.
      snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
data/binkd-1.1a-99/snprintf.c:810:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (buf2, int_fmt[x], int_nums[y]);
data/binkd-1.1a-99/srif.c:225: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(w, cmd);
data/binkd-1.1a-99/srif.c:243:13:  [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(ts, fn);
data/binkd-1.1a-99/sys.h:228:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf (char *str, size_t count, const char *fmt,...);
data/binkd-1.1a-99/sys.h:230:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf (va_alist) va_dcl;
data/binkd-1.1a-99/sys.h:234:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int vsnprintf (char *str, size_t count, const char *fmt, va_list args);
data/binkd-1.1a-99/tools.c:294: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(buf, sizeof(buf), s, ap);
data/binkd-1.1a-99/unix/setpttl.c:187:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	(void) vsnprintf(p, SPACELEFT(buf, p), fmt, ap);
data/binkd-1.1a-99/unix/setpttl.c:228:9:  [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).
	(void) strcpy(Argv[0], buf);
data/binkd-1.1a-99/xalloc.c:44: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 (p, str);
data/binkd-1.1a-99/xalloc.c:53: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 (*str + n, s2);
data/binkd-1.1a-99/binkd.c:293:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((i = getopt(argc, argv, optstring)) != -1)
data/binkd-1.1a-99/binkd.c:664:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char *p = getenv("SSH_CONNECTION");
data/binkd-1.1a-99/getopt.c:59:5:  [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.
int getopt(int argc, char **argv, const char *opts)
data/binkd-1.1a-99/getopt.h:11: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.
#define getopt(argc, argv, opts)	binkd_getopt(argc, argv, opts)
data/binkd-1.1a-99/getopt.h:17:12:  [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.
extern int getopt(int argc, char **argv, const char *opts);
data/binkd-1.1a-99/getw.c:120:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	  if ((var = getenv (varname)) == 0)
data/binkd-1.1a-99/nt/w32tools.c:161:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((i = getopt(argc, argv, optstring)) != -1)
data/binkd-1.1a-99/nt/win9x.c:90:13:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if ((rc = CreateProcess(NULL, cmdline, NULL, NULL, 0, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi)))
data/binkd-1.1a-99/nt/win9x.c:90:13:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if ((rc = CreateProcess(NULL, cmdline, NULL, NULL, 0, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi)))
data/binkd-1.1a-99/nt/win9x.c:218:12:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
      hl = LoadLibrary("KERNEL32.DLL");
data/binkd-1.1a-99/perlhooks.c:1304:20:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    HINSTANCE hl = LoadLibrary(cfg->perl_dll);
data/binkd-1.1a-99/run.c:32: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.
#define SHELL (getenv("COMSPEC") ? getenv("COMSPEC") : "cmd.exe")
data/binkd-1.1a-99/run.c:32:36:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
#define SHELL (getenv("COMSPEC") ? getenv("COMSPEC") : "cmd.exe")
data/binkd-1.1a-99/run.c:59:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *cs, *sp=getenv("COMSPEC");
data/binkd-1.1a-99/run.c:84:8:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if (!CreateProcess(NULL, cs, NULL, NULL, 0, dw, NULL, NULL, &si, &pi))
data/binkd-1.1a-99/run.c:84:8:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if (!CreateProcess(NULL, cs, NULL, NULL, 0, dw, NULL, NULL, &si, &pi))
data/binkd-1.1a-99/server.c:313:3:  [3] (random) srand:
  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.
  srand(time(0));
data/binkd-1.1a-99/tools.c:138:5:  [3] (random) srand:
  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.
    srand (time (0));
data/binkd-1.1a-99/tools.c:325:52:  [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.
                                 current_logpath : getenv(BINKD_LOGPATH_ENVIRON);
data/binkd-1.1a-99/zlibdl.c:55:18:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  HINSTANCE hl = LoadLibrary(dll_name);
data/binkd-1.1a-99/zlibdl.c:88:18:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  HINSTANCE hl = LoadLibrary(dll_name);
data/binkd-1.1a-99/assert.h:24: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).
           { int hcore=open("c:\\binkd.core",O_BINARY|O_RDWR|O_CREAT,0600); \
data/binkd-1.1a-99/binkd.c:421:28:  [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).
  { if ((inetd_socket_in = atoi(argv[argc-1])) == 0 && !isdigit(argv[argc-1][0]))
data/binkd-1.1a-99/binkd.c:455:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[128];
data/binkd-1.1a-99/binkd.c:652: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 szFTNAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/binkd.c:679: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).
    tempfd = open("/dev/null", O_RDWR);
data/binkd-1.1a-99/binkd.c:681: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).
    tempfd = open("nul", O_RDWR);
data/binkd-1.1a-99/binlog.c:108: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 ((fl = fopen(binlogpath,"ab")) != NULL) {
data/binkd-1.1a-99/binlog.c:147: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   Domain[16];
data/binkd-1.1a-99/binlog.c:150: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   StationName[32];
data/binkd-1.1a-99/binlog.c:151: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   StationLoc[40];
data/binkd-1.1a-99/binlog.c:178:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen ( state->to ? fdouthist : fdinhist, "ab" )) != NULL)
data/binkd-1.1a-99/branch.c:74: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 (tmp, arg, size);
data/binkd-1.1a-99/bsy.c:67: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/bsy.c:83: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 (&new_bsy->fa, fa0, sizeof (FTN_ADDR));
data/binkd-1.1a-99/bsy.c:88:20:  [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).
      new_bsy->h = open(buf, O_RDONLY|O_NOINHERIT);
data/binkd-1.1a-99/bsy.c:112: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/bsy.c:130: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[MAXPATHLEN + 1], *p;
data/binkd-1.1a-99/bsy.c:179: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[MAXPATHLEN + 1], *p;
data/binkd-1.1a-99/bsy.c:220:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAXPATHLEN + 1];
data/binkd-1.1a-99/btypes.h: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[MAX_DOMAIN + 1];
data/binkd-1.1a-99/btypes.h:53: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 domain[MAX_DOMAIN + 1];
data/binkd-1.1a-99/btypes.h:64: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 pwd[MAXPWDLEN + 1];
data/binkd-1.1a-99/btypes.h:112: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/btypes.h:125: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[MAXPATHLEN + 1];		    /* It's name */
data/binkd-1.1a-99/btypes.h:126:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char flo[MAXPATHLEN + 1];		    /* It's .?lo */
data/binkd-1.1a-99/btypes.h:127: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 netname[MAX_NETNAME + 1];	    /* It's "netname" */
data/binkd-1.1a-99/btypes.h:142: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[MAXPATHLEN + 1];		    /* file's name */
data/binkd-1.1a-99/btypes.h:158: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[MAXPATHLEN + 1];		    /* file's name */
data/binkd-1.1a-99/client.c:135: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 szDestAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/client.c:301: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 szDestAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/client.c:303: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 host[BINKD_FQDNLEN + 5 + 1];       /* current host/port */
data/binkd-1.1a-99/client.c:304: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 addrbuf[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/client.c:305: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 servbuf[MAXSERVNAME + 1];
data/binkd-1.1a-99/client.c:674: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 szDestAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/compress.c:121: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[1024];
data/binkd-1.1a-99/compress.c:226: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[1024];
data/binkd-1.1a-99/crypt.c:109:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 decrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3])
data/binkd-1.1a-99/crypt.c:115:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 encrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3])
data/binkd-1.1a-99/crypt.h:10:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 decrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3]);
data/binkd-1.1a-99/crypt.h:11:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 encrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3]);
data/binkd-1.1a-99/dos/dirent.c:37:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
     strcat(name,"\\*.*");
data/binkd-1.1a-99/dos/dirent.c:39:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
     strcat(name,"*.*");
data/binkd-1.1a-99/dos/dirent.h:26: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     d_name[13];
data/binkd-1.1a-99/dos/dirent.h:30: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          _d_reserved[21]; /* Microsoft reserved - do not change */
data/binkd-1.1a-99/ftnaddr.c:27: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 s[MAX_DOMAIN + 1];
data/binkd-1.1a-99/ftnaddr.c:149:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    n += sprintf (s + n, "%i:", fa->z);
data/binkd-1.1a-99/ftnaddr.c:151:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    n += sprintf (s + n, "%i", fa->net);
data/binkd-1.1a-99/ftnaddr.c:153:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    n += sprintf (s + n, "/%i", fa->node);
data/binkd-1.1a-99/ftnaddr.c:155:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    n += sprintf (s + n, ".%i", fa->p);
data/binkd-1.1a-99/ftnaddr.c:204: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/ftnaddr.c:220:5:  [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 (s, "f%i.n%i.z%i.", fa->node, fa->net, fa->z);
data/binkd-1.1a-99/ftnaddr.c:222:5:  [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 (s, "p%i.f%i.n%i.z%i.", fa->p, fa->node, fa->net, fa->z);
data/binkd-1.1a-99/ftnaddr.c:260:2:  [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 (ext, ".%03x", fa->z);
data/binkd-1.1a-99/ftnnode.c:103: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 (&(pn->fa), fa, sizeof (FTN_ADDR));
data/binkd-1.1a-99/ftnnode.c:239: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 host[BINKD_FQDNLEN + 1];       /* current host/port */
data/binkd-1.1a-99/ftnnode.c:249:3:  [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(n.fa.domain, "defnode");
data/binkd-1.1a-99/ftnnode.c:302:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (&n.fa, fa, sizeof (FTN_ADDR));
data/binkd-1.1a-99/ftnnode.c:314:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (&n.fa, fa, sizeof (FTN_ADDR));
data/binkd-1.1a-99/ftnnode.c:361: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(pNodArray, config->pNodArray, nNod * sizeof(FTN_NODE *));
data/binkd-1.1a-99/ftnnode.c:393: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 buf[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/ftnq.c:102: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[MAXPATHLEN + 1], outb_path[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:170: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:252: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[MAXPATHLEN + 1], *s;
data/binkd-1.1a-99/ftnq.c:308: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:404: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).
    if ((f = fopen (path, "r")) == NULL ||
data/binkd-1.1a-99/ftnq.c:433: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 buf[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/ftnq.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 buf[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:475:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char ext[4];
data/binkd-1.1a-99/ftnq.c:483:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (&fa2, fa1, sizeof(FTN_ADDR));
data/binkd-1.1a-99/ftnq.c:539: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 (&fa2, fa1, sizeof (FTN_ADDR));
data/binkd-1.1a-99/ftnq.c:610: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 *argv[3];
data/binkd-1.1a-99/ftnq.c:611: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 str[MAXPATHLEN+1];
data/binkd-1.1a-99/ftnq.c:642: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).
      f = fopen(filename, "r");
data/binkd-1.1a-99/ftnq.c:674: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 (&q->fa, fa1, sizeof (FTN_ADDR));
data/binkd-1.1a-99/ftnq.c:732:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[60], buf[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/ftnq.c:759: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[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/ftnq.c:884: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 str[MAXPATHLEN+2];
data/binkd-1.1a-99/ftnq.c:888:21:  [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).
      else if ((f = fopen(curr->path, "r")) != NULL)
data/binkd-1.1a-99/ftnq.c:996: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:997: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 ext[5];
data/binkd-1.1a-99/ftnq.c:1001:3:  [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 (ext, ".flo");
data/binkd-1.1a-99/ftnq.c:1024: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:1025: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 addr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/ftnq.c:1026: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 time[80];
data/binkd-1.1a-99/ftnq.c:1040: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).
    if ((f = fopen (buf, "w")) != NULL)
data/binkd-1.1a-99/ftnq.c:1056: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:1066:16:  [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 (buf, "wb")) != NULL)
data/binkd-1.1a-99/ftnq.c:1081: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/ftnq.c:1090: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).
    if ((f = fopen (buf, "rb")) != NULL &&
data/binkd-1.1a-99/getw.c:110: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 varname[MAX_ENV_VAR_NAME + 1];
data/binkd-1.1a-99/https.c:85:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024], *pbuf;
data/binkd-1.1a-99/https.c:126:37:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			if((sp1=strchr(buf, ':'))==NULL) strcat(buf, ":1080");
data/binkd-1.1a-99/https.c:141:36:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				if (sizeof(buf)>strlen(buf)+3) strcat(buf, "\r\n");
data/binkd-1.1a-99/https.c:199:13:  [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).
						int j=atoi(sp1+16);
data/binkd-1.1a-99/https.c:216:38:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
						if (strlen(buf)+3<sizeof(buf)) strcat(buf, "\r\n\r\n");
data/binkd-1.1a-99/https.c:290: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(buf+2, sauth, i);
data/binkd-1.1a-99/https.c:325: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(buf+4, &(((struct sockaddr_in*)(ai->ai_addr))->sin_addr), 4);
data/binkd-1.1a-99/https.c:338: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(buf+4, &defaddr, 4);
data/binkd-1.1a-99/https.c:345: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(buf+5, host, i);
data/binkd-1.1a-99/inbound.c:38:3:  [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 (strrchr (path, '.'), ".dt");
data/binkd-1.1a-99/inbound.c:40:3:  [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 (strrchr (path, '.'), ".hr");
data/binkd-1.1a-99/inbound.c:47:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[20];
data/binkd-1.1a-99/inbound.c:49: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 node[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/inbound.c:56:5:  [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 (tmp, "%08lx.hr", rnd ());
data/binkd-1.1a-99/inbound.c:60:16:  [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 (s, "w")) == 0)
data/binkd-1.1a-99/inbound.c:66:54:  [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.
      if (from) ftnaddress_to_str (node, from); else strcpy(node, "0:0/0.0@unknown");
data/binkd-1.1a-99/inbound.c:95:3:  [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 (strrchr (tmp_name, '.'), ".dt");
data/binkd-1.1a-99/inbound.c:103:3:  [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 (strrchr (tmp_name, '.'), ".hr");
data/binkd-1.1a-99/inbound.c:113: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[MAXPATHLEN + 80];
data/binkd-1.1a-99/inbound.c:142: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).
    if ((f = fopen (s, "r")) == NULL)
data/binkd-1.1a-99/inbound.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 *w[4];
data/binkd-1.1a-99/inbound.c:241:3:  [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 (strrchr (s, '.'), ".dt");
data/binkd-1.1a-99/inbound.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[MAXPATHLEN + 1];
data/binkd-1.1a-99/inbound.c:254: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/inbound.c:263:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open (buf, O_CREAT|O_APPEND|O_RDWR|O_BINARY|O_NOINHERIT, 0666)) == -1)
data/binkd-1.1a-99/inbound.c:324:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp_name[MAXPATHLEN + 1];
data/binkd-1.1a-99/inbound.c:334: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 (strrchr (tmp_name, '.'), ".hr");
data/binkd-1.1a-99/inbound.c:345: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 buf[58];
data/binkd-1.1a-99/inbound.c:369:15:  [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 ( (PKT = fopen(tmp_name, "rb")) == NULL )
data/binkd-1.1a-99/inbound.c:396: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(real_name+i+1, config->pkthdr_bad, len);
data/binkd-1.1a-99/inbound.c:411:7:  [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(*s, ".1");
data/binkd-1.1a-99/inbound.c:414: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).
    num = atoi(s[0]+1);
data/binkd-1.1a-99/inbound.c:417:5:  [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(*s + 1, "%i", num + 1);
data/binkd-1.1a-99/inbound.c:456:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp_name[MAXPATHLEN + 1];
data/binkd-1.1a-99/inbound.c:457: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 real_name[MAXPATHLEN + 10];
data/binkd-1.1a-99/inbound.c:458: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 szAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/inbound.c:483: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 (strrchr (tmp_name, '.'), ".hr");
data/binkd-1.1a-99/inbound.c:561:3:  [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 (strrchr (tmp_name, '.'), ".hr");
data/binkd-1.1a-99/md5b.c:70:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char PADDING[64] = {
data/binkd-1.1a-99/md5b.c:155: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.
unsigned char digest[16];                         /* message digest */
data/binkd-1.1a-99/md5b.c:158: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 bits[8];
data/binkd-1.1a-99/md5b.c:185: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.
unsigned char block[64];
data/binkd-1.1a-99/md5b.c:330: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 *)output)[i] = (char)value;
data/binkd-1.1a-99/md5b.c:344:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char k_ipad[65];    /* inner padding -
data/binkd-1.1a-99/md5b.c:347:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char k_opad[65];    /* outer padding -
data/binkd-1.1a-99/md5b.c:350:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char tk[16];
data/binkd-1.1a-99/md5b.c:380:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#ifndef bcopy
data/binkd-1.1a-99/md5b.c:381:9:  [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 bcopy(x,y,z) memmove((char*)y, (char*)x, z)
data/binkd-1.1a-99/md5b.c:385:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        bcopy( key, k_ipad, key_len);
data/binkd-1.1a-99/md5b.c:386:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        bcopy( key, k_opad, key_len);
data/binkd-1.1a-99/md5b.c:428: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(res, digest, len);
data/binkd-1.1a-99/md5b.c:470:3:  [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(rs, "CRAM-MD5-");
data/binkd-1.1a-99/md5b.h:81: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 buffer[64];                         /* input buffer */
data/binkd-1.1a-99/md5b.h:87:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char MDcaddr_t[MD5_DIGEST_LEN];
data/binkd-1.1a-99/nt/TCPErr.c:81:12:  [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.
    if(st) sprintf(st, "{W32 API error %u} Unknown Win32API error", errnum);
data/binkd-1.1a-99/nt/TCPErr.c:86:13:  [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.
      len = sprintf(st, "{W32 API error %u} ",errnum);
data/binkd-1.1a-99/nt/dirwin32.c:28: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 fmask[_MAX_PATH+1];
data/binkd-1.1a-99/nt/dirwin32.h:31: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        d_name[_MAX_PATH+1];  /* file's name */
data/binkd-1.1a-99/nt/getfree.c:78: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 RPN[MAXPATHLEN];	/* root path  */
data/binkd-1.1a-99/nt/service.c:183: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 ttt[512];
data/binkd-1.1a-99/nt/service.c:211: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 DisplayName[256]; /* MSDN spoke: "The maximum string length is 256 characters" */
data/binkd-1.1a-99/nt/service.c:255: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 ttt[MAXPATHLEN+70];
data/binkd-1.1a-99/nt/service.c:269: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 ttt[MAXPATHLEN+70];
data/binkd-1.1a-99/nt/service.c:435: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 sp[MAXPATHLEN+1];
data/binkd-1.1a-99/nt/service.c:486: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 path[MAXPATHLEN+1];
data/binkd-1.1a-99/nt/tray.c:77: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 buf[256];
data/binkd-1.1a-99/nt/w32tools.c:86: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 service_name[MAX_PATH];
data/binkd-1.1a-99/nt/w32tools.c:132: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 pathname[MAXPATHLEN], *p;
data/binkd-1.1a-99/nt/w32tools.c:258: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 buf[160], bn[21];
data/binkd-1.1a-99/nt/win9x.c:121: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(tmp, Win9xServPrefix, len_pr);
data/binkd-1.1a-99/nt/win9x.c:123: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(tmp+len_pr+1, service_name, len_sn);
data/binkd-1.1a-99/nt/win9x.c:139:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(tmp, Win9xRegParm, tmplen1);
data/binkd-1.1a-99/nt/win9x.c:141:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(tmp+tmplen1+1, srvname, tmplen2);
data/binkd-1.1a-99/nt/win9x.c:207: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.
          memcpy(path, argv[0], pathlen);
data/binkd-1.1a-99/nt/win9x.c:677: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(sp, asp, tmplen1); sp += tmplen1;
data/binkd-1.1a-99/nt/win9x.c:680: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(sp, Win9xStartService, tmplen2); sp += tmplen2;
data/binkd-1.1a-99/ntlm/des.h:87:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char des_cblock[8];
data/binkd-1.1a-99/ntlm/des.h:88:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef /* const */ unsigned char const_des_cblock[8];
data/binkd-1.1a-99/ntlm/helpers.c:51:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char nt_hpw[21];
data/binkd-1.1a-99/ntlm/helpers.c:56: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 lm_hpw[21];
data/binkd-1.1a-99/ntlm/helpers.c:61: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  lm_pw[14];
data/binkd-1.1a-99/ntlm/helpers.c:75: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(lm_hpw, cb, 8);
data/binkd-1.1a-99/ntlm/helpers.c:79: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(lm_hpw + 8, cb, 8);
data/binkd-1.1a-99/ntlm/helpers.c:110:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char    protocol[8];     /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' */
data/binkd-1.1a-99/ntlm/helpers.c:112: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    zero1[3];
data/binkd-1.1a-99/ntlm/helpers.c:114: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    zero2[2];
data/binkd-1.1a-99/ntlm/helpers.c:119: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    zero3[2];
data/binkd-1.1a-99/ntlm/helpers.c:124: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    zero4[2];
data/binkd-1.1a-99/ntlm/helpers.c:126: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    host_dom[1000];  /* host string (ASCII) domain string (ASCII) */
data/binkd-1.1a-99/ntlm/helpers.c:130: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    protocol[8];     /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' */
data/binkd-1.1a-99/ntlm/helpers.c:132:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char    zero1[3];
data/binkd-1.1a-99/ntlm/helpers.c:137: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    zero2[2];
data/binkd-1.1a-99/ntlm/helpers.c:142:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char    zero3[2];
data/binkd-1.1a-99/ntlm/helpers.c:147: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    zero4[2];
data/binkd-1.1a-99/ntlm/helpers.c:152: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    zero5[2];
data/binkd-1.1a-99/ntlm/helpers.c:157: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    zero6[6];
data/binkd-1.1a-99/ntlm/helpers.c:160: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    zero7[2];
data/binkd-1.1a-99/ntlm/helpers.c:163: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    zero8[2];
data/binkd-1.1a-99/ntlm/helpers.c:165: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    data[1024];
data/binkd-1.1a-99/ntlm/helpers.c:252:3:  [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(m.protocol, "NTLMSSP");
data/binkd-1.1a-99/ntlm/helpers.c:276: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 nonce[8];
data/binkd-1.1a-99/ntlm/helpers.c:307:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(nonce, m.data + 24, 8);
data/binkd-1.1a-99/ntlm/helpers.c:310:3:  [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(m.protocol, "NTLMSSP");
data/binkd-1.1a-99/ntlm/md32_com.h:361: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.
	static const unsigned char end[4]={0x80,0x00,0x00,0x00};
data/binkd-1.1a-99/ntlm/set_key.c:70: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 odd_parity[256]={
data/binkd-1.1a-99/os2/dirent.c:42:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
     strcat(name,"\\*.*");
data/binkd-1.1a-99/os2/dirent.c:44:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
     strcat(name,"*.*");
data/binkd-1.1a-99/os2/dirent.h:22: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 d_name[256];
data/binkd-1.1a-99/os2/dirent.h:30: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[512];
data/binkd-1.1a-99/os2/ns_parse.h:74: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            name[MAXDNAME];
data/binkd-1.1a-99/perlhooks.c:604: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.
            { char sv_config[20];                                  \
data/binkd-1.1a-99/perlhooks.c:618: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 sv_config[20];                                            \
data/binkd-1.1a-99/perlhooks.c:628: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 sv_config[20];                                            \
data/binkd-1.1a-99/perlhooks.c:637: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 sv_state[20];                                         \
data/binkd-1.1a-99/perlhooks.c:654: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 sv_state[20];                                             \
data/binkd-1.1a-99/perlhooks.c:664: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 sv_state[20];                                             \
data/binkd-1.1a-99/perlhooks.c:912: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 bb[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:974: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 aa[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1066: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1094: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1300: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 buf[256];
data/binkd-1.1a-99/perlhooks.c:1529: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1616: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1737: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1819: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:1854: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[FTN_ADDR_SZ];
data/binkd-1.1a-99/perlhooks.c:2168: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[2];
data/binkd-1.1a-99/perlhooks.c:2226: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 inlog[20];
data/binkd-1.1a-99/perlhooks.c:2236:5:  [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(inlog, "__in_log_%u", (unsigned)PID());
data/binkd-1.1a-99/prothlp.c:116:5:  [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 (s, "%08lx.pkt", rnd ());
data/binkd-1.1a-99/prothlp.c:120:5:  [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 (s, "%08lx.req", rnd ());
data/binkd-1.1a-99/prothlp.c:133: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 (z, weekext[*z - '0'], 2);
data/binkd-1.1a-99/prothlp.c:137: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 ext[4];
data/binkd-1.1a-99/protoco2.h:67: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 expected_pwd[MAXPWDLEN + 1];
data/binkd-1.1a-99/protoco2.h:120: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 sysname[MAXSYSTEMNAME + 1];
data/binkd-1.1a-99/protoco2.h:121: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 sysop[MAXSYSOPNAME + 1];
data/binkd-1.1a-99/protoco2.h:122: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 location[MAXLOCATIONNAME + 1];
data/binkd-1.1a-99/protocol.c:68: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[4];
data/binkd-1.1a-99/protocol.c:290: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 msg_text[max (MAXPATHLEN, MAX_NETNAME) + 80];
data/binkd-1.1a-99/protocol.c:304: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 (state->sent_fls + state->n_sent_fls - 1,
data/binkd-1.1a-99/protocol.c:408: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.
          memcpy (state->optr, state->msgs[i].s, state->msgs[i].sz);
data/binkd-1.1a-99/protocol.c:652: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[MAXPATHLEN + 1], *w = 0;
data/binkd-1.1a-99/protocol.c:679: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).
      if ((flo = fopen (flopath, "r+b")) == 0)
data/binkd-1.1a-99/protocol.c:766: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 s[64];
data/binkd-1.1a-99/protocol.c:803:20:  [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).
    state->major = atoi (a + 6);
data/binkd-1.1a-99/protocol.c:804:20:  [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).
    state->minor = atoi (b + 1);
data/binkd-1.1a-99/protocol.c:942: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 szFTNAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/protocol.c:995: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 szFTNAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/protocol.c:1005: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(state->pAddr, config->pAddr, state->nAddr*sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:1023: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.
          char buf[FTN_ADDR_SZ];
data/binkd-1.1a-99/protocol.c:1037: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 buf[FTN_ADDR_SZ];
data/binkd-1.1a-99/protocol.c:1045:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->pAddr+state->nAddr-1, &(ps->fa), sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:1077: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 szFTNAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/protocol.c:1161: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[BINKD_FQDNLEN + 1];       /* current host/port */
data/binkd-1.1a-99/protocol.c:1174: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.
          memcpy(&sin, aiHead->ai_addr, aiHead->ai_addrlen);
data/binkd-1.1a-99/protocol.c:1370:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (state->fa + j, state->fa + j - 1, sizeof (FTN_ADDR));
data/binkd-1.1a-99/protocol.c:1371: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 (state->fa + state->nfa - 1, &fa, sizeof (FTN_ADDR));
data/binkd-1.1a-99/protocol.c:1413: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 (state->fa + state->nallfa - 1, &fa, sizeof (FTN_ADDR));
data/binkd-1.1a-99/protocol.c:1889: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 *argv[4], *w;
data/binkd-1.1a-99/protocol.c:1952: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 realname[MAXPATHLEN + 1];
data/binkd-1.1a-99/protocol.c:2096: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[MAXPATHLEN+1];
data/binkd-1.1a-99/protocol.c:2127:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f=fopen(buf, "w");
data/binkd-1.1a-99/protocol.c:2195: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 *argv[4];
data/binkd-1.1a-99/protocol.c:2221: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.
          memcpy (&tfile_buf, &state->out, sizeof (TFILE));
data/binkd-1.1a-99/protocol.c:2222: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.
          memcpy (&state->out, state->sent_fls + i, sizeof (TFILE));
data/binkd-1.1a-99/protocol.c:2223: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.
          memcpy (state->sent_fls + i, &tfile_buf, sizeof (TFILE));
data/binkd-1.1a-99/protocol.c:2227: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.
          memcpy (&state->out, state->sent_fls + i, sizeof (TFILE));
data/binkd-1.1a-99/protocol.c:2230:29:  [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 ((state->out.f = fopen (state->out.path, "rb")) == 0)
data/binkd-1.1a-99/protocol.c:2332: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 *argv[3];
data/binkd-1.1a-99/protocol.c:2356:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (&state->ND_addr, &state->sent_fls[n].fa, sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:2393: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 *argv[3];
data/binkd-1.1a-99/protocol.c:2426: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(&state->ND_addr, &state->out.fa, sizeof(state->out.fa));
data/binkd-1.1a-99/protocol.c:2449: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.
          char szAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/protocol.c:2454: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.
          memcpy (&state->ND_addr, &state->sent_fls[n].fa, sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:2504: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 nodestr[FTN_ADDR_SZ];
data/binkd-1.1a-99/protocol.c:2630: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.
          char zbuf[ZBLKSIZE];
data/binkd-1.1a-99/protocol.c:2776: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 szLocalTime[60];
data/binkd-1.1a-99/protocol.c:2787: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 s[MD_CHALLENGE_LEN*2+15]; /* max. length of opt string */
data/binkd-1.1a-99/protocol.c:2788: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(s, "OPT ");
data/binkd-1.1a-99/protocol.c:2880:16:  [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 (file->path, (file->type == 'l') ? "r+b" : "rb")) == 0 ||
data/binkd-1.1a-99/protocol.c:2891:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (&state->flo.fa, &file->fa, sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:2895: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 (&state->out.fa, &file->fa, sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:2931:16:  [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 (w ? w : state->out.path, "rb")) == 0 ||
data/binkd-1.1a-99/protocol.c:2948: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 (&state->out.fa, &state->flo.fa, sizeof(FTN_ADDR));
data/binkd-1.1a-99/protocol.c:3036: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 szFTNAddr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/protocol.c:3067: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 host[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/protocol.c:3068: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 ipaddr[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/protocol.c:3069: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 ownhost[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/protocol.c:3070: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 service[MAXSERVNAME + 1];
data/binkd-1.1a-99/protocol.c:3071: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 ownserv[MAXSERVNAME + 1];
data/binkd-1.1a-99/protocol.c:3103: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.
          memcpy(&peer_name, hres->ai_addr, hres->ai_addrlen);
data/binkd-1.1a-99/protocol.c:3193:22:  [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).
      state.our_port=atoi(ownserv);
data/binkd-1.1a-99/readcfg.c:54: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  linebuf[MAXCFGLINE + 1];
data/binkd-1.1a-99/readcfg.c:66:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p, data, size);
data/binkd-1.1a-99/readcfg.c:577: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 addr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/readcfg.c:645: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 ((in = fopen(filename, "rt")) == NULL)
data/binkd-1.1a-99/readcfg.c:693: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   *words[MAX_WORDS_ON_LINE];
data/binkd-1.1a-99/readcfg.c:696: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 ((in = fopen (path, "r")) == 0)
data/binkd-1.1a-99/readcfg.c:824: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(new_config, &work_config, sizeof(work_config));
data/binkd-1.1a-99/readcfg.c:1048: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 (work_config.pAddr + work_config.nAddr, &a, sizeof(FTN_ADDR));
data/binkd-1.1a-99/readcfg.c:1086:38:  [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).
    if ((*s && !isspace(*s)) || (z = atoi (words[2])) <= 0)
data/binkd-1.1a-99/readcfg.c:1124: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 *w[ARGNUM], *tmp, *pkt_pwd, *out_pwd, *pipe;
data/binkd-1.1a-99/readcfg.c:1382:13:  [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).
  *target = atoi (words[0]);
data/binkd-1.1a-99/readcfg.c:1980: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 szfa[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/readcfg.c:2034: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.
  static char buf[20];
data/binkd-1.1a-99/readcfg.c:2037:26:  [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.
  else if (rate < 0) c = sprintf(buf, "%ld%%", -rate);
data/binkd-1.1a-99/readcfg.c:2038:68:  [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.
  else if (rate >= (1 << 20) && (rate & ((1 << 20) - 1)) == 0) c = sprintf(buf, "%ldM", rate >> 20);
data/binkd-1.1a-99/readcfg.c:2039:68:  [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.
  else if (rate >= (1 << 10) && (rate & ((1 << 10) - 1)) == 0) c = sprintf(buf, "%ldk", rate >> 10);
data/binkd-1.1a-99/readcfg.c:2040:12:  [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.
  else c = sprintf(buf, "%ld", rate);
data/binkd-1.1a-99/readcfg.c:2048: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 szfa[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/readcfg.h:57: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 addr[42];
data/binkd-1.1a-99/readcfg.h:58: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 port[MAXSERVNAME + 1];
data/binkd-1.1a-99/readcfg.h:105: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       iport[MAXSERVNAME + 1];
data/binkd-1.1a-99/readcfg.h:106: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       oport[MAXSERVNAME + 1];
data/binkd-1.1a-99/readcfg.h:172: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       proxy[BINKD_FQDNLEN + 40];
data/binkd-1.1a-99/readcfg.h:173: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       socks[BINKD_FQDNLEN + 40];
data/binkd-1.1a-99/readcfg.h:176: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       root_domain[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/readcfg.h:177: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       sysname[MAXSYSTEMNAME + 1];
data/binkd-1.1a-99/readcfg.h:178: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       bindaddr[42];
data/binkd-1.1a-99/readcfg.h:179: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       sysop[MAXSYSOPNAME + 1];
data/binkd-1.1a-99/readcfg.h:180: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       location[MAXLOCATIONNAME + 1];
data/binkd-1.1a-99/readcfg.h:181: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       nodeinfo[MAXNODEINFO + 1];
data/binkd-1.1a-99/readcfg.h:182: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       inbound[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:183: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       inbound_nonsecure[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:184: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       temp_inbound[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:185: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       logpath[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:186: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       binlogpath[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:187: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       fdinhist[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:188: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       fdouthist[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:189: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       pid_file[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:190: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       passwords[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:192: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       tfilebox[MAXPATHLEN + 1];   /* FileBoxes dir */
data/binkd-1.1a-99/readcfg.h:193: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       bfilebox[MAXPATHLEN + 1];   /* BrakeBoxes dir */
data/binkd-1.1a-99/readcfg.h:197: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       zlib_dll[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:200: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       bzlib2_dll[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:204: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       perl_script[MAXPATHLEN + 1];
data/binkd-1.1a-99/readcfg.h:205: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       perl_dll[MAXPATHLEN + 1];
data/binkd-1.1a-99/readflo.c:30: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/readflo.c:72: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[MAXPATHLEN + 1];
data/binkd-1.1a-99/run.c:68:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(cs, " /C ");
data/binkd-1.1a-99/server.c:258: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 host[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/server.c:259: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 service[MAXSERVNAME + 1];
data/binkd-1.1a-99/snprintf.c:453: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 convert[20];
data/binkd-1.1a-99/snprintf.c:578: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 iconvert[20];
data/binkd-1.1a-99/snprintf.c:579: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 fconvert[20];
data/binkd-1.1a-99/snprintf.c:755: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 buf1[LONG_STRING];
data/binkd-1.1a-99/snprintf.c:756: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 buf2[LONG_STRING];
data/binkd-1.1a-99/srif.c:127: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).
  if ((out = fopen (path, "w")) != 0)
data/binkd-1.1a-99/srif.c:132: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 adr[FTN_ADDR_SZ + 1];
data/binkd-1.1a-99/srif.c:153: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 (rsp, "r");
data/binkd-1.1a-99/srif.c:157: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 buf[MAXPATHLEN + 1];
data/binkd-1.1a-99/srif.c:200: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 aka[4];
data/binkd-1.1a-99/srif.c:201: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 adr[FTN_ADDR_SZ + 2];
data/binkd-1.1a-99/srif.c:227:3:  [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(aka, "*A0");
data/binkd-1.1a-99/srif.c:237: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.
          char ts[MAXPATHLEN+1];
data/binkd-1.1a-99/srif.c:328: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 srf[MAXPATHLEN + 1], rsp[MAXPATHLEN + 1];
data/binkd-1.1a-99/srv_gai.c:38: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 tgt_port[6];
data/binkd-1.1a-99/srv_gai.c:43: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 tgt_name[BINKD_FQDNLEN + 1];
data/binkd-1.1a-99/srv_gai.c:44: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 resp[SRVGAI_DNSRESPLEN];
data/binkd-1.1a-99/srv_gai.c:80:6:  [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).
	    atoi(service) > 0)
data/binkd-1.1a-99/tools.c:122: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[MAXPATHLEN];
data/binkd-1.1a-99/tools.c:150: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 ((h = open (name, O_RDWR | O_CREAT | O_EXCL, 0666)) == -1)
data/binkd-1.1a-99/tools.c:159: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[16];
data/binkd-1.1a-99/tools.c:161: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 ((h = open (name, O_RDWR | O_CREAT | O_EXCL, 0666)) == -1)
data/binkd-1.1a-99/tools.c:184:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  threadsafe(memcpy(tm, gmtime(t), sizeof(*tm)));
data/binkd-1.1a-99/tools.c:267:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  threadsafe(memcpy(tm, localtime(t), sizeof(*tm)));
data/binkd-1.1a-99/tools.c:290: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[1024];
data/binkd-1.1a-99/tools.c:333:19:  [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).
        logfile = fopen (using_logpath, "a");
data/binkd-1.1a-99/tools.c:412:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    if (tolower (((char *) s1)[i]) != tolower (((char *) s2)[i]))
data/binkd-1.1a-99/tools.c:412:50:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    if (tolower (((char *) s1)[i]) != tolower (((char *) s2)[i]))
data/binkd-1.1a-99/tools.c:413:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      return (tolower (((char *) s1)[i]) - tolower (((char *) s2)[i]));
data/binkd-1.1a-99/tools.c:413:55:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      return (tolower (((char *) s1)[i]) - tolower (((char *) s2)[i]));
data/binkd-1.1a-99/tools.c:459:7:  [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 (r + i, "\\x%02x", *(unsigned char *) s);
data/binkd-1.1a-99/tools.c:648:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       memcpy(r+i, b, len_b);
data/binkd-1.1a-99/tools.c:676: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 ((h = open (path, O_WRONLY | O_TRUNC)) == -1)
data/binkd-1.1a-99/tools.c:722: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.
  static char os[80];
data/binkd-1.1a-99/tools.c:876:11:  [2] (integer) atol:
  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).
      l = atol(str);
data/binkd-1.1a-99/unix/daemonize.c:59:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open("/dev/tty", O_RDWR)) >= 0)
data/binkd-1.1a-99/unix/rename.c:37: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 ((h = open (to, O_CREAT | O_EXCL, 0666)) == -1)
data/binkd-1.1a-99/unix/setpttl.c:167:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	SETPROC_STATIC char buf[SPT_BUFSIZE];
data/binkd-1.1a-99/unix/setpttl.c:182:9:  [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.
	(void) strcpy(p, "binkd: ");
data/binkd-1.1a-99/unix/setpttl.c:208:10:  [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).
		kmem = open(_PATH_KMEM, O_RDWR, 0);
data/binkd-1.1a-99/zlibdl.c:58: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[256];
data/binkd-1.1a-99/zlibdl.c:91: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[256];
data/binkd-1.1a-99/client.c:360:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(host, proxy[0] ? proxy : socks, sizeof(host));
data/binkd-1.1a-99/dos/dirent.c:30: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(dirname);
data/binkd-1.1a-99/ftnnode.c:104: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 (pn->pwd, "-");
data/binkd-1.1a-99/ftnnode.c:264: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).
    sprintf (host+strlen(host), ":%s", port);
data/binkd-1.1a-99/ftnnode.c:269: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(host, "-");
data/binkd-1.1a-99/ftnq.c:117: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).
      if (outb_path[strlen (outb_path) - 1] == ':')
data/binkd-1.1a-99/ftnq.c:127: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).
      len = strlen (curr_domain->dir);
data/binkd-1.1a-99/ftnq.c:129: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).
      strnzcpy (buf + strlen (buf), PATH_SEPARATOR, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:129:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      strnzcpy (buf + strlen (buf), PATH_SEPARATOR, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:130: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).
      s = buf + strlen (buf);
data/binkd-1.1a-99/ftnq.c:150:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strnzcpy (buf + strlen (buf), de->d_name, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:150:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strnzcpy (buf + strlen (buf), de->d_name, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:265: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 = buf + strlen (buf);
data/binkd-1.1a-99/ftnq.c:335: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:335: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:342: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).
        s = buf + strlen(buf);
data/binkd-1.1a-99/ftnq.c:353: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:353: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:364: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).
	    buf[strlen(buf) - 1] = 'h';
data/binkd-1.1a-99/ftnq.c:371: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:371: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).
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
data/binkd-1.1a-99/ftnq.c:382: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).
	    buf[strlen(buf) - 1] = 'h';
data/binkd-1.1a-99/ftnq.c:426: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).
  char *s = path + strlen (path) - 4;
data/binkd-1.1a-99/ftnq.c:477: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 nlen = strlen(s = de->d_name);
data/binkd-1.1a-99/ftnq.c:485:13:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        if (sscanf(s = de->d_name, "%u.%u.%u.%u.%3s%n",
data/binkd-1.1a-99/ftnq.c:488:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    (size_t)matched != nlen || strlen(ext) != 3)
data/binkd-1.1a-99/ftnq.c:498: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).
        strnzcpy(buf + strlen(buf), PATH_SEPARATOR, sizeof(buf) - strlen(buf));
data/binkd-1.1a-99/ftnq.c:498:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strnzcpy(buf + strlen(buf), PATH_SEPARATOR, sizeof(buf) - strlen(buf));
data/binkd-1.1a-99/ftnq.c:499: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).
        strnzcpy(buf + strlen(buf), s, sizeof(buf) - strlen(buf));
data/binkd-1.1a-99/ftnq.c:499: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).
        strnzcpy(buf + strlen(buf), s, sizeof(buf) - strlen(buf));
data/binkd-1.1a-99/ftnq.c:535:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (j != 8 || strlen(s) != 12 || s[8] != '.' || strchr(s+9, '.'))
data/binkd-1.1a-99/ftnq.c:551: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).
	strnzcpy (buf + strlen (buf), PATH_SEPARATOR,
data/binkd-1.1a-99/ftnq.c:552: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).
		  sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:553: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).
	strnzcpy (buf + strlen (buf), s, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:553:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strnzcpy (buf + strlen (buf), s, sizeof (buf) - strlen (buf));
data/binkd-1.1a-99/ftnq.c:657: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 (p=str+strlen(str)-1; isspace(*p); *p--='\0');
data/binkd-1.1a-99/ftnq.c:1071: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).
		 (int) strlen (comment),
data/binkd-1.1a-99/getw.c:123: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).
	  dest = xrealloc (dest, strlen (src) + strlen (var) + 1);
data/binkd-1.1a-99/getw.c:123:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  dest = xrealloc (dest, strlen (src) + strlen (var) + 1);
data/binkd-1.1a-99/getw.c:125:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  i += strlen (var) - 1;
data/binkd-1.1a-99/https.c:98:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, proxy, sizeof(buf));
data/binkd-1.1a-99/https.c:116: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).
				sp1=malloc(strlen(sp)*4/3 + 4);
data/binkd-1.1a-99/https.c:117:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				sp1[enbase64(sp, strlen(sp), sp1)] = 0;
data/binkd-1.1a-99/https.c:124:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(buf, socks, sizeof(buf)-6);
data/binkd-1.1a-99/https.c:141: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).
				if (sizeof(buf)>strlen(buf)+3) strcat(buf, "\r\n");
data/binkd-1.1a-99/https.c:142:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				i = strlen(buf);
data/binkd-1.1a-99/https.c:216: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 (strlen(buf)+3<sizeof(buf)) strcat(buf, "\r\n\r\n");
data/binkd-1.1a-99/https.c:217: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).
						send(so, buf, strlen(buf), 0);
data/binkd-1.1a-99/https.c:239:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, socks, sizeof(buf));
data/binkd-1.1a-99/https.c:287: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).
				if (!sp) i=strlen(sauth);
data/binkd-1.1a-99/https.c:295:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					buf[i++]=strlen(sp);
data/binkd-1.1a-99/https.c:297:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					i+=strlen(sp);
data/binkd-1.1a-99/https.c:343: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).
					i = strlen(host);
data/binkd-1.1a-99/inbound.c:53: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).
  t = s + strlen (s);
data/binkd-1.1a-99/inbound.c:132: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).
  t = s + strlen (s);
data/binkd-1.1a-99/inbound.c:290: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).
         !strncmp(config->temp_inbound,buf,strlen(config->temp_inbound)) )
data/binkd-1.1a-99/inbound.c:391: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).
  i = strlen(real_name); check = 0;
data/binkd-1.1a-99/inbound.c:394:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(config->pkthdr_bad)+1;
data/binkd-1.1a-99/inbound.c:474: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).
  s = real_name + strlen (real_name);
data/binkd-1.1a-99/inbound.c:513: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).
    s = real_name + strlen (real_name);
data/binkd-1.1a-99/inbound.c:545: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).
          s = real_name + strlen (real_name);
data/binkd-1.1a-99/inbound.c:595: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).
  s = fp + strlen (fp);
data/binkd-1.1a-99/inbound.c:600: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).
  s = fp + strlen (fp);
data/binkd-1.1a-99/md5b.c:427: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).
    hmac_md5((void *)rnd->peer_name, strlen(rnd->peer_name), digest, sizeof(digest), digest);
data/binkd-1.1a-99/md5b.c:490: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).
  hmac_md5(challenge+1, challenge[0], (void *)pw, strlen(pw), digest);
data/binkd-1.1a-99/nt/TCPErr.c:83: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).
    len = strlen(cp)+30;
data/binkd-1.1a-99/nt/dirwin32.c:32:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(fmask, mask, sizeof(fmask)-2);
data/binkd-1.1a-99/nt/dirwin32.c:34: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).
    ch = fmask + strlen(fmask) - 1;
data/binkd-1.1a-99/nt/dirwin32.c:42:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dir->de.d_name, dt.name, sizeof(dir->de.d_name));
data/binkd-1.1a-99/nt/dirwin32.c:56:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dir->de.d_name, dt.name, sizeof(dir->de.d_name));
data/binkd-1.1a-99/nt/service.c:275: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).
      for(i=argc=0;args[i];i+=strlen(args+i)+1) argc++;
data/binkd-1.1a-99/nt/service.c:277: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).
      for(i=argc=0;args[i];i+=strlen(args+i)+1) serv_argv[argc++]=args+i;
data/binkd-1.1a-99/nt/service.c:461:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     &&(RegSetValueEx(hk, "path", 0, path_REG_type, (BYTE*)sp, strlen(sp))==ERROR_SUCCESS)
data/binkd-1.1a-99/nt/tray.c:135:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(nd.szTip, buf, 63);
data/binkd-1.1a-99/nt/w32tools.c:147: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).
    l += strlen(argv[i]) + 1;
data/binkd-1.1a-99/nt/win9x.c:113: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).
      int len_sn = strlen(service_name);
data/binkd-1.1a-99/nt/win9x.c:114: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).
      int len_pr = strlen(Win9xServPrefix);
data/binkd-1.1a-99/nt/win9x.c:136: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).
  tmplen1 = strlen(Win9xRegParm);
data/binkd-1.1a-99/nt/win9x.c:137: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).
  tmplen2 = strlen(srvname);
data/binkd-1.1a-99/nt/win9x.c:467: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).
    prefixlen = strlen(Win9xServPrefix);
data/binkd-1.1a-99/nt/win9x.c:473: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).
      len = strlen(tmp);
data/binkd-1.1a-99/nt/win9x.c:661:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    tmplen2 = strlen(Win9xStartService);
data/binkd-1.1a-99/ntlm/helpers.c:62: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).
    int   len = strlen(passw);
data/binkd-1.1a-99/ntlm/helpers.c:86: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).
    len = strlen(passw);
data/binkd-1.1a-99/ntlm/helpers.c:255: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).
  m.dom_len1 = m.dom_len2 = mkls(strlen(domain));
data/binkd-1.1a-99/ntlm/helpers.c:256: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).
  m.host_len1 = m.host_len2 = mkls(strlen(host));
data/binkd-1.1a-99/ntlm/helpers.c:258: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).
  m.dom_off = mkls(0x20 + strlen(host));
data/binkd-1.1a-99/ntlm/helpers.c:260: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).
  strcpy(m.host_dom + strlen(host), domain);
data/binkd-1.1a-99/ntlm/helpers.c:314: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).
  m.dom_len = m.dom_len1 = mkls(strlen(domain)*2);
data/binkd-1.1a-99/ntlm/helpers.c:316: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).
  m.user_len = m.user_len1 = mkls(strlen(user)*2);
data/binkd-1.1a-99/ntlm/helpers.c:317: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).
  m.user_off = mkls(0x40 + strlen(domain)*2);
data/binkd-1.1a-99/ntlm/helpers.c:318: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).
  m.host_len = m.host_len1 = mkls(strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:319: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).
  m.host_off = mkls(0x40 + strlen(domain)*2 + strlen(user)*2);
data/binkd-1.1a-99/ntlm/helpers.c:319:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m.host_off = mkls(0x40 + strlen(domain)*2 + strlen(user)*2);
data/binkd-1.1a-99/ntlm/helpers.c:320: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).
  m.lm_resp_off = mkls(0x40 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:320:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m.lm_resp_off = mkls(0x40 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:320:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m.lm_resp_off = mkls(0x40 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:321: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).
  m.nt_resp_off = mkls(0x58 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:321:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m.nt_resp_off = mkls(0x58 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/ntlm/helpers.c:321:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m.nt_resp_off = mkls(0x58 + strlen(domain)*2 + strlen(user)*2 + strlen(host)*2);
data/binkd-1.1a-99/os2/dirent.c:35: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(dirname);
data/binkd-1.1a-99/perlhooks.c:760: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).
      (void) hv_store(_hv, _name, strlen(_name), _sv, 0);     \
data/binkd-1.1a-99/perlhooks.c:765: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).
      (void) hv_store(_hv, _name, strlen(_name), _sv, 0);                \
data/binkd-1.1a-99/perlhooks.c:767: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).
    else (void) hv_store(_hv, _name, strlen(_name), &sv_undef, 0);
data/binkd-1.1a-99/perlhooks.c:771: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).
      (void) hv_store(_hv, _name, strlen(_name), _sv, 0);                \
data/binkd-1.1a-99/perlhooks.c:1931:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(state->expected_pwd, SvPV(passwd, len), sizeof(state->expected_pwd));
data/binkd-1.1a-99/perlhooks.c:1933:47:  [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.
          if (state->expected_pwd[0] == '\0') strcpy(state->expected_pwd, "-");
data/binkd-1.1a-99/prothlp.c:130: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 (strlen (++z) == 3)
data/binkd-1.1a-99/prothlp.c:143:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	  if (sscanf(s, "%lu.%lu.%lu.%lu.%3s", &zone, &net, &node, &p, ext) == 5){
data/binkd-1.1a-99/protocol.c:95:3:  [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(state->expected_pwd, "-");
data/binkd-1.1a-99/protocol.c:264: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).
  state->msgs[state->n_msgs].sz = strlen (s1) + strlen (s2) + 1;
data/binkd-1.1a-99/protocol.c:264: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).
  state->msgs[state->n_msgs].sz = strlen (s1) + strlen (s2) + 1;
data/binkd-1.1a-99/protocol.c:691: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).
      for (i = strlen (buf) - 1; i >= 0 && isspace (buf[i]); --i)
data/binkd-1.1a-99/protocol.c:961: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).
            memset(c, ' ', strlen(w));
data/binkd-1.1a-99/protocol.c:980:15:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
              strcat(ad, " ");
data/binkd-1.1a-99/protocol.c:1055:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat (szAkas, " ");
data/binkd-1.1a-99/protocol.c:1098: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).
        ss = xalloc(strlen(s) + strlen(ad) + 1);
data/binkd-1.1a-99/protocol.c:1098: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).
        ss = xalloc(strlen(s) + strlen(ad) + 1);
data/binkd-1.1a-99/protocol.c:1102: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).
        s[sz = sz + strlen(ad)] = 0;
data/binkd-1.1a-99/protocol.c:1122:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(state->expected_pwd, (state->to->out_pwd ? state->to->out_pwd : "-"), sizeof(state->expected_pwd));
data/binkd-1.1a-99/protocol.c:2552:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      no = read (state->s_in, state->ibuf + state->iread, sz - state->iread);
data/binkd-1.1a-99/protocol.c:3045: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 (szFTNAddr, "?");
data/binkd-1.1a-99/protocol.c:3161:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (state.peer_name[strlen(state.peer_name)-1] == '.')
data/binkd-1.1a-99/protocol.c:3162: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).
    state.peer_name[strlen(state.peer_name)-1] = '\0';
data/binkd-1.1a-99/protocol.c:3414:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      no = read (socket_in, state.ibuf, BLK_HDR_SIZE + MAX_BLKSIZE);
data/binkd-1.1a-99/readcfg.c:231: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(c->inbound, ".");
data/binkd-1.1a-99/readcfg.c:504: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).
        s = obox+strlen(pd->path);
data/binkd-1.1a-99/readcfg.c:512: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).
        s = OBOX+strlen(PATH);
data/binkd-1.1a-99/readcfg.c:966: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).
    char *w = s + strlen (s) - 1;
data/binkd-1.1a-99/readcfg.c:1350: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).
    w = target + strlen (target) - 1;
data/binkd-1.1a-99/readcfg.c:1645:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(new_entry.addr, words[i], sizeof(new_entry.addr));
data/binkd-1.1a-99/readcfg.c:1986: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).
  pwd_len = strlen(fn->pwd);
data/binkd-1.1a-99/readcfg.c:1987: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 (fn->pkt_pwd) pwd_len += strlen(fn->pkt_pwd)+1; else pwd_len += 2;
data/binkd-1.1a-99/readcfg.c:1988: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 (fn->out_pwd) pwd_len += strlen(fn->out_pwd)+1; else pwd_len += 2;
data/binkd-1.1a-99/readcfg.c:1992:12:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(strcat(pwd, ","), (fn->pkt_pwd) ? fn->pkt_pwd : "-");
data/binkd-1.1a-99/readcfg.c:1993:12:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(strcat(pwd, ","), (fn->out_pwd) ? fn->out_pwd : "-");
data/binkd-1.1a-99/readflo.c:38:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (i = strlen (buf) - 1; i >= 0 && isspace (buf[i]); --i)
data/binkd-1.1a-99/rfc2553.c:48: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).
   if (servname != NULL && End != servname + strlen(servname))
data/binkd-1.1a-99/rfc2553.c:246:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(host,Ent->h_name,hostlen);
data/binkd-1.1a-99/rfc2553.c:273:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	 strncpy(host,inet_ntoa(sin->sin_addr),hostlen);
data/binkd-1.1a-99/rfc2553.c:291:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(serv,Ent->s_name, servlen);
data/binkd-1.1a-99/run.c:65: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).
  cs=(char*)malloc(strlen(sp)+strlen(cmd)+6);
data/binkd-1.1a-99/run.c:65: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).
  cs=(char*)malloc(strlen(sp)+strlen(cmd)+6);
data/binkd-1.1a-99/snprintf.c:721:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return(strlen(str));
data/binkd-1.1a-99/snprintf.c:746:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return(strlen(str));
data/binkd-1.1a-99/srif.c:223: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 (sw<=strlen(cmd)) sw=strlen(cmd)+1;
data/binkd-1.1a-99/srif.c:223: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 (sw<=strlen(cmd)) sw=strlen(cmd)+1;
data/binkd-1.1a-99/srif.c:229: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).
  for (l=0; (l<strlen(w)) && ((sp=strchr(w+l, '*'))!=NULL); l++)
data/binkd-1.1a-99/srif.c:268: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).
	    pa += strlen(pa);
data/binkd-1.1a-99/srif.c:279:11:  [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(adr, "-");
data/binkd-1.1a-99/srif.c:283: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).
          i=strlen(adr);
data/binkd-1.1a-99/srv_gai.c:88:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    srv_name_size = 1 + strlen(service) + 2 + 3 + 1 + strlen(node) + 1;
data/binkd-1.1a-99/srv_gai.c:88: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).
    srv_name_size = 1 + strlen(service) + 2 + 3 + 1 + strlen(node) + 1;
data/binkd-1.1a-99/tools.c:100:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (path0[strlen (path0) - 1] == ':')
data/binkd-1.1a-99/tools.c:166: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 ((i = write(h, buf, strlen(buf))) != (int)strlen(buf))
data/binkd-1.1a-99/tools.c:166: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).
  if ((i = write(h, buf, strlen(buf))) != (int)strlen(buf))
data/binkd-1.1a-99/tools.c:170: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).
      Log (2, "Can't write %d bytes to %s, wrote only %d", strlen(buf), name, i);
data/binkd-1.1a-99/tools.c:309:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char ch = (0 <= lev && lev < (int) strlen (marks)) ? marks[lev] : ' ';
data/binkd-1.1a-99/tools.c:450: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).
  char *r = xalloc (strlen (s) * 4 + 1);
data/binkd-1.1a-99/tools.c:522:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  return strncpy (dst, src, len - 1);
data/binkd-1.1a-99/tools.c:527:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t x = strlen (dst);
data/binkd-1.1a-99/tools.c:616: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 len_a=a?strlen(a):0;
data/binkd-1.1a-99/tools.c:617: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 len_b=b?strlen(b):0;
data/binkd-1.1a-99/tools.c:623:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     sz=strlen(s)+1;
data/binkd-1.1a-99/tools.c:627: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).
   sr=strlen(r);
data/binkd-1.1a-99/tools.c:724:3:  [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 (os, "/");
data/binkd-1.1a-99/unix/setpttl.c:132:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		envpsize += strlen(envp[i]) + 1;
data/binkd-1.1a-99/unix/setpttl.c:150:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					strlen(argv[argc - 1]) + 1 + envpsize)))
data/binkd-1.1a-99/unix/setpttl.c:154: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).
		LastArgv = envp[i - 1] + strlen(envp[i - 1]);
data/binkd-1.1a-99/unix/setpttl.c:156: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).
		LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
data/binkd-1.1a-99/unix/setpttl.c:183:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	p += strlen(p);
data/binkd-1.1a-99/unix/setpttl.c:190:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	i = strlen(buf);
data/binkd-1.1a-99/xalloc.c:42: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).
  void *p = xalloc (strlen (str) + 1);
data/binkd-1.1a-99/xalloc.c:50: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).
  int n = strlen (*str);
data/binkd-1.1a-99/xalloc.c:52: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).
  *str = (char *)xrealloc (*str, n + strlen (s2) + 1);

ANALYSIS SUMMARY:

Hits = 644
Lines analyzed = 30361 in approximately 0.85 seconds (35641 lines/second)
Physical Source Lines of Code (SLOC) = 22970
Hits@level = [0] 116 [1] 175 [2] 374 [3]  21 [4]  73 [5]   1
Hits@level+ = [0+] 760 [1+] 644 [2+] 469 [3+]  95 [4+]  74 [5+]   1
Hits/KSLOC@level+ = [0+] 33.0866 [1+] 28.0366 [2+] 20.4179 [3+] 4.13583 [4+] 3.22159 [5+] 0.043535
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.