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/cyrus-imspd-1.8/imsp/abook_ldap.c
Examining data/cyrus-imspd-1.8/imsp/abook_ldap.h
Examining data/cyrus-imspd-1.8/imsp/alock.h
Examining data/cyrus-imspd-1.8/imsp/authize.h
Examining data/cyrus-imspd-1.8/imsp/bb.c
Examining data/cyrus-imspd-1.8/imsp/bb.h
Examining data/cyrus-imspd-1.8/imsp/im_util.h
Examining data/cyrus-imspd-1.8/imsp/imap_client.h
Examining data/cyrus-imspd-1.8/imsp/imsp_server.h
Examining data/cyrus-imspd-1.8/imsp/login_krb.c
Examining data/cyrus-imspd-1.8/imsp/login_unix.c
Examining data/cyrus-imspd-1.8/imsp/login_unix_shadow.c
Examining data/cyrus-imspd-1.8/imsp/option.h
Examining data/cyrus-imspd-1.8/imsp/proxy_krb.c
Examining data/cyrus-imspd-1.8/imsp/proxy_unix.c
Examining data/cyrus-imspd-1.8/imsp/proxy_unix_shadow.c
Examining data/cyrus-imspd-1.8/imsp/sasl_support.h
Examining data/cyrus-imspd-1.8/imsp/imsp_server.c
Examining data/cyrus-imspd-1.8/imsp/im_util.c
Examining data/cyrus-imspd-1.8/imsp/main.c
Examining data/cyrus-imspd-1.8/imsp/adate.c
Examining data/cyrus-imspd-1.8/imsp/authize.c
Examining data/cyrus-imspd-1.8/imsp/imap_client.c
Examining data/cyrus-imspd-1.8/imsp/sasl_support.c
Examining data/cyrus-imspd-1.8/imsp/alock.c
Examining data/cyrus-imspd-1.8/imsp/option.c
Examining data/cyrus-imspd-1.8/imsp/abook.c
Examining data/cyrus-imspd-1.8/imsp/abook.h
Examining data/cyrus-imspd-1.8/imsp/dispatch.c
Examining data/cyrus-imspd-1.8/imsp/syncdb.c
Examining data/cyrus-imspd-1.8/imsp/version.h
Examining data/cyrus-imspd-1.8/imsp/imsp.h
Examining data/cyrus-imspd-1.8/imsp/dispatch.h
Examining data/cyrus-imspd-1.8/imsp/syncdb.h
Examining data/cyrus-imspd-1.8/lib/acl.c
Examining data/cyrus-imspd-1.8/lib/acl.h
Examining data/cyrus-imspd-1.8/lib/acl_afs.c
Examining data/cyrus-imspd-1.8/lib/acte.c
Examining data/cyrus-imspd-1.8/lib/acte_krb.c
Examining data/cyrus-imspd-1.8/lib/assert.c
Examining data/cyrus-imspd-1.8/lib/assert.h
Examining data/cyrus-imspd-1.8/lib/auth.h
Examining data/cyrus-imspd-1.8/lib/auth_krb.c
Examining data/cyrus-imspd-1.8/lib/auth_krb_pts.c
Examining data/cyrus-imspd-1.8/lib/auth_krb_pts.h
Examining data/cyrus-imspd-1.8/lib/auth_trivial.c
Examining data/cyrus-imspd-1.8/lib/bsearch.c
Examining data/cyrus-imspd-1.8/lib/bsearch.h
Examining data/cyrus-imspd-1.8/lib/charset.c
Examining data/cyrus-imspd-1.8/lib/charset.h
Examining data/cyrus-imspd-1.8/lib/chartable.h
Examining data/cyrus-imspd-1.8/lib/exitcodes.h
Examining data/cyrus-imspd-1.8/lib/ftruncate.c
Examining data/cyrus-imspd-1.8/lib/gai.h
Examining data/cyrus-imspd-1.8/lib/getaddrinfo.c
Examining data/cyrus-imspd-1.8/lib/getdtablesize.c
Examining data/cyrus-imspd-1.8/lib/getnameinfo.c
Examining data/cyrus-imspd-1.8/lib/glob.h
Examining data/cyrus-imspd-1.8/lib/gmtoff.h
Examining data/cyrus-imspd-1.8/lib/gmtoff_gmtime.c
Examining data/cyrus-imspd-1.8/lib/gmtoff_tm.c
Examining data/cyrus-imspd-1.8/lib/hash.c
Examining data/cyrus-imspd-1.8/lib/hash.h
Examining data/cyrus-imspd-1.8/lib/imclient.h
Examining data/cyrus-imspd-1.8/lib/imparse.c
Examining data/cyrus-imspd-1.8/lib/imparse.h
Examining data/cyrus-imspd-1.8/lib/iptostring.h
Examining data/cyrus-imspd-1.8/lib/is.c
Examining data/cyrus-imspd-1.8/lib/lock.h
Examining data/cyrus-imspd-1.8/lib/lock_fcntl.c
Examining data/cyrus-imspd-1.8/lib/lock_flock.c
Examining data/cyrus-imspd-1.8/lib/map.h
Examining data/cyrus-imspd-1.8/lib/map_nommap.c
Examining data/cyrus-imspd-1.8/lib/map_private.c
Examining data/cyrus-imspd-1.8/lib/map_shared.c
Examining data/cyrus-imspd-1.8/lib/map_stupidshared.c
Examining data/cyrus-imspd-1.8/lib/memmove.c
Examining data/cyrus-imspd-1.8/lib/mkchartable.c
Examining data/cyrus-imspd-1.8/lib/mkgmtime.c
Examining data/cyrus-imspd-1.8/lib/mkgmtime.h
Examining data/cyrus-imspd-1.8/lib/mpool.c
Examining data/cyrus-imspd-1.8/lib/mpool.h
Examining data/cyrus-imspd-1.8/lib/n_binsearch.c
Examining data/cyrus-imspd-1.8/lib/nonblock.h
Examining data/cyrus-imspd-1.8/lib/nonblock_fcntl.c
Examining data/cyrus-imspd-1.8/lib/nonblock_ioctl.c
Examining data/cyrus-imspd-1.8/lib/parseaddr.c
Examining data/cyrus-imspd-1.8/lib/parseaddr.h
Examining data/cyrus-imspd-1.8/lib/prot.c
Examining data/cyrus-imspd-1.8/lib/prot.h
Examining data/cyrus-imspd-1.8/lib/retry.c
Examining data/cyrus-imspd-1.8/lib/retry.h
Examining data/cyrus-imspd-1.8/lib/strcasecmp.c
Examining data/cyrus-imspd-1.8/lib/strerror.c
Examining data/cyrus-imspd-1.8/lib/sysexits.h
Examining data/cyrus-imspd-1.8/lib/util.h
Examining data/cyrus-imspd-1.8/lib/xmalloc.c
Examining data/cyrus-imspd-1.8/lib/xmalloc.h
Examining data/cyrus-imspd-1.8/lib/imclient.c
Examining data/cyrus-imspd-1.8/lib/auth_unix.c
Examining data/cyrus-imspd-1.8/lib/glob.c
Examining data/cyrus-imspd-1.8/lib/util.c
Examining data/cyrus-imspd-1.8/lib/iptostring.c
Examining data/cyrus-imspd-1.8/lib/acte.h
Examining data/cyrus-imspd-1.8/acconfig.h

FINAL RESULTS:

data/cyrus-imspd-1.8/imsp/abook.c:86: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.
    snprintf(dbname, maxout, abookdb, ownerlen, name, name);
