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/clamsmtp-1.10/common/stringx.c
Examining data/clamsmtp-1.10/common/smtppass.h
Examining data/clamsmtp-1.10/common/usuals.h
Examining data/clamsmtp-1.10/common/compat.c
Examining data/clamsmtp-1.10/common/stringx.h
Examining data/clamsmtp-1.10/common/sock_any.c
Examining data/clamsmtp-1.10/common/compat.h
Examining data/clamsmtp-1.10/common/sppriv.h
Examining data/clamsmtp-1.10/common/smtppass.c
Examining data/clamsmtp-1.10/common/spio.c
Examining data/clamsmtp-1.10/common/sock_any.h
Examining data/clamsmtp-1.10/src/clamsmtpd.c
Examining data/clamsmtp-1.10/src/clamsmtpd.h

FINAL RESULTS:

data/clamsmtp-1.10/common/smtppass.c:1843:13:  [5] (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 high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
            strncat(buf, strerror(e), MAX_MSGLEN);
data/clamsmtp-1.10/common/compat.c:222:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(t, "%s=%s", name, value);
data/clamsmtp-1.10/common/compat.c:453:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(err_file, fmt, ap);
data/clamsmtp-1.10/common/compat.c:474:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(err_file, fmt, ap);
data/clamsmtp-1.10/common/compat.c:507:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(err_file, fmt, ap);
data/clamsmtp-1.10/common/compat.c:527:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(err_file, fmt, ap);
data/clamsmtp-1.10/common/smtppass.c:1104:25:  [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(ctx->sender, t);
data/clamsmtp-1.10/common/smtppass.c:1124:25:  [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(ctx->recipients, t);
data/clamsmtp-1.10/common/smtppass.c:1139:29:  [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(ctx->xforwardaddr, t);
data/clamsmtp-1.10/common/smtppass.c:1146:29:  [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(ctx->xforwardhelo, t);
data/clamsmtp-1.10/common/sock_any.c:128: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, addr);
data/clamsmtp-1.10/common/sock_any.c:185: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, addr);
data/clamsmtp-1.10/common/sock_any.c:237: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(any->s.un.sun_path, addr);
data/clamsmtp-1.10/common/sock_any.c:259: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, addr);
data/clamsmtp-1.10/common/sock_any.c:320: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(addr, any->s.un.sun_path);
data/clamsmtp-1.10/common/spio.c:544:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, SP_LINE_LENGTH, fmt, ap);
data/clamsmtp-1.10/src/clamsmtpd.c:621: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(line, CLAM_SCAN);
data/clamsmtp-1.10/src/clamsmtpd.c:622: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(line, sp->cachename);
data/clamsmtp-1.10/src/clamsmtpd.c:730:17:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
            if(!mktemp(qfilename))
data/clamsmtp-1.10/src/clamsmtpd.c:787:13:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execl("/bin/sh", "sh", "-c", g_clstate.virusaction, NULL);            
data/clamsmtp-1.10/common/compat.c:218:5:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(getenv(name) && !overwrite)
data/clamsmtp-1.10/src/clamsmtpd.c:205: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((ch = getopt(argc, argv, "bc:d:D:f:h:l:m:p:qt:v")) != -1)
data/clamsmtp-1.10/common/compat.c:272:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if(!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) 
data/clamsmtp-1.10/common/compat.c:387:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char prognamebuf[256];
data/clamsmtp-1.10/common/smtppass.c:431:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE* f = fopen(g_state.pidfile, "w");
data/clamsmtp-1.10/common/smtppass.c:738:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAXPATHLEN];
data/clamsmtp-1.10/common/smtppass.c:783: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(&(addr.s.in.sin_addr), &(peeraddr.s.in.sin_addr), sizeof(addr.s.in.sin_addr));
data/clamsmtp-1.10/common/smtppass.c:793: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(&(addr.s.in.sin6_addr), &(peeraddr.s.in.sin6_addr), sizeof(addr.s.in.sin6_addr));
data/clamsmtp-1.10/common/smtppass.c:803:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(g_state.outaddr), &addr, sizeof(g_state.outaddr));
data/clamsmtp-1.10/common/smtppass.c:1364:19:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
        if((tfd = mkstemp(ctx->cachename)) == -1 ||
data/clamsmtp-1.10/common/smtppass.c:1436:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        const char *tzname[2] = { t2.tm_zone, t2.tm_zone };
data/clamsmtp-1.10/common/smtppass.c:1481: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 date[MAX_DATE_LENGTH];
data/clamsmtp-1.10/common/smtppass.c:1575: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 header[MAX_HEADER_LENGTH] = "";
data/clamsmtp-1.10/common/smtppass.c:1591:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(ctx->cachename, "r");
data/clamsmtp-1.10/common/smtppass.c:1697: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 + KL(SMTP_REJPREFIX) + KL(CRLF) + 1];
data/clamsmtp-1.10/common/smtppass.c:1815: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[MAX_MSGLEN];
data/clamsmtp-1.10/common/smtppass.c:2035:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(configfile, "r");
data/clamsmtp-1.10/common/smtppass.h: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 peername[MAXPATHLEN];          /* Name of the peer on other side of socket */
data/clamsmtp-1.10/common/smtppass.h:71:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char localname[MAXPATHLEN];         /* Address where we accepted the connection */
data/clamsmtp-1.10/common/smtppass.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 line[SP_LINE_LENGTH];  
data/clamsmtp-1.10/common/smtppass.h:129: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 cachename[MAXPATHLEN];     /* The name of the file that we cache into */
data/clamsmtp-1.10/common/smtppass.h:130: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 logline[SP_LOG_LINE_LEN];  /* Log line */  
data/clamsmtp-1.10/common/sock_any.c:58:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256];   
data/clamsmtp-1.10/common/sock_any.c:97:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(any->s.in.sin6_addr), &in6addr_loopback, sizeof(struct in6_addr));
data/clamsmtp-1.10/common/sock_any.c:280: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(&(any->s.a), res->ai_addr, sizeof(struct sockaddr));
data/clamsmtp-1.10/common/spio.c:80: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[MAX_LOG_LINE + 1];
data/clamsmtp-1.10/common/spio.c:95: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(buf, data, len);
data/clamsmtp-1.10/common/spio.c:537: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[SP_LINE_LENGTH];
data/clamsmtp-1.10/common/spio.c:606: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[16];
data/clamsmtp-1.10/src/clamsmtpd.c:703: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 qfilename[MAXPATHLEN];
data/clamsmtp-1.10/common/compat.c:163: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).
        return dlen + strlen(s);
