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/e2guardian-5.3.4/src/Auth.cpp Examining data/e2guardian-5.3.4/src/Auth.hpp Examining data/e2guardian-5.3.4/src/BackedStore.cpp Examining data/e2guardian-5.3.4/src/BackedStore.hpp Examining data/e2guardian-5.3.4/src/BaseSocket.cpp Examining data/e2guardian-5.3.4/src/BaseSocket.hpp Examining data/e2guardian-5.3.4/src/CertificateAuthority.cpp Examining data/e2guardian-5.3.4/src/CertificateAuthority.hpp Examining data/e2guardian-5.3.4/src/ConfigVar.cpp Examining data/e2guardian-5.3.4/src/ConfigVar.hpp Examining data/e2guardian-5.3.4/src/ConnectionHandler.cpp Examining data/e2guardian-5.3.4/src/ConnectionHandler.hpp Examining data/e2guardian-5.3.4/src/ContentScanner.cpp Examining data/e2guardian-5.3.4/src/ContentScanner.hpp Examining data/e2guardian-5.3.4/src/DataBuffer.cpp Examining data/e2guardian-5.3.4/src/DataBuffer.hpp Examining data/e2guardian-5.3.4/src/DebugManager.cpp Examining data/e2guardian-5.3.4/src/DebugManager.hpp Examining data/e2guardian-5.3.4/src/DownloadManager.cpp Examining data/e2guardian-5.3.4/src/DownloadManager.hpp Examining data/e2guardian-5.3.4/src/DynamicIPList.cpp Examining data/e2guardian-5.3.4/src/DynamicIPList.hpp Examining data/e2guardian-5.3.4/src/DynamicURLList.cpp Examining data/e2guardian-5.3.4/src/DynamicURLList.hpp Examining data/e2guardian-5.3.4/src/FDFuncs.cpp Examining data/e2guardian-5.3.4/src/FDFuncs.hpp Examining data/e2guardian-5.3.4/src/FDTunnel.cpp Examining data/e2guardian-5.3.4/src/FDTunnel.hpp Examining data/e2guardian-5.3.4/src/FOptionContainer.cpp Examining data/e2guardian-5.3.4/src/FOptionContainer.hpp Examining data/e2guardian-5.3.4/src/FatController.cpp Examining data/e2guardian-5.3.4/src/FatController.hpp Examining data/e2guardian-5.3.4/src/HTMLTemplate.cpp Examining data/e2guardian-5.3.4/src/HTMLTemplate.hpp Examining data/e2guardian-5.3.4/src/HTTPHeader.cpp Examining data/e2guardian-5.3.4/src/HTTPHeader.hpp Examining data/e2guardian-5.3.4/src/ICAPHeader.cpp Examining data/e2guardian-5.3.4/src/ICAPHeader.hpp Examining data/e2guardian-5.3.4/src/IPList.cpp Examining data/e2guardian-5.3.4/src/IPList.hpp Examining data/e2guardian-5.3.4/src/ImageContainer.cpp Examining data/e2guardian-5.3.4/src/ImageContainer.hpp Examining data/e2guardian-5.3.4/src/LOptionContainer.cpp Examining data/e2guardian-5.3.4/src/LOptionContainer.hpp Examining data/e2guardian-5.3.4/src/LanguageContainer.cpp Examining data/e2guardian-5.3.4/src/LanguageContainer.hpp Examining data/e2guardian-5.3.4/src/ListContainer.cpp Examining data/e2guardian-5.3.4/src/ListContainer.hpp Examining data/e2guardian-5.3.4/src/ListManager.cpp Examining data/e2guardian-5.3.4/src/ListManager.hpp Examining data/e2guardian-5.3.4/src/ListMeta.cpp Examining data/e2guardian-5.3.4/src/ListMeta.hpp Examining data/e2guardian-5.3.4/src/NaughtyFilter.cpp Examining data/e2guardian-5.3.4/src/NaughtyFilter.hpp Examining data/e2guardian-5.3.4/src/OptionContainer.cpp Examining data/e2guardian-5.3.4/src/OptionContainer.hpp Examining data/e2guardian-5.3.4/src/Plugin.hpp Examining data/e2guardian-5.3.4/src/Queue.hpp Examining data/e2guardian-5.3.4/src/RegExp.cpp Examining data/e2guardian-5.3.4/src/RegExp.hpp Examining data/e2guardian-5.3.4/src/SBFunction.cpp Examining data/e2guardian-5.3.4/src/SBFunction.hpp Examining data/e2guardian-5.3.4/src/SNI.cpp Examining data/e2guardian-5.3.4/src/Socket.cpp Examining data/e2guardian-5.3.4/src/Socket.hpp Examining data/e2guardian-5.3.4/src/SocketArray.cpp Examining data/e2guardian-5.3.4/src/SocketArray.hpp Examining data/e2guardian-5.3.4/src/StoryBoard.cpp Examining data/e2guardian-5.3.4/src/StoryBoard.hpp Examining data/e2guardian-5.3.4/src/String.cpp Examining data/e2guardian-5.3.4/src/String.hpp Examining data/e2guardian-5.3.4/src/SysV.cpp Examining data/e2guardian-5.3.4/src/SysV.hpp Examining data/e2guardian-5.3.4/src/UDSocket.cpp Examining data/e2guardian-5.3.4/src/UDSocket.hpp Examining data/e2guardian-5.3.4/src/UrlRec.hpp Examining data/e2guardian-5.3.4/src/authplugins/digest.cpp Examining data/e2guardian-5.3.4/src/authplugins/dnsauth.cpp Examining data/e2guardian-5.3.4/src/authplugins/header.cpp Examining data/e2guardian-5.3.4/src/authplugins/ident.cpp Examining data/e2guardian-5.3.4/src/authplugins/ip.cpp Examining data/e2guardian-5.3.4/src/authplugins/ntlm.cpp Examining data/e2guardian-5.3.4/src/authplugins/port.cpp Examining data/e2guardian-5.3.4/src/authplugins/proxy.cpp Examining data/e2guardian-5.3.4/src/contentscanners/avastdscan.cpp Examining data/e2guardian-5.3.4/src/contentscanners/clamdscan.cpp Examining data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp Examining data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp Examining data/e2guardian-5.3.4/src/contentscanners/kavdscan.cpp Examining data/e2guardian-5.3.4/src/downloadmanagers/default.cpp Examining data/e2guardian-5.3.4/src/downloadmanagers/fancy.cpp Examining data/e2guardian-5.3.4/src/downloadmanagers/trickle.cpp Examining data/e2guardian-5.3.4/src/e2guardian.cpp Examining data/e2guardian-5.3.4/src/md5.cpp Examining data/e2guardian-5.3.4/src/md5.hpp FINAL RESULTS: data/e2guardian-5.3.4/src/contentscanners/avastdscan.cpp:130:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(filename, S_IRGRP | S_IRUSR) != 0) { data/e2guardian-5.3.4/src/contentscanners/clamdscan.cpp:107:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(filename, S_IRGRP | S_IRUSR ) != 0) { data/e2guardian-5.3.4/src/contentscanners/kavdscan.cpp:99:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(filename, S_IRGRP | S_IRUSR) != 0) { data/e2guardian-5.3.4/src/CertificateAuthority.cpp:41:9: [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, tmess.c_str(), site); data/e2guardian-5.3.4/src/ContentScanner.cpp:90: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(tempfilepatharray, tempfilepath.toCharArray()); data/e2guardian-5.3.4/src/DataBuffer.cpp:179: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(tempfilepatharray, tempfilepath.toCharArray()); data/e2guardian-5.3.4/src/DebugManager.cpp:81: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,output.c_str()); data/e2guardian-5.3.4/src/DebugManager.cpp:102: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(v,tmp.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:576:29: [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. int systemreturn = execl(buff.c_str(), buff.c_str(), buff1.c_str(), (char *)NULL); // should not return from call data/e2guardian-5.3.4/src/FatController.cpp:1108:38: [4] (shell) popen: 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. FILE *mail = popen(o.mailer.c_str(), "w"); data/e2guardian-5.3.4/src/FatController.cpp:1169:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Data/Time:", when.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1173:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "User:", who.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1176:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s (%s)\n", "From:", from.c_str(), ((clienthost.length() > 0) ? clienthost.c_str() : "-")); data/e2guardian-5.3.4/src/FatController.cpp:1178:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Where:", where.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1180:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Why:", what.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1182:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Method:", how.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1184:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Size:", ssize.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1186:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Weight:", sweight.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1189:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Category:", cat.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1192:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Mime type:", mimetype.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1194:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n", "Group:", ldl->fg[filtergroup]->name.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1196:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vbody_temp, "%-10s%s\n\n", "HTTP resp:", stringcode.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:1224:46: [4] (shell) popen: 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. FILE *mail = popen(o.mailer.c_str(), "w"); data/e2guardian-5.3.4/src/String.cpp:575:10: [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). std::strcpy(temp.get(), (this)->c_str()); data/e2guardian-5.3.4/src/UDSocket.cpp:109: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(my_adr.sun_path, path); data/e2guardian-5.3.4/src/UDSocket.cpp:124: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(my_adr.sun_path, path); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:130: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(newthing, i->c_str()); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:273:9: [4] (shell) execv: 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. execv(arguments[0], arguments); data/e2guardian-5.3.4/src/e2guardian.cpp:101:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/e2guardian-5.3.4/src/BackedStore.cpp:101:23: [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 = mkstemp(filename)) < 0) { data/e2guardian-5.3.4/src/BackedStore.cpp:250:20: [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 ((storefd = mkstemp(storedname)) < 0) { data/e2guardian-5.3.4/src/BaseSocket.cpp:531: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(buff, buffer + buffstart, tocopy); data/e2guardian-5.3.4/src/BaseSocket.cpp:581: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(buff, buffer + buffstart, tocopy); data/e2guardian-5.3.4/src/BaseSocket.hpp: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 buffer[4096]; data/e2guardian-5.3.4/src/CertificateAuthority.cpp:46: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 buff[512]; data/e2guardian-5.3.4/src/CertificateAuthority.cpp:67:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(caCert, "r"); data/e2guardian-5.3.4/src/CertificateAuthority.cpp:83:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(caPrivKey, "r"); data/e2guardian-5.3.4/src/CertificateAuthority.cpp:98:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(certPrivKey, "r"); data/e2guardian-5.3.4/src/CertificateAuthority.cpp:126: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 cnhash[EVP_MAX_MD_SIZE]; data/e2guardian-5.3.4/src/CertificateAuthority.cpp:215:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(path.c_str(), O_RDWR | O_CREAT, S_IWUSR | S_IRUSR); //only e2g has access data/e2guardian-5.3.4/src/CertificateAuthority.cpp:449:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *link = fopen(path.c_str(), "r"); data/e2guardian-5.3.4/src/ConfigVar.cpp:45: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[2048]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:168:9: [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, "%02x", c); data/e2guardian-5.3.4/src/ConnectionHandler.cpp:357:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(cm.tempfilename.toCharArray(), O_RDONLY); data/e2guardian-5.3.4/src/ConnectionHandler.cpp:557: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. char t[256]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:968: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. char res[INET_ADDRSTRLEN]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:993:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char res[INET_ADDRSTRLEN]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:1464:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[2]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:2582: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. char p[400]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:3281: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 buff[2048]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:3353: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. char res[INET_ADDRSTRLEN]; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:3903:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[2]; data/e2guardian-5.3.4/src/ContentScanner.cpp:93:23: [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 ((tempfilefd = mkstemp(tempfilepatharray)) < 1) { data/e2guardian-5.3.4/src/DataBuffer.cpp:48: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(data, indata, length); data/e2guardian-5.3.4/src/DataBuffer.cpp:182:23: [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 ((tempfilefd = mkstemp(tempfilepatharray)) < 0) { data/e2guardian-5.3.4/src/DataBuffer.cpp:463: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(temp, block, bytesgot); data/e2guardian-5.3.4/src/DataBuffer.cpp:480: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(data, block, bytesgot); data/e2guardian-5.3.4/src/DataBuffer.cpp:581:21: [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(dstpos, data + srcoff, nextoffset - srcoff); data/e2guardian-5.3.4/src/DataBuffer.cpp:586:17: [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(dstpos, newrep->replacement.toCharArray(), replen); data/e2guardian-5.3.4/src/DataBuffer.cpp:593:17: [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(dstpos, data + srcoff, buffer_length - srcoff); data/e2guardian-5.3.4/src/DataBuffer.hpp:47: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(location, data, buffer_length); data/e2guardian-5.3.4/src/DebugManager.cpp:13:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pFile = fopen(m_path_debuglevel.c_str(),"a"); data/e2guardian-5.3.4/src/DebugManager.cpp: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 buff[2000]; data/e2guardian-5.3.4/src/DynamicURLList.cpp:180:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. std::cerr << thread_id << (char *)(index[i] * 1000 + urls) << std::endl; data/e2guardian-5.3.4/src/DynamicURLList.cpp:248: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(u, url, 999); data/e2guardian-5.3.4/src/DynamicURLList.cpp:282: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(urlref, u, len); data/e2guardian-5.3.4/src/DynamicURLList.cpp:311: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(oldestref, u, len); data/e2guardian-5.3.4/src/FDTunnel.cpp:54: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 buff[32000]; data/e2guardian-5.3.4/src/FDTunnel.cpp: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 buff[32768]; // buffer for the input data/e2guardian-5.3.4/src/FatController.cpp:150:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fs = fopen(o.dstat_location.c_str(), "a"); data/e2guardian-5.3.4/src/FatController.cpp:192: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 buffer [50]; data/e2guardian-5.3.4/src/FatController.cpp:287: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). FILE *fs = fopen(ftouch.c_str(), "w"); data/e2guardian-5.3.4/src/FatController.cpp:448: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). if ((nullfd = open("/dev/null", O_WRONLY, 0)) == -1) { data/e2guardian-5.3.4/src/FatController.cpp:710: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 sysname[256]; data/e2guardian-5.3.4/src/FatController.cpp:770:35: [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). isexception = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:776: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). isnaughty = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:779:35: [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). naughtytype = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:800:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). port = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:803:34: [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). wasscanned = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:806:35: [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). wasinfected = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:809:39: [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). contentmodified = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:812:35: [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). urlmodified = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:815:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). headermodified = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:821:35: [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). filtergroup = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:825:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). code = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:828:32: [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). cachehit = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:834:30: [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). tv_sec = atol(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:837: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). tv_usec = atol(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:855:35: [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). headeradded = atoi(logline.c_str()); data/e2guardian-5.3.4/src/FatController.cpp:958:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32]; data/e2guardian-5.3.4/src/HTTPHeader.cpp: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(postdata, data, len); data/e2guardian-5.3.4/src/HTTPHeader.cpp:1432: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[2]; data/e2guardian-5.3.4/src/HTTPHeader.cpp:1552:9: [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, "%02x", c); data/e2guardian-5.3.4/src/HTTPHeader.cpp:1752: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 header[4096]; data/e2guardian-5.3.4/src/HTTPHeader.cpp:1811: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 buff[32768]; // setup a buffer to hold the incomming HTTP line data/e2guardian-5.3.4/src/ICAPHeader.cpp:313: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[2]; data/e2guardian-5.3.4/src/ICAPHeader.cpp:645: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 buff[32768]; // setup a buffer to hold the incomming ICAP line data/e2guardian-5.3.4/src/IPList.cpp:119: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[2048]; data/e2guardian-5.3.4/src/ImageContainer.cpp:91: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). imagefile.open(filename, std::ifstream::binary); data/e2guardian-5.3.4/src/LOptionContainer.cpp:41: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 buff[40]; data/e2guardian-5.3.4/src/LOptionContainer.cpp:43:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buff, "%ld", time(NULL)); data/e2guardian-5.3.4/src/ListContainer.cpp:374:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linebuffer[20000]; // increased to allow checking of line length data/e2guardian-5.3.4/src/NaughtyFilter.cpp:215: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 hexval[5] = "0x"; // Initializes a "hexadecimal string" data/e2guardian-5.3.4/src/Socket.cpp:137: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 res[INET_ADDRSTRLEN]; data/e2guardian-5.3.4/src/Socket.cpp:143: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 res[INET_ADDRSTRLEN]; data/e2guardian-5.3.4/src/Socket.cpp:450: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. char junk[1024]; data/e2guardian-5.3.4/src/Socket.cpp:1013: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(buff, buffer + buffstart, tocopy); data/e2guardian-5.3.4/src/Socket.cpp:1071: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(buff, buffer + buffstart, tocopy); data/e2guardian-5.3.4/src/Socket.cpp:1120:15: [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(buff, buffer + buffstart, tocopy); data/e2guardian-5.3.4/src/Socket.cpp:1174: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 size[40]; data/e2guardian-5.3.4/src/Socket.cpp:1210: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 trailer[32000]; data/e2guardian-5.3.4/src/Socket.cpp:1235: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 ts[2]; data/e2guardian-5.3.4/src/Socket.cpp:1250: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 buff[32000]; data/e2guardian-5.3.4/src/Socket.cpp:1284: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 buff[32000]; data/e2guardian-5.3.4/src/String.cpp:119:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[2] = "1"; data/e2guardian-5.3.4/src/String.cpp:122: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 buff[2] = "0"; data/e2guardian-5.3.4/src/String.cpp:184:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return (atoi(this->c_str())); data/e2guardian-5.3.4/src/String.cpp:193:13: [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). return (atol(this->c_str())); data/e2guardian-5.3.4/src/String.cpp:282: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 hexval[5] = "0x"; // Initializes a "hexadecimal string" data/e2guardian-5.3.4/src/String.cpp:552:9: [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, "%02X", (unsigned char)(md5array[i])); data/e2guardian-5.3.4/src/String.cpp:588: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 *p[c + 1]; data/e2guardian-5.3.4/src/SysV.cpp:58: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 handle = open(pidfile.c_str(), O_RDONLY); data/e2guardian-5.3.4/src/SysV.cpp: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 pidbuff[32]; data/e2guardian-5.3.4/src/SysV.cpp:70: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(pidbuff); // convert the string to a pid data/e2guardian-5.3.4/src/SysV.cpp:179:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(pidfile.c_str(), O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/e2guardian-5.3.4/src/SysV.cpp:186: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 pidbuff[32]; data/e2guardian-5.3.4/src/SysV.cpp:187:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pidbuff, "%d", (int)p); // Messy, but it works! data/e2guardian-5.3.4/src/authplugins/dnsauth.cpp:261: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. char p[400]; data/e2guardian-5.3.4/src/authplugins/ident.cpp: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 buff[8192]; data/e2guardian-5.3.4/src/authplugins/ip.cpp:302: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[2048]; data/e2guardian-5.3.4/src/authplugins/ntlm.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 hostname[256]; data/e2guardian-5.3.4/src/authplugins/ntlm.cpp: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 signature[8]; // literally NTLMSSP\0 data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:123: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 payload[256 * 6]; // String data - enough for everything at 255 chars data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:131: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[sizeof(ntlm_auth)]; data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:289: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. static char username[256]; // fixed size data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:290: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. static char username2[256]; data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:306: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((void *)auth.buf, (const void *)message.c_str(), message.length()); data/e2guardian-5.3.4/src/authplugins/ntlm.cpp:318:17: [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 *)username, (const void *)&(auth.buf[b]), l); data/e2guardian-5.3.4/src/authplugins/port.cpp:194: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[2048]; data/e2guardian-5.3.4/src/contentscanners/avastdscan.cpp:148: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[4096]; data/e2guardian-5.3.4/src/contentscanners/avastdscan.cpp:301: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 Enc[Str.length() * 2]; data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:125:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. arguments = new char *[numarguments + 2]; data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:171:37: [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). tempinfectedcodes.push_back(atoi(result)); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:187:34: [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). tempcleancodes.push_back(atoi(result)); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:287: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 buff[8192]; data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:155: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 buff[8192]; data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:284: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 objectsizehex[32]; data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:368: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 filefd = open(filename, O_RDONLY); data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:424:17: [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(object, data, (rc > 100) ? 100 : rc); data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:444: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 objectsizehex[32]; data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:518: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(object + objectsize, data, (rc > (100 - objectsize)) ? (100 - objectsize) : rc); data/e2guardian-5.3.4/src/contentscanners/icapscan.cpp:596: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 objectsizehex[32]; data/e2guardian-5.3.4/src/downloadmanagers/default.cpp:229:17: [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, d->data, d->buffer_length); // copy the current data data/e2guardian-5.3.4/src/downloadmanagers/default.cpp:230:17: [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 + d->buffer_length, block, rc); // copy the new data data/e2guardian-5.3.4/src/downloadmanagers/fancy.cpp:387:17: [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, d->data, d->buffer_length); // copy the current data data/e2guardian-5.3.4/src/downloadmanagers/fancy.cpp:388:17: [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 + d->buffer_length, block, rc); // copy the new data data/e2guardian-5.3.4/src/downloadmanagers/fancy.cpp:488: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 result[9]; data/e2guardian-5.3.4/src/downloadmanagers/trickle.cpp:247:17: [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, d->data, d->buffer_length); // copy the current data data/e2guardian-5.3.4/src/downloadmanagers/trickle.cpp:248:17: [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 + d->buffer_length, block, rc); // copy the new data data/e2guardian-5.3.4/src/e2guardian.cpp:77:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int rc = open(configfile.c_str(), 0, O_RDONLY); data/e2guardian-5.3.4/src/e2guardian.cpp:281: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 cfile[file.length() + 129]; data/e2guardian-5.3.4/src/e2guardian.cpp:282: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(cfile, file.c_str(), sizeof(char) * file.length()); data/e2guardian-5.3.4/src/md5.cpp:38: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. #define memcpy(d, s, n) bcopy((s), (d), (n)) data/e2guardian-5.3.4/src/md5.cpp:38:25: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy(d, s, n) bcopy((s), (d), (n)) data/e2guardian-5.3.4/src/md5.cpp:65:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; data/e2guardian-5.3.4/src/md5.cpp:112: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(&ctx->buffer[bytes], fillbuf, pad); data/e2guardian-5.3.4/src/md5.cpp:132: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[BLOCKSIZE + 72]; data/e2guardian-5.3.4/src/md5.cpp:203: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(&ctx->buffer[left_over], buffer, add); data/e2guardian-5.3.4/src/md5.cpp:211: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(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); data/e2guardian-5.3.4/src/md5.cpp:229: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(&ctx->buffer[left_over], buffer, len); data/e2guardian-5.3.4/src/md5.cpp:234: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(ctx->buffer, &ctx->buffer[64], left_over); data/e2guardian-5.3.4/src/md5.hpp:88: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[128]; data/e2guardian-5.3.4/src/md5.hpp:90: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[128] __attribute__((__aligned__(__alignof__(md5_uint32)))); data/e2guardian-5.3.4/src/BackedStore.cpp:100:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0007); // only allow access to e2g user and group data/e2guardian-5.3.4/src/BackedStore.cpp:249:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); data/e2guardian-5.3.4/src/BaseSocket.cpp:473:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(line); data/e2guardian-5.3.4/src/CertificateAuthority.cpp:153:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!failed && EVP_DigestUpdate(mdctx, sname.c_str(), strlen(sname.c_str())) < 1) { data/e2guardian-5.3.4/src/ConfigVar.cpp:65: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). int offset = strlen(parameter) - 1; data/e2guardian-5.3.4/src/ConfigVar.cpp:70: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). offset = strlen(command) - 1; data/e2guardian-5.3.4/src/ConnectionHandler.cpp:160: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). for (int i = 0; i < (signed) strlen(s); i++) { data/e2guardian-5.3.4/src/ConnectionHandler.cpp:483:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); // don't hammer upstream data/e2guardian-5.3.4/src/ContentScanner.cpp:92:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0007); // only allow access to e2g user and group data/e2guardian-5.3.4/src/DataBuffer.cpp:181:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0007); // only allow access to e2g user and group data/e2guardian-5.3.4/src/DebugManager.cpp:104: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). for(j=0;j<strlen(v);j++) data/e2guardian-5.3.4/src/DebugManager.cpp:112: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). for(j=0;j<strlen(v);j++) data/e2guardian-5.3.4/src/DynamicURLList.cpp:89: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). int alen = strlen(i); data/e2guardian-5.3.4/src/DynamicURLList.cpp:90: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). int blen = strlen(url); data/e2guardian-5.3.4/src/DynamicURLList.cpp:187: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(url) > 999) { data/e2guardian-5.3.4/src/DynamicURLList.cpp:239: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(url); data/e2guardian-5.3.4/src/FDFuncs.cpp:21:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, count); data/e2guardian-5.3.4/src/FOptionContainer.cpp:120: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(filename) < 3) { data/e2guardian-5.3.4/src/FOptionContainer.cpp:186:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool FOptionContainer::read(const char *filename) { data/e2guardian-5.3.4/src/FOptionContainer.hpp:124:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(const char *filename); data/e2guardian-5.3.4/src/FatController.cpp:149:21: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). old_umask = umask(S_IWGRP | S_IWOTH); data/e2guardian-5.3.4/src/FatController.cpp:164:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(old_umask); data/e2guardian-5.3.4/src/FatController.cpp:286:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(S_IWOTH); data/e2guardian-5.3.4/src/FatController.cpp:479:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); // clear our file mode creation mask data/e2guardian-5.3.4/src/FatController.cpp:480:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(S_IWGRP | S_IWOTH); // set to mor sensible setting?? data/e2guardian-5.3.4/src/HTTPHeader.cpp:1544: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). for (int i = 0; i < (signed)strlen(s); i++) { data/e2guardian-5.3.4/src/IPList.cpp:133: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 (strlen(buffer) < 7) data/e2guardian-5.3.4/src/ImageContainer.cpp:75:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool ImageContainer::read(const char *filename) data/e2guardian-5.3.4/src/ImageContainer.cpp:100:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). imagefile.read(image, imagelength); data/e2guardian-5.3.4/src/ImageContainer.hpp:23:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(const char *filename); data/e2guardian-5.3.4/src/LOptionContainer.cpp:318:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool LOptionContainer::read(std::string& filename, int type, std::string& exception_ip_list_location, data/e2guardian-5.3.4/src/LOptionContainer.cpp:750:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool rc = (*fg[numfg]).read(filename); data/e2guardian-5.3.4/src/LOptionContainer.hpp:75:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(std::string& filename, int type, std::string& exception_ip_list_location, data/e2guardian-5.3.4/src/ListContainer.cpp:798:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:799:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t blen = strlen(b); data/e2guardian-5.3.4/src/ListContainer.cpp:821:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:822:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t blen = strlen(b); data/e2guardian-5.3.4/src/ListContainer.cpp:1527: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). int alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:1528: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). int blen = strlen(b); data/e2guardian-5.3.4/src/ListContainer.cpp:1545: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). int alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:1546: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). int blen = strlen(b); data/e2guardian-5.3.4/src/ListContainer.cpp:1562: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). int alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:1563: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). int blen = strlen(b); data/e2guardian-5.3.4/src/ListContainer.cpp:1589: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). int alen = strlen(a); data/e2guardian-5.3.4/src/ListContainer.cpp:1590: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). int blen = strlen(b); data/e2guardian-5.3.4/src/ListMeta.cpp:395: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(filename) < 3) { data/e2guardian-5.3.4/src/OptionContainer.cpp:78:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool OptionContainer::read(std::string& filename, int type) data/e2guardian-5.3.4/src/OptionContainer.cpp:545:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). banned_image.read(custom_banned_image_file.c_str()); data/e2guardian-5.3.4/src/OptionContainer.cpp:553:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). banned_flash.read(custom_banned_flash_file.c_str()); data/e2guardian-5.3.4/src/OptionContainer.hpp:243:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(std::string& filename, int type); data/e2guardian-5.3.4/src/RegExp.cpp:190:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(submatch, pos + pmatch[i].rm_so, matchlen); data/e2guardian-5.3.4/src/Socket.cpp:940: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(line); data/e2guardian-5.3.4/src/StoryBoard.cpp:57: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(filename) < 3) { data/e2guardian-5.3.4/src/String.cpp:148: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). size_t whatlen = strlen(what); data/e2guardian-5.3.4/src/String.cpp:149: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). size_t withlen = strlen(with); data/e2guardian-5.3.4/src/String.cpp:358: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 (this->length() >= strlen(s)) { data/e2guardian-5.3.4/src/String.cpp:369: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 (this->length() < strlen(bs)) data/e2guardian-5.3.4/src/String.cpp:374: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). return this->substr(i + strlen(bs)); data/e2guardian-5.3.4/src/String.cpp:380: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 (this->length() < strlen(bs)) data/e2guardian-5.3.4/src/SysV.cpp:63:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int rc = read(handle, pidbuff, sizeof(pidbuff) - 1); data/e2guardian-5.3.4/src/SysV.cpp:188: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(pidbuff) + 1; data/e2guardian-5.3.4/src/UDSocket.cpp:48: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(my_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:50: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(peer_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:61: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(my_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:63: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(peer_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:72: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). my_adr_length = sizeof(my_adr.sun_family) + strlen(my_adr.sun_path); data/e2guardian-5.3.4/src/UDSocket.cpp:85: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(my_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:87: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(peer_adr.sun_path, ""); data/e2guardian-5.3.4/src/UDSocket.cpp:94: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). my_adr_length = sizeof(my_adr.sun_family) + strlen(my_adr.sun_path); data/e2guardian-5.3.4/src/UDSocket.cpp:103: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(path) > 108) data/e2guardian-5.3.4/src/UDSocket.cpp:111:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). my_adr_length = offsetof(struct sockaddr_un, sun_path) + strlen(path); data/e2guardian-5.3.4/src/UDSocket.cpp:119: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(path) > 108) data/e2guardian-5.3.4/src/UDSocket.cpp:126:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). my_adr_length = offsetof(struct sockaddr_un, sun_path) + strlen(path); data/e2guardian-5.3.4/src/authplugins/ip.cpp:312: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 (strlen(buffer) < 10) data/e2guardian-5.3.4/src/authplugins/port.cpp:204: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 (strlen(buffer) < 10) data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:114:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempprogname, progname.c_str(), progname.length()); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:165:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempcodes, sinfectedcodes.c_str(), sinfectedcodes.length()); data/e2guardian-5.3.4/src/contentscanners/commandlinescan.cpp:180:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempcodes, scleancodes.c_str(), scleancodes.length()); data/e2guardian-5.3.4/src/downloadmanagers/trickle.cpp:163:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_written = read(d->tempfilefd, &byte, 1); data/e2guardian-5.3.4/src/e2guardian.cpp:85:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!o.read(configfile, type)) { data/e2guardian-5.3.4/src/e2guardian.cpp:116: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). for (unsigned int j = 1; j < strlen(argv[i]); j++) { data/e2guardian-5.3.4/src/e2guardian.cpp:185: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 (strlen(argv[i]) != 4) { data/e2guardian-5.3.4/src/e2guardian.cpp:458:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!o.read(configfile, 2)) { ANALYSIS SUMMARY: Hits = 256 Lines analyzed = 34806 in approximately 0.95 seconds (36546 lines/second) Physical Source Lines of Code (SLOC) = 26697 Hits@level = [0] 408 [1] 83 [2] 144 [3] 1 [4] 25 [5] 3 Hits@level+ = [0+] 664 [1+] 256 [2+] 173 [3+] 29 [4+] 28 [5+] 3 Hits/KSLOC@level+ = [0+] 24.8717 [1+] 9.58909 [2+] 6.48013 [3+] 1.08626 [4+] 1.04881 [5+] 0.112372 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.