data/cyrus-imspd-1.8/imsp/abook.c:153:11:  [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(cname, name);
data/cyrus-imspd-1.8/imsp/abook.c:527: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.
    snprintf(acldb, sizeof(acldb), abooksudb, ownerlen, name);
data/cyrus-imspd-1.8/imsp/abook.c:595:2:  [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(dbname, sizeof(dbname), abooksudb, ownerlen, name);
data/cyrus-imspd-1.8/imsp/abook.c:678:2:  [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(dbsrc, sizeof(dbsrc), abooksudb, osrclen, name);
data/cyrus-imspd-1.8/imsp/abook.c:684: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.
    snprintf(dbdst, sizeof(dbdst), abooksudb, odstlen, newname);
data/cyrus-imspd-1.8/imsp/abook.c:758:2:  [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(acldb, sizeof(acldb), abooksudb, ownerlen, name);
data/cyrus-imspd-1.8/imsp/abook.c:1013: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.
    snprintf(dbname, sizeof(dbname), abooksdb, auth_username(id));
data/cyrus-imspd-1.8/imsp/abook_ldap.c:126:5:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
    syslog(LOG_ERR, reason, optname);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:1018:16:  [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).
		  fptr->data=strcat(fptr->data, values[0]);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:1019:16:  [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).
		  fptr->data=strcat(fptr->data, config.map[i].append);
data/cyrus-imspd-1.8/imsp/alock.c:89:2:  [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(key->dbname, sizeof(key->dbname), alockdb,
data/cyrus-imspd-1.8/imsp/alock.c:93:2:  [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(key->dbname, sizeof(key->dbname), alockdb, strlen(user), user);
data/cyrus-imspd-1.8/imsp/alock.c:94:2:  [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(key->key, item1);
data/cyrus-imspd-1.8/imsp/authize.c:97: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(id->user, user);
data/cyrus-imspd-1.8/imsp/bb.c:132:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(hand->entry + hand->used, "%s\t%s\t", value, bits);
data/cyrus-imspd-1.8/imsp/bb.c:226:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(hand->mlist + hand->mused, "%c%c%s",
data/cyrus-imspd-1.8/imsp/bb.c:549: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(newval, value ? value : noinfosub);
data/cyrus-imspd-1.8/imsp/bb.c:1059: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(value, uid);
data/cyrus-imspd-1.8/imsp/bb.c:1343: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(new, uid);
data/cyrus-imspd-1.8/imsp/bb.c:1344:7:  [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(new, scan);
data/cyrus-imspd-1.8/imsp/im_util.c:190:17:  [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).
    if (result) strcpy(result, start);
data/cyrus-imspd-1.8/imsp/im_util.c:214:17:  [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).
    if (result) strcpy(result, start);
data/cyrus-imspd-1.8/imsp/im_util.c:251:14:  [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).
	if (result) strcpy(result, start);
data/cyrus-imspd-1.8/imsp/im_util.c:470:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			    strcpy(wkptr, astr);
data/cyrus-imspd-1.8/imsp/im_util.c:482:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			    strcpy(wkptr, astr);
data/cyrus-imspd-1.8/imsp/im_util.c:490:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(wkptr, "{%d}\r\n%s", len, astr);
data/cyrus-imspd-1.8/imsp/imap_client.c:201: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(con->host, host);
data/cyrus-imspd-1.8/imsp/imsp_server.c:270:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf((tag) + strlen(tag), " %s", (str)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:274:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf((tag) + strlen(tag), (str), (arg1)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:278:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf((tag) + strlen(tag), (str), (arg1), (arg2)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:475:2:  [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(at, auth_type);
data/cyrus-imspd-1.8/imsp/imsp_server.c:1525:2:  [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(tagbuf, sizeof(tagbuf), msg_alert, p);
data/cyrus-imspd-1.8/imsp/imsp_server.c:1535: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.
    snprintf(tagbuf, sizeof(tagbuf), msg_greeting, VERSION);
data/cyrus-imspd-1.8/imsp/imsp_server.c:1566: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(tagbuf, tag);
data/cyrus-imspd-1.8/imsp/login_unix.c:40:18:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    extern char *crypt();
data/cyrus-imspd-1.8/imsp/login_unix.c:45:32:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    if (strcmp(pwd->pw_passwd, crypt(pass, pwd->pw_passwd)) != 0) {
data/cyrus-imspd-1.8/imsp/login_unix_shadow.c:41:18:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    extern char *crypt();
data/cyrus-imspd-1.8/imsp/login_unix_shadow.c:46:30:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    if (strcmp(pwd->sp_pwdp, crypt(pass, pwd->sp_pwdp)) != 0) {
data/cyrus-imspd-1.8/imsp/main.c:106:2:  [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(host, iaddr);
data/cyrus-imspd-1.8/imsp/main.c:110:2:  [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(host, hent->h_name);
data/cyrus-imspd-1.8/imsp/option.c:111: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.
    snprintf(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:124: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.
    snprintf(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:142:2:  [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(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:241: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->buf, val);
data/cyrus-imspd-1.8/imsp/option.c:277:2:  [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(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:302: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(result, value);
data/cyrus-imspd-1.8/imsp/option.c:324:2:  [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(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:453: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.
    snprintf(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:502: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.
    snprintf(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:509: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(dbname, options);
data/cyrus-imspd-1.8/imsp/option.c:563: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(newval + 2, value);
data/cyrus-imspd-1.8/imsp/option.c:588: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.
    snprintf(dbname, sizeof(dbname), optiondb, user);
data/cyrus-imspd-1.8/imsp/option.c:595: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(dbname, options);
data/cyrus-imspd-1.8/imsp/proxy_krb.c:88: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(phost, krb_get_phost(lhost));
data/cyrus-imspd-1.8/imsp/sasl_support.c:240:6:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	    snprintf(replybuf, sizeof(replybuf),
data/cyrus-imspd-1.8/imsp/syncdb.c:564: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.
    snprintf(newname, sizeof(newname), newext, c->db);
data/cyrus-imspd-1.8/imsp/syncdb.c:571:2:  [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(oldc.db, c->db);
data/cyrus-imspd-1.8/imsp/syncdb.c:822:2:  [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(lname, c->db);
data/cyrus-imspd-1.8/imsp/syncdb.c:852: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(dbname, citem->db);
data/cyrus-imspd-1.8/imsp/syncdb.c:879: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(citem->db, dbname);
data/cyrus-imspd-1.8/lib/acl.h:106:20:  [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.
		   int mode, int access,
data/cyrus-imspd-1.8/lib/acl_afs.c:111:36:  [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.
int acl_set(acl, identifier, mode, access, canonproc, canonrock)
data/cyrus-imspd-1.8/lib/acl_afs.c:115:5:  [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.
int access;
data/cyrus-imspd-1.8/lib/acl_afs.c:133:2:  [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(newidentifier+1, canonid);
data/cyrus-imspd-1.8/lib/acl_afs.c:136:48:  [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.
	    access = ~(canonproc(canonrock, canonid, ~access));
data/cyrus-imspd-1.8/lib/acl_afs.c:145:48:  [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.
	    access = canonproc(canonrock, identifier, access);
data/cyrus-imspd-1.8/lib/acl_afs.c:182:2:  [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.
	access |= oldaccess;
data/cyrus-imspd-1.8/lib/acl_afs.c:186:24:  [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.
	access = oldaccess & ~access;
data/cyrus-imspd-1.8/lib/acl_afs.c:192:2:  [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(thisid, nextid);
data/cyrus-imspd-1.8/lib/acl_afs.c:199:2:  [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(newacl + (thisid - *acl), identifier);
data/cyrus-imspd-1.8/lib/acl_afs.c:201:23:  [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.
	(void) acl_masktostr(access, newacl + strlen(newacl));
data/cyrus-imspd-1.8/lib/acl_afs.c:203: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(newacl, nextid);
data/cyrus-imspd-1.8/lib/acte_krb.c:204: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(realm, krb_realmofhost(host_name->h_name));
data/cyrus-imspd-1.8/lib/acte_krb.c:222:6:  [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(user, uinst);
data/cyrus-imspd-1.8/lib/acte_krb.c:226:6:  [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(user, urealm);
data/cyrus-imspd-1.8/lib/acte_krb.c:236: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(kstate->service, service);
data/cyrus-imspd-1.8/lib/acte_krb.c:240: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(kstate->user, user);
data/cyrus-imspd-1.8/lib/acte_krb.c:247: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(kstate->instance, instance);
data/cyrus-imspd-1.8/lib/acte_krb.c:248: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(kstate->realm, realm);
data/cyrus-imspd-1.8/lib/acte_krb.c:337:2:  [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(&authent.dat[8], kstate->user);
data/cyrus-imspd-1.8/lib/acte_krb.c:383: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(instance, krb_get_phost(hostname));
data/cyrus-imspd-1.8/lib/acte_krb.c:457: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(kstate->service, service);
data/cyrus-imspd-1.8/lib/acte_krb.c:586:2:  [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(kstate->user, input+8);
data/cyrus-imspd-1.8/lib/acte_krb.c:594: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(clientname, kstate->kdata.pname);
data/cyrus-imspd-1.8/lib/acte_krb.c:597: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(clientname, kstate->kdata.pinst);
data/cyrus-imspd-1.8/lib/acte_krb.c:601: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(clientname, kstate->kdata.prealm);
data/cyrus-imspd-1.8/lib/acte_krb.c:809:2:  [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(cell, realm);
data/cyrus-imspd-1.8/lib/acte_krb.c:827: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(phost, krb_get_phost(hostname));
data/cyrus-imspd-1.8/lib/acte_krb.c:864:14:  [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.
extern char *crypt();
data/cyrus-imspd-1.8/lib/acte_krb.c:896:26:  [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.
    strncpy((void *)key, crypt(password, "p1") + 2, sizeof(des_cblock));
data/cyrus-imspd-1.8/lib/auth_krb.c:226: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(localuser, aname);
data/cyrus-imspd-1.8/lib/auth_krb.c:229: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(localuser, inst);
data/cyrus-imspd-1.8/lib/auth_krb.c:233: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(localuser, realm);
data/cyrus-imspd-1.8/lib/auth_krb.c:290: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(retbuf, p);
data/cyrus-imspd-1.8/lib/auth_krb.c:294: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(retbuf, aname);
data/cyrus-imspd-1.8/lib/auth_krb.c:297: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(retbuf, inst);
data/cyrus-imspd-1.8/lib/auth_krb.c:301: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(retbuf, realm);
data/cyrus-imspd-1.8/lib/auth_krb.c:324: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(newstate->userid, identifier);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:212: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(localuser, aname);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:215:17:  [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(localuser, inst);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:219:17:  [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(localuser, realm);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:291: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(retbuf, p);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:295: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(retbuf, aname);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:298: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(retbuf, inst);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:302: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(retbuf, realm);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:356: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(newstate->userid.id, identifier);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:387: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(fnamebuf, STATEDIR);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:388: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(fnamebuf, PTS_DBLOCK);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:398: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(fnamebuf, STATEDIR);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:399: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(fnamebuf, PTS_DBFIL);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:466: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(fnamebuf, STATEDIR);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:467: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(fnamebuf, PTS_DBSOCKET);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:471: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(srvaddr.sun_path, fnamebuf);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:501: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(fnamebuf, STATEDIR);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:502: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(fnamebuf, PTS_DBLOCK);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:512: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(fnamebuf, STATEDIR);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:513: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(fnamebuf, PTS_DBFIL);
data/cyrus-imspd-1.8/lib/auth_unix.c:171: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(retbuf, identifier);
data/cyrus-imspd-1.8/lib/auth_unix.c:184:2:  [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(retbuf+6, grp->gr_name);
data/cyrus-imspd-1.8/lib/auth_unix.c:241: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(newstate->userid, identifier);
data/cyrus-imspd-1.8/lib/charset.c:325: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(retval+pos, EMPTY_STRING);
data/cyrus-imspd-1.8/lib/getnameinfo.c:79: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(serv, tmpserv);
data/cyrus-imspd-1.8/lib/getnameinfo.c:86: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(host, inet_ntoa(sin->sin_addr));
data/cyrus-imspd-1.8/lib/getnameinfo.c:96: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(host, hp->h_name);
data/cyrus-imspd-1.8/lib/glob.c:84: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(g->inbox, inbox);
data/cyrus-imspd-1.8/lib/glob.c:171: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(dst, suppress);
data/cyrus-imspd-1.8/lib/imclient.c:1185:16:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
	  char *ptr = getpass("");
data/cyrus-imspd-1.8/lib/imclient.c:1405: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(newlist,mlist);
data/cyrus-imspd-1.8/lib/imclient.c:1413: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(newlist,tmp);
data/cyrus-imspd-1.8/lib/mkchartable.c:809: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(buf, p);
data/cyrus-imspd-1.8/lib/mpool.c:184: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(ret, str);
data/cyrus-imspd-1.8/lib/prot.h:137:29:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format (printf, 2, 3)));
data/cyrus-imspd-1.8/lib/xmalloc.c:92: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(p, str);
data/cyrus-imspd-1.8/imsp/main.c:221:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "dp:")) != EOF) {
data/cyrus-imspd-1.8/lib/mkchartable.c:131:19:  [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 ((opt = getopt(argc, argv, "m:")) != EOF) {
data/cyrus-imspd-1.8/imsp/abook.c:98: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:142: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:207: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:309: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:478: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 dbname[256], acldb[256];
data/cyrus-imspd-1.8/imsp/abook.c:557: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 dbname[256], uname[256];
data/cyrus-imspd-1.8/imsp/abook.c:623: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 dbsrc[256], dbdst[256], uname[256];
data/cyrus-imspd-1.8/imsp/abook.c:731: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 dbname[256], acldb[256], uname[256];
data/cyrus-imspd-1.8/imsp/abook.c:841: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:905: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:978: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook.c:1004: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 dbname[256];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:180:24:  [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).
	    config.ldapport = atoi(value);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:303:33:  [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).
	    secondaryconfig.ldapport = atoi(value);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:409: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.
    static char filt[2048];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:458: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 *attrs[20];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:635: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 filter[1024];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:669: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.
    static char alias[1024];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:790: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 prefix[1024];
data/cyrus-imspd-1.8/imsp/abook_ldap.c:791: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 filter[1024];
data/cyrus-imspd-1.8/imsp/adate.c:50: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.
    static char buf[TIMESIZE];
data/cyrus-imspd-1.8/imsp/adate.c:51: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 tzbuf[ZONESIZE];
data/cyrus-imspd-1.8/imsp/alock.c:59: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 dbname[256];
data/cyrus-imspd-1.8/imsp/alock.c:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char key[1];
data/cyrus-imspd-1.8/imsp/authize.c: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.
    static char replybuf[256];
data/cyrus-imspd-1.8/imsp/authize.c:102:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(replybuf, "Administrator switch from user `");
data/cyrus-imspd-1.8/imsp/authize.c:104:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(rptr, "' to user `");
data/cyrus-imspd-1.8/imsp/authize.c:106:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(rptr, "' successful.");
data/cyrus-imspd-1.8/imsp/authize.c:108:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(replybuf, "User `");
data/cyrus-imspd-1.8/imsp/authize.c:110:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(rptr, "' Logged in");
data/cyrus-imspd-1.8/imsp/authize.h:81: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 user[AUTH_USERMAX];
data/cyrus-imspd-1.8/imsp/bb.c:497: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.c:519: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 dbname[256], iboxname[256];
data/cyrus-imspd-1.8/imsp/bb.c:582: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.c:650: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.c:762: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.c:1113: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.c:1368: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 dbname[256];
data/cyrus-imspd-1.8/imsp/bb.h:47: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 inboxname[AUTH_USERMAX + 6];
data/cyrus-imspd-1.8/imsp/dispatch.c:350: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(ptr, fbuf->dptr, result);
data/cyrus-imspd-1.8/imsp/dispatch.c:392: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(fbuf->pbuf, tmpbuf + ileft, fbuf->dcount);
data/cyrus-imspd-1.8/imsp/dispatch.c:398: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(ptr, tmpbuf, tmplen);
data/cyrus-imspd-1.8/imsp/dispatch.c:425:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, fbuf->uend, count);
data/cyrus-imspd-1.8/imsp/dispatch.c:481: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 ebuf[MAX_BUF+4];
data/cyrus-imspd-1.8/imsp/dispatch.c:557: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(fbuf->obuf + fbuf->ocount, buf, len);
data/cyrus-imspd-1.8/imsp/dispatch.c:593: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 fname[MAXPATHLEN];
data/cyrus-imspd-1.8/imsp/dispatch.c:604:19:  [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).
    fbuf->telem = open(fname, O_WRONLY|O_CREAT, 0600);
data/cyrus-imspd-1.8/imsp/dispatch.h:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ibuf[MAX_BUF];		/* line buffered data */
data/cyrus-imspd-1.8/imsp/dispatch.h:74: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 obuf[MAX_BUF];		/* output buffered data */
data/cyrus-imspd-1.8/imsp/dispatch.h:75: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 pbuf[MAX_BUF+4];	/* protection buffered data */
data/cyrus-imspd-1.8/imsp/im_util.c:83:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char im_table[256] = {
data/cyrus-imspd-1.8/imsp/im_util.c:344:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dst, start, pos - start + 1);
data/cyrus-imspd-1.8/imsp/im_util.c:523: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(wkptr, "%ld", val);
data/cyrus-imspd-1.8/imsp/im_util.h:49:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char im_table[256];
data/cyrus-imspd-1.8/imsp/imap_client.c:86:9:  [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).
		val = atoi(dtype);
data/cyrus-imspd-1.8/imsp/imap_client.c:204: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(con->tag, "A001");
data/cyrus-imspd-1.8/imsp/imap_client.c:213: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(&addr.sin_addr, hp->h_addr, hp->h_length);
data/cyrus-imspd-1.8/imsp/imap_client.c:264:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		protlevel = atoi(val);
data/cyrus-imspd-1.8/imsp/imap_client.h:50: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 tag[5];
data/cyrus-imspd-1.8/imsp/imap_client.h:51: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 host[1];
data/cyrus-imspd-1.8/imsp/imsp_server.c:396: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 index_64[128] = {
data/cyrus-imspd-1.8/imsp/imsp_server.c:448: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 at[128];
data/cyrus-imspd-1.8/imsp/imsp_server.c:1252: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 rbuf[ACL_MAXSTR];
data/cyrus-imspd-1.8/imsp/imsp_server.c:1510: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 tagbuf[MAX_BUF * 3];
data/cyrus-imspd-1.8/imsp/imsp_server.c:1516: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).
    if ((shutdown = fopen(SHUTDOWNFILENAME, "r")) != NULL) {
data/cyrus-imspd-1.8/imsp/imsp_server.c:1517: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[sizeof(tagbuf)-sizeof(msg_alert)];
data/cyrus-imspd-1.8/imsp/login_krb.c:46: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:108: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:109: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 inst[INST_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:110: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:111: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 auth_aname[ANAME_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:112: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 auth_inst[INST_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:113: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 auth_realm[REALM_SZ];
data/cyrus-imspd-1.8/imsp/login_krb.c:114: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.
    static char replybuf[100];
data/cyrus-imspd-1.8/imsp/main.c:95: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.
    static char host[MAXHOSTNAMELEN];
data/cyrus-imspd-1.8/imsp/main.c:98: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(host, "unknown-host");
data/cyrus-imspd-1.8/imsp/main.c:227:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	port_number = atoi(optarg);
data/cyrus-imspd-1.8/imsp/option.c:79: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.
    static char magicbuf[256];
data/cyrus-imspd-1.8/imsp/option.c:95:55:  [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).
	snprintf(magicbuf, sizeof(magicbuf), "%ld", (long) ((atol(val) + 1023) / 1024));
data/cyrus-imspd-1.8/imsp/option.c:109: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:122: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:136: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:270: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:317: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:446: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:447: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 usagestr[64];
data/cyrus-imspd-1.8/imsp/option.c:463:35:  [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).
    if (value && *value) usage += atol(value + 1);
data/cyrus-imspd-1.8/imsp/option.c:475:31:  [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).
	if (value && *value) quota = atol(value + 1) * 1024L;
data/cyrus-imspd-1.8/imsp/option.c:499: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.c:585: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 dbname[256];
data/cyrus-imspd-1.8/imsp/option.h:62: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 *item[1];
data/cyrus-imspd-1.8/imsp/proxy_krb.c:43: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/imsp/proxy_krb.c:58: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 lhost[MAXHOSTNAMELEN];
data/cyrus-imspd-1.8/imsp/proxy_krb.c:59: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 phost[MAXHOSTNAMELEN];
data/cyrus-imspd-1.8/imsp/sasl_support.c:93:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	min = atoi(value);
data/cyrus-imspd-1.8/imsp/sasl_support.c:100:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	max = atoi(value);
data/cyrus-imspd-1.8/imsp/sasl_support.c:142: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 remoteip[60], localip[60];
data/cyrus-imspd-1.8/imsp/sasl_support.c:185: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 opt[1024];
data/cyrus-imspd-1.8/imsp/sasl_support.c:233: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 replybuf[150];
data/cyrus-imspd-1.8/imsp/syncdb.c:89: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 db[MAXDBPATHLEN+1];		/* database name */
data/cyrus-imspd-1.8/imsp/syncdb.c:420: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 lname[MAXDBPATHLEN + 5];	/* lock file name buffer */
data/cyrus-imspd-1.8/imsp/syncdb.c:472:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(c->db, O_RDONLY);
data/cyrus-imspd-1.8/imsp/syncdb.c:559: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 newname[MAXDBPATHLEN + 5];
data/cyrus-imspd-1.8/imsp/syncdb.c:565: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 ((out = fopen(newname, "w")) == NULL) {
data/cyrus-imspd-1.8/imsp/syncdb.c:568: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).
    oldfd = open(c->db, O_RDWR, 0600);
data/cyrus-imspd-1.8/imsp/syncdb.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 path[MAXPATHLEN];
data/cyrus-imspd-1.8/imsp/syncdb.c:798:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(c->db, O_WRONLY | O_CREAT, 0600)) < 0 || close(fd) < 0) {
data/cyrus-imspd-1.8/imsp/syncdb.c:811: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 lname[MAXDBPATHLEN];
data/cyrus-imspd-1.8/imsp/syncdb.c:839: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 dbname[MAXDBPATHLEN+1];
data/cyrus-imspd-1.8/imsp/syncdb.c:854:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(dbname, O_RDWR|O_CREAT, 0600)) < 0) {
data/cyrus-imspd-1.8/imsp/syncdb.c:1050: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((void *) kdst, (void *) ksrc, c->cachecount * sizeof (sdb_keyvalue));
data/cyrus-imspd-1.8/imsp/syncdb.c:1248: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).
	c->fd = open(c->db, O_RDWR);
data/cyrus-imspd-1.8/lib/acte_krb.c:51: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[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:56: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 user[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:63: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 instance[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:64:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:152: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(cacheid, kstate->session, sizeof(kstate->session));
data/cyrus-imspd-1.8/lib/acte_krb.c:171: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 userbuf[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:172: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 instance[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:173: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:174: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 uinst[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:175: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 urealm[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:238: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(kstate->session, cr.session, sizeof(des_cblock));
data/cyrus-imspd-1.8/lib/acte_krb.c:269: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 tmp[4];
data/cyrus-imspd-1.8/lib/acte_krb.c:280: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(tmp, input, 4);
data/cyrus-imspd-1.8/lib/acte_krb.c:303:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tmp, input, 4);
data/cyrus-imspd-1.8/lib/acte_krb.c:309: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(tmp, input+4, 4);
data/cyrus-imspd-1.8/lib/acte_krb.c:366: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 hostname[MAXHOSTNAMELEN+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:367: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 instance[MAXHOSTNAMELEN+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:368: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:369: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 tktstring[256];
data/cyrus-imspd-1.8/lib/acte_krb.c:434: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.
    static char outputbuf[4];
data/cyrus-imspd-1.8/lib/acte_krb.c:490: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.
    static char outputbuf[8];
data/cyrus-imspd-1.8/lib/acte_krb.c:493: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 tmp[4];
data/cyrus-imspd-1.8/lib/acte_krb.c:494: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 instance[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:495: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:498: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 clientname[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:512: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(authent.dat, input, inputlen);
data/cyrus-imspd-1.8/lib/acte_krb.c:527: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(kstate->session, kstate->kdata.session, sizeof(des_cblock));
data/cyrus-imspd-1.8/lib/acte_krb.c:548: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(tmp, input, 4);
data/cyrus-imspd-1.8/lib/acte_krb.c:554: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(tmp, input+4, 4);
data/cyrus-imspd-1.8/lib/acte_krb.c:768: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 (returned_key, key, sizeof(des_cblock));
data/cyrus-imspd-1.8/lib/acte_krb.c:787: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 tfname[40];
data/cyrus-imspd-1.8/lib/acte_krb.c:788: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:789: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 cell[REALM_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:790: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 hostname[MAXHOSTNAMELEN+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:791: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 phost[MAXHOSTNAMELEN+1];
data/cyrus-imspd-1.8/lib/acte_krb.c:793: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 instance[INST_SZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:877: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  password[8+1];                /* crypt is limited to 8 chars anyway */
data/cyrus-imspd-1.8/lib/acte_krb.c:918: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 temp_key[8];
data/cyrus-imspd-1.8/lib/acte_krb.c:919: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 ivec[8];
data/cyrus-imspd-1.8/lib/acte_krb.c:920: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 password[BUFSIZ];
data/cyrus-imspd-1.8/lib/acte_krb.c:928: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 (ivec, "kerberos", 8);
data/cyrus-imspd-1.8/lib/acte_krb.c:929: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 (temp_key, "kerberos", 8);
data/cyrus-imspd-1.8/lib/acte_krb.c:934: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 (temp_key, ivec, 8);
data/cyrus-imspd-1.8/lib/assert.c:56: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[1024];
data/cyrus-imspd-1.8/lib/auth_krb.c:72: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 userid[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/auth_krb.c:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:74: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:75: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:102: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:103: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:104: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:179: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.
    static char localuser[MAX_K_NAME_SZ + 1];
data/cyrus-imspd-1.8/lib/auth_krb.c:180: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 principal[MAX_K_NAME_SZ + 1];
data/cyrus-imspd-1.8/lib/auth_krb.c:181: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:182: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:184: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:185: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 krbhst[256];
data/cyrus-imspd-1.8/lib/auth_krb.c:187: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[1024];
data/cyrus-imspd-1.8/lib/auth_krb.c:190: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).
    if (!(mapfile = fopen(KRB_MAPNAME, "r"))) {
data/cyrus-imspd-1.8/lib/auth_krb.c:252: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.
    static char retbuf[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/auth_krb.c:253: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:254: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:255: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:256: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb.c:257: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 krbhst[256];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:165: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.
    static char localuser[MAX_K_NAME_SZ + 1];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:166: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 principal[MAX_K_NAME_SZ + 1];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:167: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:168: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:169: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:170: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:171: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 krbhst[MAX_HSTNM];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:173: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[1024];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:176: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).
    if (!(mapfile = fopen(KRB_MAPNAME, "r"))) {
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:237: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.
    static char retbuf[MAX_K_NAME_SZ+1];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:238: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:239: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:240: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:241: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 lrealm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:242: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 krbhst[MAX_HSTNM];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:251: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(canon_buf, identifier, len);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:337: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 keydata[PTS_DB_KEYSIZE];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:338: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 fnamebuf[1024];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:344: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.
    static char response[1024];
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:370: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(keydata, cacheid, 16); /* why 16? see sasl_krb_server.c */
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:373: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(keydata+16, identifier, strlen(identifier)); 
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:375: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(keydata+16, identifier, PTS_DB_KEYSIZE-16);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:389: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).
    fd = open(fnamebuf, O_RDWR, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:410:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    r = ptdb->open(ptdb, NULL, fnamebuf, NULL, DB_HASH, DB_RDONLY, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:412:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    r = ptdb->open(ptdb, fnamebuf, NULL, DB_HASH, DB_RDONLY, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:446: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(newstate, fetched, data.size);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:503: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).
    fd = open(fnamebuf, O_CREAT|O_TRUNC|O_RDWR, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:521:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    r = ptdb->open(ptdb, NULL, fnamebuf, NULL, DB_HASH, DB_RDONLY, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:523:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    r = ptdb->open(ptdb, fnamebuf, NULL, DB_HASH, DB_RDONLY, 0664);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:552: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(newstate, fetched, data.size);
data/cyrus-imspd-1.8/lib/auth_krb_pts.h:76: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 id[PR_MAXNAMELEN];
data/cyrus-imspd-1.8/lib/auth_krb_pts.h:81: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 aname[ANAME_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.h:82: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 inst[INST_SZ];
data/cyrus-imspd-1.8/lib/auth_krb_pts.h:83: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 realm[REALM_SZ];
data/cyrus-imspd-1.8/lib/auth_unix.c:58: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 userid[81];
data/cyrus-imspd-1.8/lib/auth_unix.c:121: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 allowedchars[256] = {
data/cyrus-imspd-1.8/lib/auth_unix.c:157: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.
    static char retbuf[81];
data/cyrus-imspd-1.8/lib/bsearch.c:56: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 convert_to_compare[256] = {
data/cyrus-imspd-1.8/lib/charset.c:54: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.
extern const unsigned char chartables_unicode_block[256];
data/cyrus-imspd-1.8/lib/charset.c:61: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.
    const unsigned char (*curtable)[256][4];
data/cyrus-imspd-1.8/lib/charset.c:62: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.
    const unsigned char (*lasttable)[256][4];
data/cyrus-imspd-1.8/lib/charset.c:63: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.
    const unsigned char (*initialtable)[256][4];
data/cyrus-imspd-1.8/lib/charset.c:158:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char index_hex[256] = {
data/cyrus-imspd-1.8/lib/charset.c:181:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char index_64[256] = {
data/cyrus-imspd-1.8/lib/charset.c:533: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 decodebuf[2048];	/* Buffer of data deocded, but not converted
data/cyrus-imspd-1.8/lib/charset.c:553: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, smallbuf[2048];
data/cyrus-imspd-1.8/lib/charset.c:756: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, state->rawbase, size);
data/cyrus-imspd-1.8/lib/chartable.h:57: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.
    const unsigned char (*table)[256][4];
data/cyrus-imspd-1.8/lib/getaddrinfo.c:157:19:  [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).
	    port = htons(atoi(servname));
data/cyrus-imspd-1.8/lib/getnameinfo.c:72: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 tmpserv[16];
data/cyrus-imspd-1.8/lib/glob.c:416: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 text[1024];
data/cyrus-imspd-1.8/lib/glob.h:66: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 inbox[6];		/* INBOX in the correct case */
data/cyrus-imspd-1.8/lib/glob.h:67: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 str[3];		/* glob string & suppress string */
data/cyrus-imspd-1.8/lib/imclient.c:121: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 outbuf[IMCLIENT_BUFSIZE];
data/cyrus-imspd-1.8/lib/imclient.c:171:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char charclass[256] = {
data/cyrus-imspd-1.8/lib/imclient.c:457: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[30];
data/cyrus-imspd-1.8/lib/imclient.c:576: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[30];
data/cyrus-imspd-1.8/lib/imclient.c:635: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(imclient->outptr, s, imclient->outleft);
data/cyrus-imspd-1.8/lib/imclient.c:652: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(imclient->outptr, s, len);
data/cyrus-imspd-1.8/lib/imclient.c:728: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(imclient->replybuf + imclient->replylen, plainbuf, plainlen);
data/cyrus-imspd-1.8/lib/imclient.c:998: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[IMCLIENT_BUFSIZE];
data/cyrus-imspd-1.8/lib/imclient.c:1161: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 result[1024];
data/cyrus-imspd-1.8/lib/imclient.c:1195: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(cur->str, result, t->len);
data/cyrus-imspd-1.8/lib/imclient.c:1235: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 localip[60], remoteip[60];
data/cyrus-imspd-1.8/lib/imclient.c:1441:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char index_64[256] = {
data/cyrus-imspd-1.8/lib/imclient.c:1503: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[1024];
data/cyrus-imspd-1.8/lib/imclient.c:1559: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 peer_CN[CCERT_BUFSIZ];
data/cyrus-imspd-1.8/lib/imclient.c:1560: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 issuer_CN[CCERT_BUFSIZ];
data/cyrus-imspd-1.8/lib/imclient.c:1599: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/cyrus-imspd-1.8/lib/imclient.c:1761: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 + 1];
data/cyrus-imspd-1.8/lib/imclient.c:1784: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(ss, "%04x ", i * DUMP_WIDTH);
data/cyrus-imspd-1.8/lib/imclient.c:1788: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(ss, "   ");
data/cyrus-imspd-1.8/lib/imclient.c:1792:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(ss, "%02x[%c]%c", ch, ch, j == 7 ? '|' : ' ');
data/cyrus-imspd-1.8/lib/imclient.c:1815: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(buf, "%04x - <SPACES/NULS>\n", len+ trunc);
data/cyrus-imspd-1.8/lib/iptostring.c:56: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 hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
data/cyrus-imspd-1.8/lib/lock_fcntl.c:108: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).
	newfd = open(filename, O_RDWR);
data/cyrus-imspd-1.8/lib/lock_flock.c:101: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).
	newfd = open(filename, O_RDWR);
data/cyrus-imspd-1.8/lib/map_nommap.c:72: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[80];
data/cyrus-imspd-1.8/lib/map_private.c:49:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/cyrus-imspd-1.8/lib/map_shared.c:70: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[80];
data/cyrus-imspd-1.8/lib/map_stupidshared.c:72: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[80];
data/cyrus-imspd-1.8/lib/mkchartable.c:57:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char index_hex[256] = {
data/cyrus-imspd-1.8/lib/mkchartable.c:214: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[1024];
data/cyrus-imspd-1.8/lib/mkchartable.c:220: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).
    mapfile = fopen(name, "r");
data/cyrus-imspd-1.8/lib/mkchartable.c:402: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(map[n].mapcode, new_mapcode, sizeof(new_mapcode));
data/cyrus-imspd-1.8/lib/mkchartable.c:427:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char translation[256];
data/cyrus-imspd-1.8/lib/mkchartable.c:454: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(map[n].translation, translation, n_t);
data/cyrus-imspd-1.8/lib/mkchartable.c:502: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[1024];
data/cyrus-imspd-1.8/lib/mkchartable.c:509: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).
    charfile = fopen(name, "r");
data/cyrus-imspd-1.8/lib/mkchartable.c:549: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 action[1024];
data/cyrus-imspd-1.8/lib/mkchartable.c:617: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 need_block[256];
data/cyrus-imspd-1.8/lib/mkchartable.c:619: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[80];
data/cyrus-imspd-1.8/lib/mkchartable.c:671: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[80];
data/cyrus-imspd-1.8/lib/mkchartable.c:696:2:  [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(buf, " <");
data/cyrus-imspd-1.8/lib/mkchartable.c:798: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[1024];
data/cyrus-imspd-1.8/lib/n_binsearch.c:61:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char n_searchBuff[NS_BUFFSIZE];
data/cyrus-imspd-1.8/lib/n_binsearch.c:68: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 convert_to_lowercase[256] = {
data/cyrus-imspd-1.8/lib/n_binsearch.c:147:3:  [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(ptr, buffer, diff = endBuff - ptr);
data/cyrus-imspd-1.8/lib/prot.c:434: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.
	    static char errbuf[256];
data/cyrus-imspd-1.8/lib/prot.c:453: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(s->buf, out, outlen);
data/cyrus-imspd-1.8/lib/prot.c:469: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 timebuf[20];
data/cyrus-imspd-1.8/lib/prot.c:519:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char timebuf[20];
data/cyrus-imspd-1.8/lib/prot.c:598: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(s->ptr, buf, s->cnt);
data/cyrus-imspd-1.8/lib/prot.c:605: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(s->ptr, buf, len);
data/cyrus-imspd-1.8/lib/prot.c:624: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[30];
data/cyrus-imspd-1.8/lib/prot.c:684:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, s->ptr, size);
data/cyrus-imspd-1.8/lib/prot.c:694: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+1, s->ptr, size);
data/cyrus-imspd-1.8/lib/retry.c:136:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		iov[i].iov_base = (char *)iov[i].iov_base + n;
data/cyrus-imspd-1.8/lib/util.c:56:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const unsigned char convert_to_lowercase[256] = {
data/cyrus-imspd-1.8/lib/util.c:91:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const unsigned char convert_to_uppercase[256] = {
data/cyrus-imspd-1.8/lib/util.h:49: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.
extern const unsigned char convert_to_lowercase[256];
data/cyrus-imspd-1.8/lib/util.h:50: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.
extern const unsigned char convert_to_uppercase[256];
data/cyrus-imspd-1.8/imsp/abook.c:72: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(name), ownerlen;
data/cyrus-imspd-1.8/imsp/abook.c:116: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).
    if (strlen(uname) == len && !strncasecmp(uname, name, len)) {
data/cyrus-imspd-1.8/imsp/abook.c:147: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).
    nlen = strlen(name);
data/cyrus-imspd-1.8/imsp/abook.c:226: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(alias) + 1;
data/cyrus-imspd-1.8/imsp/abook.c:361: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).
	        int patlen = strlen(flist[i].data) + 3;
data/cyrus-imspd-1.8/imsp/abook.c:376: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).
	        int patlen = strlen(flist->field) + 3;
data/cyrus-imspd-1.8/imsp/abook.c:567: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 (ownerlen == strlen(name) && auth_level(id) != AUTH_ADMIN) {
data/cyrus-imspd-1.8/imsp/abook.c:582:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (kvpos->value) delta += strlen(kvpos->value);
data/cyrus-imspd-1.8/imsp/abook.c:583:52:  [1] (buffer) strlen:
  Does not handle 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 ((sep = strchr(kvpos->key, '"'))) delta += strlen(sep + 1);
data/cyrus-imspd-1.8/imsp/abook.c:638:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    default_abook = osrclen == strlen(name);
data/cyrus-imspd-1.8/imsp/abook.c:653:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (kvpos->value) delta += strlen(kvpos->value);
data/cyrus-imspd-1.8/imsp/abook.c:654: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).
		if ((sep = strchr(kvpos->key, '"'))) delta += strlen(sep + 1);
data/cyrus-imspd-1.8/imsp/abook.c:698:7:  [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(tmpacl, "\t");
data/cyrus-imspd-1.8/imsp/abook.c:751:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (ownerlen == strlen(name)) {
data/cyrus-imspd-1.8/imsp/abook.c:783: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).
	if ((len = strlen(flist[i].field)) > maxfieldlen) {
data/cyrus-imspd-1.8/imsp/abook.c:787: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).
	    delta += len + strlen(flist[i].data);
data/cyrus-imspd-1.8/imsp/abook.c:790: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).
    keylen = maxfieldlen + strlen(alias) + 2;
data/cyrus-imspd-1.8/imsp/abook.c:798: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).
	    delta -= strlen(value) + strlen(flist[i].field);
data/cyrus-imspd-1.8/imsp/abook.c:798: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).
	    delta -= strlen(value) + strlen(flist[i].field);
data/cyrus-imspd-1.8/imsp/abook.c:858: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).
    keylen = strlen(alias) + 3;
data/cyrus-imspd-1.8/imsp/abook.c:873: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).
    delta = (strlen(alias) + 1) * kvcount;
data/cyrus-imspd-1.8/imsp/abook.c:875: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).
	delta -= strlen(kv[i].key) + strlen(kv[i].value);
data/cyrus-imspd-1.8/imsp/abook.c:875: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).
	delta -= strlen(kv[i].key) + strlen(kv[i].value);
data/cyrus-imspd-1.8/imsp/abook.c:930: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(acl, "\t");
data/cyrus-imspd-1.8/imsp/abook.c:1038: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).
    ulen = strlen(user);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:812: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).
    ptr += 1 /*[*/ + strlen(config.uniqueattr) + 1 /*:*/;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:814: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).
    ptr += strlen(ptr) - 1 /*]*/;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:861: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).
	ptr += 1 /*[*/ + strlen(secondaryconfig.uniqueattr) + 1 /*:*/;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:863: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).
	ptr += strlen(ptr) - 1 /*]*/;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:945: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).
	      int fptrdatalen = strlen(values[0])+strlen(secondaryconfig.map[i].append)+1;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:945: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).
	      int fptrdatalen = strlen(values[0])+strlen(secondaryconfig.map[i].append)+1;
data/cyrus-imspd-1.8/imsp/abook_ldap.c:1017: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).
		  fptr->data=malloc(strlen(values[0])+strlen(config.map[i].append)+1);
data/cyrus-imspd-1.8/imsp/abook_ldap.c:1017:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  fptr->data=malloc(strlen(values[0])+strlen(config.map[i].append)+1);
data/cyrus-imspd-1.8/imsp/alock.c:82: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).
    keylenplus = strlen(item1)
data/cyrus-imspd-1.8/imsp/alock.c:83: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).
      + (item2 ? strlen(item2) + 1 : 0)
data/cyrus-imspd-1.8/imsp/alock.c:84:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      + strlen(user) + strlen(*host) + 2;
data/cyrus-imspd-1.8/imsp/alock.c:84: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).
      + strlen(user) + strlen(*host) + 2;
data/cyrus-imspd-1.8/imsp/alock.c:90: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).
		(s = strchr(item1, '.')) ? s - item1 : strlen(item1), item1);
data/cyrus-imspd-1.8/imsp/alock.c:93: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).
	snprintf(key->dbname, sizeof(key->dbname), alockdb, strlen(user), user);
data/cyrus-imspd-1.8/imsp/alock.c:121: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).
		value = key->key + strlen(key->key) + 1;
data/cyrus-imspd-1.8/imsp/alock.c:122:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		snprintf(value, keylenplus - strlen(key->key) - 1, "%s@%s", user, *host);
data/cyrus-imspd-1.8/imsp/authize.c:92:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(id->user, anonymous, sizeof(id->user));
data/cyrus-imspd-1.8/imsp/authize.c:103: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).
	rptr = beautify_copy(replybuf + strlen(replybuf), olduser);
data/cyrus-imspd-1.8/imsp/authize.c:105: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).
	rptr = beautify_copy(replybuf + strlen(replybuf), user);
data/cyrus-imspd-1.8/imsp/authize.c:109: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).
	rptr = beautify_copy(replybuf + strlen(replybuf), user);
data/cyrus-imspd-1.8/imsp/bb.c:124: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(value) + strlen(bits) + 2;
data/cyrus-imspd-1.8/imsp/bb.c:124: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).
    len = strlen(value) + strlen(bits) + 2;
data/cyrus-imspd-1.8/imsp/bb.c:153: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).
    h.mlen = strlen(mbox);
data/cyrus-imspd-1.8/imsp/bb.c:155: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).
    h.used = strlen(h.entry);
data/cyrus-imspd-1.8/imsp/bb.c:218: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(mbox);
data/cyrus-imspd-1.8/imsp/bb.c:314: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 = 8 + strlen(host);
data/cyrus-imspd-1.8/imsp/bb.c:390: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(user);
data/cyrus-imspd-1.8/imsp/bb.c:544:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    newval = malloc(value ? strlen(value) + 1 : sizeof (noinfosub));
data/cyrus-imspd-1.8/imsp/bb.c:587: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).
    state->inboxlen = strlen(state->inboxname);
data/cyrus-imspd-1.8/imsp/bb.c:589: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).
    end = pat + strlen(pat) - 1;
data/cyrus-imspd-1.8/imsp/bb.c:703: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).
	end = pat + strlen(pat) - 1;
data/cyrus-imspd-1.8/imsp/bb.c:796:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(key);
data/cyrus-imspd-1.8/imsp/bb.c:851: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).
			   mlen ? mlen : strlen(key)) < 0)) {
data/cyrus-imspd-1.8/imsp/bb.c:918: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).
    if (mbox[strlen(mbox) - 1] == '.') return (rpl_okcreate);
data/cyrus-imspd-1.8/imsp/bb.c:972: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).
	size = strlen(host) + 256;
data/cyrus-imspd-1.8/imsp/bb.c:1036: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).
	    len = strlen(myhost);
data/cyrus-imspd-1.8/imsp/bb.c:1056:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((value = malloc(strlen(uid) + 1)) == NULL) {
data/cyrus-imspd-1.8/imsp/bb.c:1118: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).
        int inamelen = strlen(auth_username(id)) + 6;
data/cyrus-imspd-1.8/imsp/bb.c:1287:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(value, uid, acl - uid);
data/cyrus-imspd-1.8/imsp/bb.c:1325: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).
	    size = strlen(uid) + strlen(host) + 256;
data/cyrus-imspd-1.8/imsp/bb.c:1325: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).
	    size = strlen(uid) + strlen(host) + 256;
data/cyrus-imspd-1.8/imsp/bb.c:1336: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).
	    ulen = strlen(uid);
data/cyrus-imspd-1.8/imsp/bb.c:1339:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(new, uid, ulen);
data/cyrus-imspd-1.8/imsp/bb.c:1341: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).
		new = malloc(strlen(old) - (scan - old) + ulen + 1);
data/cyrus-imspd-1.8/imsp/bb.c:1385: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).
    newlen = strlen(uid) + 3;
data/cyrus-imspd-1.8/imsp/dispatch.c:364:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    count = read(fbuf->fd, ptr, len);
data/cyrus-imspd-1.8/imsp/dispatch.c:551: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).
    if (len < 1) len = strlen(buf);
data/cyrus-imspd-1.8/imsp/im_util.c:121:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(new, start, len);
data/cyrus-imspd-1.8/imsp/im_util.c:395: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).
    wksize = (strlen(str) + 1) * 4;
data/cyrus-imspd-1.8/imsp/im_util.c:416: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(astr);
data/cyrus-imspd-1.8/imsp/im_util.c:425: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(astr) + MAX_LITERAL_EXTRA;
data/cyrus-imspd-1.8/imsp/im_util.c:429: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(astr) * 2;
data/cyrus-imspd-1.8/imsp/im_util.c:439: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).
		wkspace = realloc(wkspace, wksize += len + strlen(str));
data/cyrus-imspd-1.8/imsp/im_util.c:451:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    strncpy(wkptr, astr, len);
data/cyrus-imspd-1.8/imsp/im_util.c:491: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).
			wkptr += strlen(wkptr);
data/cyrus-imspd-1.8/imsp/im_util.c:524: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).
		    wkptr += strlen(wkptr);
data/cyrus-imspd-1.8/imsp/imap_client.c:103: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).
	} else if (strncmp(con->tag, con->buf.upos, strlen(con->tag))) {
data/cyrus-imspd-1.8/imsp/imap_client.c:108: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).
	    con->buf.upos += strlen(con->tag);
data/cyrus-imspd-1.8/imsp/imap_client.c:112: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).
	    digit = con->tag + strlen(con->tag) - 1;
data/cyrus-imspd-1.8/imsp/imap_client.c:191: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).
	con = (im_conn *) malloc(sizeof (im_conn) + strlen(host));
data/cyrus-imspd-1.8/imsp/imsp_server.c:270: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).
    sprintf((tag) + strlen(tag), " %s", (str)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:273: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((tag), " "); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:274: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).
    sprintf((tag) + strlen(tag), (str), (arg1)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:277: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((tag), " "); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:278: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).
    sprintf((tag) + strlen(tag), (str), (arg1), (arg2)); \
data/cyrus-imspd-1.8/imsp/imsp_server.c:472: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).
    if (strlen(auth_type) > 127) {
data/cyrus-imspd-1.8/imsp/imsp_server.c:473:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(at, auth_type, 127);
data/cyrus-imspd-1.8/imsp/imsp_server.c:627: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).
	memset(pass, 0, strlen(pass));
data/cyrus-imspd-1.8/imsp/imsp_server.c:1270: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).
		    int defacllen = strlen(user) + 32;
data/cyrus-imspd-1.8/imsp/imsp_server.c:1527: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).
	if (write(fd, tagbuf, strlen(tagbuf)) < 0) {
data/cyrus-imspd-1.8/imsp/imsp_server.c:1536: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 (write(fd, tagbuf, strlen(tagbuf)) < 0) {
data/cyrus-imspd-1.8/imsp/imsp_server.c:1562:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((tag == (char *) NULL) || (strlen(tag) > 64)) {
data/cyrus-imspd-1.8/imsp/option.c:227:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (state->buflen < strlen(val) + 1) {
data/cyrus-imspd-1.8/imsp/option.c:229: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).
	    state->buflen = strlen(val) + 1;
data/cyrus-imspd-1.8/imsp/option.c:232: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).
	    state->buflen = strlen(val) + 1;
data/cyrus-imspd-1.8/imsp/option.c:299: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).
	result = malloc(strlen(value) + 1);
data/cyrus-imspd-1.8/imsp/option.c:542: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).
    newval = malloc(strlen(value) + 3);
data/cyrus-imspd-1.8/imsp/option.c:551: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).
	if (oldval && *oldval == 'W') delta = 2 - strlen(oldval) - strlen(opt);
data/cyrus-imspd-1.8/imsp/option.c:551:61:  [1] (buffer) strlen:
  Does not handle 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 (oldval && *oldval == 'W') delta = 2 - strlen(oldval) - strlen(opt);
data/cyrus-imspd-1.8/imsp/option.c:552:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!type) delta += strlen(opt) + strlen(value);
data/cyrus-imspd-1.8/imsp/option.c:552:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!type) delta += strlen(opt) + strlen(value);
data/cyrus-imspd-1.8/imsp/option.c:623: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 (option_doquota(user, 2 - strlen(oldval) - strlen(opt)) < 0) {
data/cyrus-imspd-1.8/imsp/option.c:623: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 (option_doquota(user, 2 - strlen(oldval) - strlen(opt)) < 0) {
data/cyrus-imspd-1.8/imsp/sasl_support.c:190:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(opt, opt_sasl_prefix, sizeof(opt));
data/cyrus-imspd-1.8/imsp/sasl_support.c:194:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(opt, plugin_name, sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:194: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).
	strncat(opt, plugin_name, sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:195:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
	strncat(opt, ".",	  sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:195: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).
	strncat(opt, ".",	  sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:197:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(opt, option, sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:197: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).
    strncat(opt, option, sizeof(opt) - strlen(opt) - 1);
data/cyrus-imspd-1.8/imsp/sasl_support.c:206:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(opt, opt_login_srvtab, sizeof(opt));
data/cyrus-imspd-1.8/imsp/sasl_support.c:212: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(*result);
data/cyrus-imspd-1.8/imsp/syncdb.c:224: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).
		 && !strncmp(scan, privdbstr[i], strlen(privdbstr[i])))) {
data/cyrus-imspd-1.8/imsp/syncdb.c:501:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    count = read(fd, data, stbuf.st_size);
data/cyrus-imspd-1.8/lib/acl_afs.c:131: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).
	newidentifier = xmalloc(strlen(canonid)+2);
data/cyrus-imspd-1.8/lib/acl_afs.c:196:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	newacl = xmalloc((thisid - *acl) + strlen(identifier) + 40 +
data/cyrus-imspd-1.8/lib/acl_afs.c:197:5:  [1] (buffer) strlen:
  Does not handle 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(nextid));
data/cyrus-imspd-1.8/lib/acl_afs.c:198:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(newacl, *acl, (thisid - *acl));
data/cyrus-imspd-1.8/lib/acl_afs.c:200:2:  [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(newacl, "\t");
data/cyrus-imspd-1.8/lib/acl_afs.c:201: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).
	(void) acl_masktostr(access, newacl + strlen(newacl));
data/cyrus-imspd-1.8/lib/acl_afs.c:202:2:  [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(newacl, "\t");
data/cyrus-imspd-1.8/lib/acte_krb.c:200:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(instance, host_name->h_name, sizeof(instance)-1);
data/cyrus-imspd-1.8/lib/acte_krb.c:221:6:  [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(user, ".");
data/cyrus-imspd-1.8/lib/acte_krb.c:225:6:  [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(user, "@");
data/cyrus-imspd-1.8/lib/acte_krb.c:229: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).
    else if (strlen(user) > MAX_K_NAME_SZ) {
data/cyrus-imspd-1.8/lib/acte_krb.c:338: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).
	authent.length = 8+strlen(kstate->user);
data/cyrus-imspd-1.8/lib/acte_krb.c:514:2:  [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(instance, "*");
data/cyrus-imspd-1.8/lib/acte_krb.c:596:3:  [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(clientname, ".");
data/cyrus-imspd-1.8/lib/acte_krb.c:600:3:  [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(clientname, "@");
data/cyrus-imspd-1.8/lib/acte_krb.c:835: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(instance, "*");
data/cyrus-imspd-1.8/lib/acte_krb.c:884:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (password, cell, 8);
data/cyrus-imspd-1.8/lib/acte_krb.c:885: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).
    passlen = strlen (str);
data/cyrus-imspd-1.8/lib/acte_krb.c:896:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((void *)key, crypt(password, "p1") + 2, sizeof(des_cblock));
data/cyrus-imspd-1.8/lib/acte_krb.c:923:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (password, str, sizeof(password));
data/cyrus-imspd-1.8/lib/acte_krb.c:924: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).
    if ((passlen = strlen (password)) < sizeof(password)-1)
data/cyrus-imspd-1.8/lib/acte_krb.c:925:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat (password, cell, sizeof(password)-passlen);
data/cyrus-imspd-1.8/lib/acte_krb.c:926: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).
    if ((passlen = strlen(password)) > sizeof(password)) passlen = sizeof(password);
data/cyrus-imspd-1.8/lib/auth_krb.c:228:3:  [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(localuser, ".");
data/cyrus-imspd-1.8/lib/auth_krb.c:232:3:  [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(localuser, "@");
data/cyrus-imspd-1.8/lib/auth_krb.c:296:2:  [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(retbuf, ".");
data/cyrus-imspd-1.8/lib/auth_krb.c:300:2:  [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(retbuf, "@");
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:214:17:  [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(localuser, ".");
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:218:17:  [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(localuser, "@");
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:247: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(identifier);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:297:9:  [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(retbuf, ".");
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:301:9:  [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(retbuf, "@");
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:372:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(identifier) + 16)  < PTS_DB_KEYSIZE) {
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:373:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    memcpy(keydata+16, identifier, strlen(identifier)); 
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:380:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(keydata, identifier, PR_MAXNAMELEN);
data/cyrus-imspd-1.8/lib/auth_krb_pts.c:489:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(s, response+start, sizeof(response) - 1 - start);
data/cyrus-imspd-1.8/lib/auth_unix.c:170: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).
    if (strlen(identifier) >= sizeof(retbuf)) return 0;
data/cyrus-imspd-1.8/lib/auth_unix.c:188: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).
    if (strlen(identifier) >= sizeof(retbuf)) return 0;
data/cyrus-imspd-1.8/lib/charset.c:312: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 ((int)strlen(chartables_charset_table[i].name) == endcharset-start &&
data/cyrus-imspd-1.8/lib/charset.c:386: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(s);
data/cyrus-imspd-1.8/lib/charset.c:409: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).
    PATLEN(pat) = len = strlen(s);
data/cyrus-imspd-1.8/lib/charset.c:630:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, buf+i-(substrlen-1), substrlen-1-j);
data/cyrus-imspd-1.8/lib/charset.c:682:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(buf, buf+i-(substrlen-1), substrlen-1-j);
data/cyrus-imspd-1.8/lib/getnameinfo.c:76:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(tmpserv) > servlen)
data/cyrus-imspd-1.8/lib/getnameinfo.c:83:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
data/cyrus-imspd-1.8/lib/getnameinfo.c:93:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(hp->h_name) >= hostlen)
data/cyrus-imspd-1.8/lib/glob.c:81: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 (suppress) slen = strlen(suppress);
data/cyrus-imspd-1.8/lib/glob.c:82: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).
    g = (glob *) xzmalloc(sizeof (glob) + slen + strlen(str) + 1);
data/cyrus-imspd-1.8/lib/glob.c:170: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).
	    dst = g->str + strlen(g->str) + 1;
data/cyrus-imspd-1.8/lib/glob.c:222: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 (!len) len = strlen(ptr);
data/cyrus-imspd-1.8/lib/glob.c:423: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).
	    len = strlen(text) - 1;
data/cyrus-imspd-1.8/lib/imclient.c:504: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).
    imclient_write(imclient, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/imclient.c:516: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).
	    imclient_write(imclient, str, strlen(str));
data/cyrus-imspd-1.8/lib/imclient.c:528: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).
	    imclient_write(imclient, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/imclient.c:534: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).
	    imclient_write(imclient, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/imclient.c:566:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	imclient_write(imclient, fmt, strlen(fmt));
data/cyrus-imspd-1.8/lib/imclient.c:602: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).
	    imclient_write(imclient, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/imclient.c:607: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).
	    imclient_write(imclient, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/imclient.c:1074:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    n = read(imclient->fd, buf, sizeof(buf));
data/cyrus-imspd-1.8/lib/imclient.c:1078:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  n = read(imclient->fd, buf, sizeof(buf));
data/cyrus-imspd-1.8/lib/imclient.c:1180: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).
      t->len = strlen(user);
data/cyrus-imspd-1.8/lib/imclient.c:1189: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).
	  result[strlen(result) - 1] = '\0';
data/cyrus-imspd-1.8/lib/imclient.c:1192: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).
      t->len = strlen(result);
data/cyrus-imspd-1.8/lib/imclient.c:1393:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    char *newlist = xmalloc(strlen(mlist)+1);
data/cyrus-imspd-1.8/lib/imclient.c:1710: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).
    if (strlen(var_tls_CAfile) == 0)
data/cyrus-imspd-1.8/lib/imclient.c:1714: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).
    if (strlen(var_tls_CApath) == 0)
data/cyrus-imspd-1.8/lib/imclient.c:1725: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).
    if (strlen(var_tls_cert_file) == 0)
data/cyrus-imspd-1.8/lib/imclient.c:1729: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).
    if (strlen(var_tls_key_file) == 0)
data/cyrus-imspd-1.8/lib/imclient.c:1785: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).
	ss += strlen(ss);
data/cyrus-imspd-1.8/lib/imclient.c:1796: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).
	ss += strlen(ss);
data/cyrus-imspd-1.8/lib/imclient.c:1811: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).
	ret += strlen(buf);
data/cyrus-imspd-1.8/lib/imclient.c:1817: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).
	ret += strlen(buf);
data/cyrus-imspd-1.8/lib/iptostring.c:66: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).
    if(outlen < strlen(hbuf) + strlen(pbuf) + 2) {
data/cyrus-imspd-1.8/lib/iptostring.c:66:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(outlen < strlen(hbuf) + strlen(pbuf) + 2) {
data/cyrus-imspd-1.8/lib/map_nommap.c:96:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(fd, p, left);
data/cyrus-imspd-1.8/lib/mkchartable.c:519: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).
	p = buf + strlen(buf);
data/cyrus-imspd-1.8/lib/mpool.c:181: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(str);
data/cyrus-imspd-1.8/lib/n_binsearch.c:122:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((len = read(fd, buffer, buffSize)) < 0)
data/cyrus-imspd-1.8/lib/n_binsearch.c:150:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((len = read(fd, buffer + diff, buffSize - diff)) < 0)
data/cyrus-imspd-1.8/lib/prot.c:417:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(s->fd, s->buf, PROT_BUFSIZE);
data/cyrus-imspd-1.8/lib/prot.c:420:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    n = read(s->fd, s->buf, PROT_BUFSIZE);
data/cyrus-imspd-1.8/lib/prot.c:474:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    write(s->logfd, timebuf, strlen(timebuf));
data/cyrus-imspd-1.8/lib/prot.c:524: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).
	    write(s->logfd, timebuf, strlen(timebuf));
data/cyrus-imspd-1.8/lib/prot.c:639: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).
	    prot_write(s, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/prot.c:645: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).
	    prot_write(s, buf, strlen(buf));
data/cyrus-imspd-1.8/lib/prot.c:650: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).
	    prot_write(s, p, strlen(p));
data/cyrus-imspd-1.8/lib/prot.c:663: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).
    prot_write(s, fmt, strlen(fmt));