data/clamsmtp-1.10/common/compat.c:192: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).
        len = strlen(find);
data/clamsmtp-1.10/common/compat.c:220: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).
	t = (char*)malloc((strlen(name) + strlen(value) + 2) * sizeof(char));
data/clamsmtp-1.10/common/compat.c:220: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).
	t = (char*)malloc((strlen(name) + strlen(value) + 2) * sizeof(char));
data/clamsmtp-1.10/common/compat.c:343:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ch = fgetc(stream);
data/clamsmtp-1.10/common/compat.c:398: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).
		temp = (temp > beg) ? temp : __argv[0] + strlen(__argv[0]);
data/clamsmtp-1.10/common/compat.c:403:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(prognamebuf, beg, temp - beg);
data/clamsmtp-1.10/common/smtppass.c:1102:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    ctx->sender = (char*)reallocf(ctx->sender, strlen(t) + 1);
data/clamsmtp-1.10/common/smtppass.c:1114:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    r = ctx->recipients ? strlen(ctx->recipients) : 0;
data/clamsmtp-1.10/common/smtppass.c:1115:76:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    ctx->recipients = (char*)reallocf(ctx->recipients, r + strlen(t) + 2);
data/clamsmtp-1.10/common/smtppass.c:1120:29:  [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(ctx->recipients, "\n");
data/clamsmtp-1.10/common/smtppass.c:1137:80:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        ctx->xforwardaddr = (char*)reallocf(ctx->xforwardaddr, strlen(t) + 1);
data/clamsmtp-1.10/common/smtppass.c:1144:80:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        ctx->xforwardhelo = (char*)reallocf(ctx->xforwardhelo, strlen(t) + 1);
data/clamsmtp-1.10/common/smtppass.c:1213: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).
    t = trim_start(t + strlen(part));
data/clamsmtp-1.10/common/smtppass.c:1260: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).
    int l = strlen(t);
