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/havp-0.93/havp/connectiontohttp.h
Examining data/havp-0.93/havp/utils.cpp
Examining data/havp-0.93/havp/httphandler.cpp
Examining data/havp-0.93/havp/whitelist.cpp
Examining data/havp-0.93/havp/sockethandler.h
Examining data/havp-0.93/havp/scannerhandler.cpp
Examining data/havp-0.93/havp/proxyhandler.h
Examining data/havp-0.93/havp/connectiontohttp.cpp
Examining data/havp-0.93/havp/genericscanner.cpp
Examining data/havp-0.93/havp/scannerhandler.h
Examining data/havp-0.93/havp/logfile.h
Examining data/havp-0.93/havp/genericscanner.h
Examining data/havp-0.93/havp/havp.cpp
Examining data/havp-0.93/havp/proxyhandler.cpp
Examining data/havp-0.93/havp/logfile.cpp
Examining data/havp-0.93/havp/connectiontobrowser.h
Examining data/havp-0.93/havp/havp.h
Examining data/havp-0.93/havp/whitelist.h
Examining data/havp-0.93/havp/httphandler.h
Examining data/havp-0.93/havp/scanners/sophiescanner.cpp
Examining data/havp-0.93/havp/scanners/kasperskyscanner.h
Examining data/havp-0.93/havp/scanners/f-protscanner.h
Examining data/havp-0.93/havp/scanners/avastscanner.h
Examining data/havp-0.93/havp/scanners/clamdscanner.h
Examining data/havp-0.93/havp/scanners/avgscanner.cpp
Examining data/havp-0.93/havp/scanners/arcavirscanner.h
Examining data/havp-0.93/havp/scanners/arcavirscanner.cpp
Examining data/havp-0.93/havp/scanners/sophiescanner.h
Examining data/havp-0.93/havp/scanners/trophiescanner.cpp
Examining data/havp-0.93/havp/scanners/nod32scanner.cpp
Examining data/havp-0.93/havp/scanners/avastscanner.cpp
Examining data/havp-0.93/havp/scanners/drwebscanner.cpp
Examining data/havp-0.93/havp/scanners/trophiescanner.h
Examining data/havp-0.93/havp/scanners/nod32scanner.h
Examining data/havp-0.93/havp/scanners/avgscanner.h
Examining data/havp-0.93/havp/scanners/kasperskyscanner.cpp
Examining data/havp-0.93/havp/scanners/f-protscanner.cpp
Examining data/havp-0.93/havp/scanners/drwebscanner.h
Examining data/havp-0.93/havp/scanners/clamdscanner.cpp
Examining data/havp-0.93/havp/scanners/clamlibscanner.h
Examining data/havp-0.93/havp/scanners/clamlibscanner.cpp
Examining data/havp-0.93/havp/utils.h
Examining data/havp-0.93/havp/params.h
Examining data/havp-0.93/havp/helper.h
Examining data/havp-0.93/havp/params.cpp
Examining data/havp-0.93/havp/sockethandler.cpp
Examining data/havp-0.93/havp/connectiontobrowser.cpp
Examining data/havp-0.93/havp/default.h
Examining data/havp-0.93/havp/helper.cpp

FINAL RESULTS:

data/havp-0.93/havp/logfile.cpp:99: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(str, LOGSTRINGLENGTH, formatT, args);
data/havp-0.93/havp/logfile.cpp:129: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(str, LOGSTRINGLENGTH, formatT, args);
data/havp-0.93/havp/logfile.cpp:159: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(str, LOGSTRINGLENGTH, formatT, args);
data/havp-0.93/havp/scannerhandler.cpp:230:13:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            srand(getpid() ^ time((time_t *) 0));
data/havp-0.93/havp/connectiontobrowser.cpp:35: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 porttemp[21];
data/havp-0.93/havp/genericscanner.cpp:26: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[100];
data/havp-0.93/havp/genericscanner.cpp:32:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        int fd = open(TempFileName, O_RDONLY);
data/havp-0.93/havp/genericscanner.cpp:42:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char Ready[2];
data/havp-0.93/havp/havp.cpp:44: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 TempFileName[MAXSCANTEMPFILELENGTH+1];
data/havp-0.93/havp/helper.cpp:44: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 TempFileName[MAXSCANTEMPFILELENGTH+1];
data/havp-0.93/havp/helper.cpp:191:24:  [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 ((fd_tempfile = mkstemp(TempFileName)) < 0)
data/havp-0.93/havp/helper.cpp:281: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(TempFileName, O_RDONLY)) < 0)
data/havp-0.93/havp/helper.cpp:299: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 tmpread[2];
data/havp-0.93/havp/logfile.cpp:69:22:  [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 ( (Error_fd = open(ErrorLogFileT, O_WRONLY|O_APPEND|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP)) < 0)
data/havp-0.93/havp/logfile.cpp:74:23:  [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 ( (Access_fd = open(AccessLogFileT, O_WRONLY|O_APPEND|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP)) < 0)
data/havp-0.93/havp/logfile.cpp:83:27:  [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).
    else if ( (Virus_fd = open(VirusLogFileT, O_WRONLY|O_APPEND|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP)) < 0)
data/havp-0.93/havp/logfile.cpp:95: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[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:108: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 strt[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:109: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 tmpdate[51];
data/havp-0.93/havp/logfile.cpp:125: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[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:138: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 strt[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:139: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 tmpdate[51];
data/havp-0.93/havp/logfile.cpp:155: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[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:168: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 strt[LOGSTRINGLENGTH+1];
data/havp-0.93/havp/logfile.cpp:169: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 tmpdate[51];
data/havp-0.93/havp/params.cpp:234:12:  [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).
    return atoi( params[param].c_str() );
data/havp-0.93/havp/proxyhandler.cpp:747: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 templen[21];
data/havp-0.93/havp/proxyhandler.cpp:1475:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char ErrorNumber[11];
data/havp-0.93/havp/scannerhandler.cpp:50: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 TempFileName[MAXSCANTEMPFILELENGTH+1];
data/havp-0.93/havp/scannerhandler.cpp:402: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[100];
data/havp-0.93/havp/scannerhandler.cpp:479: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[100];
data/havp-0.93/havp/scannerhandler.cpp:694:24:  [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 ((fd_tempfile = mkstemp(TempFileName)) < 0)
data/havp-0.93/havp/scanners/arcavirscanner.h:33: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 Ready[2];
data/havp-0.93/havp/scanners/avastscanner.h:30: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 Ready[2];
data/havp-0.93/havp/scanners/avgscanner.h:33: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 Ready[2];
data/havp-0.93/havp/scanners/clamdscanner.h:30: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 Ready[2];
data/havp-0.93/havp/scanners/clamlibscanner.h:31: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 Ready[2];
data/havp-0.93/havp/scanners/clamlibscanner.h:42: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 dbdir[255];
data/havp-0.93/havp/scanners/drwebscanner.cpp:190: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 code[512];
data/havp-0.93/havp/scanners/drwebscanner.cpp:203:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char vname[256];
data/havp-0.93/havp/scanners/drwebscanner.h:30: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 Ready[2];
data/havp-0.93/havp/scanners/f-protscanner.h:36: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 Ready[2];
data/havp-0.93/havp/scanners/kasperskyscanner.h:34: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 Ready[2];
data/havp-0.93/havp/scanners/nod32scanner.cpp:402: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 ScanCmd[1024];
data/havp-0.93/havp/scanners/nod32scanner.cpp:404:5:  [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(ScanCmd, "SCAN*cli*");
data/havp-0.93/havp/scanners/nod32scanner.cpp:406:5:  [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(ScanCmd, "**QUIT*");
data/havp-0.93/havp/scanners/nod32scanner.h:36: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 Ready[2];
data/havp-0.93/havp/scanners/sophiescanner.h:34: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 Ready[2];
data/havp-0.93/havp/scanners/trophiescanner.h:36: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 vscan_str[9]; /* holds 'VSCAN___' */
data/havp-0.93/havp/scanners/trophiescanner.h:37: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 version_string[11]; /* version string */
data/havp-0.93/havp/scanners/trophiescanner.h:49: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 this_is_how_windows_source_code_looks_like[156]; /* this is definitelly not right, but we don't really care for data inside :) */
data/havp-0.93/havp/scanners/trophiescanner.h:98: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 Ready[2];
data/havp-0.93/havp/scanners/trophiescanner.h:106: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 VIR_NAME[512];
data/havp-0.93/havp/sockethandler.cpp:334: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 buffer[MAXRECV+1];
data/havp-0.93/havp/sockethandler.cpp:393:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[MAXRECV+1];
data/havp-0.93/havp/sockethandler.cpp:503: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((char *) &my_s_addr.sin_addr.s_addr, server->h_addr_list[ip_count], server->h_length);
data/havp-0.93/havp/sockethandler.cpp:516: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((char *) &my_s_addr.sin_addr.s_addr, server->h_addr_list[0], server->h_length);
data/havp-0.93/havp/utils.cpp:182:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void encodeblock( unsigned char in[3], unsigned char out[4], int len )
data/havp-0.93/havp/utils.cpp:182:49:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void encodeblock( unsigned char in[3], unsigned char out[4], int len )
data/havp-0.93/havp/utils.cpp:192: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 result[5];
data/havp-0.93/havp/whitelist.cpp:39:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
 Input.open( URLListFileT.c_str());
data/havp-0.93/havp/genericscanner.cpp:43:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while (read(fd, Ready, 1) < 0 && errno == EINTR);
data/havp-0.93/havp/genericscanner.cpp:48:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((ret = read(fromhandler, buf, 1)) < 0)
data/havp-0.93/havp/genericscanner.cpp:71:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((ret = read(fromhandler, buf, 1)) < 0)
data/havp-0.93/havp/helper.cpp:175:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(077);
data/havp-0.93/havp/helper.cpp:189:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(TempFileName, Params::GetConfigString("SCANTEMPFILE").c_str(), MAXSCANTEMPFILELENGTH);
data/havp-0.93/havp/helper.cpp:301:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((testread = read(fd, tmpread, 1)) < 0 && errno == EINTR);
data/havp-0.93/havp/httphandler.cpp:31:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read;
data/havp-0.93/havp/httphandler.cpp:40:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ( read < 1 )
data/havp-0.93/havp/httphandler.cpp:45:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        received += read;
data/havp-0.93/havp/httphandler.cpp:69:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        SocketHandler::RecvLength( tempheader, read );
data/havp-0.93/havp/httphandler.cpp:88:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ( SocketHandler::RecvLength( headerT, read ) == false )
data/havp-0.93/havp/httphandler.cpp:93:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        poscount += read;
data/havp-0.93/havp/httphandler.cpp:94:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        received += read;
data/havp-0.93/havp/httphandler.cpp:236:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read;
data/havp-0.93/havp/httphandler.cpp:245:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ( read < 1 ) return -1;
data/havp-0.93/havp/httphandler.cpp:277:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        received += read;
data/havp-0.93/havp/logfile.cpp:79:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ( strcmp(VirusLogFileT, AccessLogFileT) == 0 || strlen(VirusLogFileT) == 0 )
data/havp-0.93/havp/logfile.cpp:115:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(strt, tmpdate, sizeof(tmpdate));
data/havp-0.93/havp/logfile.cpp:116: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(strt, str, LOGSTRINGLENGTH - sizeof(tmpdate) - 2);
data/havp-0.93/havp/logfile.cpp:118: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(Access_fd, strt, strlen(strt));
data/havp-0.93/havp/logfile.cpp:145:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(strt, tmpdate, sizeof(tmpdate));
data/havp-0.93/havp/logfile.cpp:146: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(strt, str, LOGSTRINGLENGTH - sizeof(tmpdate) - 2);
data/havp-0.93/havp/logfile.cpp:148: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(Virus_fd, strt, strlen(strt));
data/havp-0.93/havp/logfile.cpp:175:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(strt, tmpdate, sizeof(tmpdate));
data/havp-0.93/havp/logfile.cpp:176: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(strt, str, LOGSTRINGLENGTH - sizeof(tmpdate) - 2);
data/havp-0.93/havp/logfile.cpp:178: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(Error_fd, strt, strlen(strt));
data/havp-0.93/havp/scannerhandler.cpp:420:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((ret = read(Scanner[i].fromscanner, buf, 100)) < 0 && errno == EINTR);
data/havp-0.93/havp/scannerhandler.cpp:545:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((ret = read(Scanner[i].fromscanner, buf, 100)) < 0 && errno == EINTR);
data/havp-0.93/havp/scannerhandler.cpp:692:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(TempFileName, Params::GetConfigString("SCANTEMPFILE").c_str(), MAXSCANTEMPFILELENGTH);
data/havp-0.93/havp/scanners/clamlibscanner.cpp:274:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dbdir, Params::GetConfigString("CLAMDBDIR").c_str(), 254);
data/havp-0.93/havp/scanners/clamlibscanner.cpp:278:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dbdir, cl_retdbdir(), 254);
data/havp-0.93/havp/scanners/drwebscanner.cpp:144: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).
    int scan_slen = htonl( strlen(FileName) );
data/havp-0.93/havp/scanners/drwebscanner.cpp:150: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).
         Scanner.Send( FileName, strlen(FileName) ) == false ||
data/havp-0.93/havp/scanners/drwebscanner.cpp:160:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read;
data/havp-0.93/havp/scanners/drwebscanner.cpp:165:100:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        LogFile::ErrorMessage("Drweb: Could not read scanner response (rc, read: %d errno: %d)\n", read, errno);
data/havp-0.93/havp/scanners/drwebscanner.cpp:172:102:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        LogFile::ErrorMessage("Drweb: Could not read scanner response (vnum, read: %d errno: %d)\n", read, errno);
data/havp-0.93/havp/scanners/drwebscanner.cpp:209:114:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                LogFile::ErrorMessage("Drweb: Could not read scanner response (vnamelen, read: %d errno: %d)\n", read, errno);
data/havp-0.93/havp/scanners/drwebscanner.cpp:219:111:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                LogFile::ErrorMessage("Drweb: Could not read scanner response (vname, read: %d errno: %d)\n", read, errno);
data/havp-0.93/havp/scanners/nod32scanner.cpp:405: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(ScanCmd, FileName, 200);
data/havp-0.93/havp/scanners/nod32scanner.cpp:407:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int ScanLen = strlen(ScanCmd);
data/havp-0.93/havp/scanners/trophiescanner.cpp:48:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(VIR_NAME, virus_name, sizeof(VIR_NAME)-1);
data/havp-0.93/havp/sockethandler.cpp:179:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(my_u_addr.sun_path, SocketPath.c_str(), sizeof(my_u_addr.sun_path)-1);

ANALYSIS SUMMARY:

Hits = 103
Lines analyzed = 11129 in approximately 0.27 seconds (40982 lines/second)
Physical Source Lines of Code (SLOC) = 7473
Hits@level = [0]  25 [1]  42 [2]  57 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+] 128 [1+] 103 [2+]  61 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 17.1283 [1+] 13.783 [2+] 8.16272 [3+] 0.53526 [4+] 0.401445 [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.