data/cyrus-imspd-1.8/lib/util.c:190: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(src) * 2 + 1;
data/cyrus-imspd-1.8/lib/xmalloc.c:91: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).
    char *p = xmalloc(strlen(str)+1);
data/cyrus-imspd-1.8/lib/xmalloc.c:99:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p, str, len);
data/cyrus-imspd-1.8/lib/xmalloc.c:115: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).
        return strlen(src);
data/cyrus-imspd-1.8/lib/xmalloc.c:136: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).
    o = strlen(dst);
data/cyrus-imspd-1.8/lib/xmalloc.c:138: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).
	return o + strlen(src);
data/cyrus-imspd-1.8/lib/xmalloc.c:147: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).
	return j + strlen(src + i);

ANALYSIS SUMMARY:

Hits = 639
Lines analyzed = 25882 in approximately 1.83 seconds (14158 lines/second)
Physical Source Lines of Code (SLOC) = 15760
Hits@level = [0] 300 [1] 213 [2] 290 [3]   2 [4] 134 [5]   0
Hits@level+ = [0+] 939 [1+] 639 [2+] 426 [3+] 136 [4+] 134 [5+]   0
Hits/KSLOC@level+ = [0+] 59.5812 [1+] 40.5457 [2+] 27.0305 [3+] 8.62944 [4+] 8.50254 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.