data/clamsmtp-1.10/common/smtppass.c:1266: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).
    x = 2 + strlen(prefix) + strlen(line) + 1;
data/clamsmtp-1.10/common/smtppass.c:1266: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).
    x = 2 + strlen(prefix) + strlen(line) + 1;
data/clamsmtp-1.10/common/smtppass.c:1431: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).
    date_len = strlen(date);
data/clamsmtp-1.10/common/smtppass.c:1527: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).
                l = strlen(ctx->client.peername);
data/clamsmtp-1.10/common/smtppass.c:1528:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(p, ctx->client.peername, remaining);
data/clamsmtp-1.10/common/smtppass.c:1533: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).
                l = strlen(ctx->client.localname);
data/clamsmtp-1.10/common/smtppass.c:1534:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(p, ctx->client.localname, remaining);
data/clamsmtp-1.10/common/smtppass.c:1541: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).
                l = strlen(date);
data/clamsmtp-1.10/common/smtppass.c:1542:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(p, date, remaining);
data/clamsmtp-1.10/common/smtppass.c:1645:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(line, ". " CRLF, SP_LINE_LENGTH);
data/clamsmtp-1.10/common/smtppass.c:1707: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(smtp_status); 
data/clamsmtp-1.10/common/smtppass.c:1991: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).
        if(strlen(value) == 0)
data/clamsmtp-1.10/common/smtppass.c:1999: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).
        if(strlen(value) == 0)
data/clamsmtp-1.10/common/smtppass.c:2010: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).
        if(strlen(value) == 0)
data/clamsmtp-1.10/common/sock_any.c:124: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).
    l = strlen(addr);
data/clamsmtp-1.10/common/sock_any.c:174: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).
    l = strlen(addr);
data/clamsmtp-1.10/common/sock_any.c:232: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).
    l = strlen(addr);
data/clamsmtp-1.10/common/sock_any.c:251: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).
    l = strlen(addr);
data/clamsmtp-1.10/common/sock_any.c:313: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(any->s.un.sun_path);
data/clamsmtp-1.10/common/sock_any.c:344: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. Risk is low because the source is a
  constant character.
    strncat(addr, ":", addrlen);
data/clamsmtp-1.10/common/sock_any.c:347: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(addr);
data/clamsmtp-1.10/common/spio.c:78:73:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
static void log_io_data(spctx_t* ctx, spio_t* io, const char* data, int read)
data/clamsmtp-1.10/common/spio.c:99:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read ? " < " : " > ", buf);
data/clamsmtp-1.10/common/spio.c:374:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        x = read(io->fd, at, sizeof(char) * len);
data/clamsmtp-1.10/common/spio.c:522: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(data);
data/clamsmtp-1.10/common/spio.c:626:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        l = read(io->fd, buf, sizeof(buf) - 1);
data/clamsmtp-1.10/common/stringx.c:107: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 = line + strlen(line);
data/clamsmtp-1.10/common/stringx.c:139: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).
    char* t = data + strlen(data);
data/clamsmtp-1.10/src/clamsmtpd.c:441: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).
        if(strlen(g_clstate.header) == 0)
data/clamsmtp-1.10/src/clamsmtpd.c:448: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).
        if(strlen(g_clstate.header) == 0)
data/clamsmtp-1.10/src/clamsmtpd.c:623: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(line, "\n");
data/clamsmtp-1.10/src/clamsmtpd.c:650: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).
        x = strlen(sp->cachename);
data/clamsmtp-1.10/src/clamsmtpd.c:712:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (qfilename[strlen(qfilename) - 1] != '/')
data/clamsmtp-1.10/src/clamsmtpd.c:717: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).
        t = qfilename + strlen(qfilename);

ANALYSIS SUMMARY:

Hits = 99
Lines analyzed = 5401 in approximately 0.20 seconds (27164 lines/second)
Physical Source Lines of Code (SLOC) = 3286
Hits@level = [0]  23 [1]  49 [2]  28 [3]   2 [4]  19 [5]   1
Hits@level+ = [0+] 122 [1+]  99 [2+]  50 [3+]  22 [4+]  20 [5+]   1
Hits/KSLOC@level+ = [0+] 37.1272 [1+] 30.1278 [2+] 15.2161 [3+] 6.69507 [4+] 6.08643 [5+] 0.304321
Dot directories skipped = 2 (--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.