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/zorp-7.0.1~alpha2/lib/attach.cc Examining data/zorp-7.0.1~alpha2/lib/authprovider.cc Examining data/zorp-7.0.1~alpha2/lib/certchain.cc Examining data/zorp-7.0.1~alpha2/lib/connection.cc Examining data/zorp-7.0.1~alpha2/lib/coredump.cc Examining data/zorp-7.0.1~alpha2/lib/dgram.cc Examining data/zorp-7.0.1~alpha2/lib/dimhash.cc Examining data/zorp-7.0.1~alpha2/lib/dispatch.cc Examining data/zorp-7.0.1~alpha2/lib/ifmonitor.cc Examining data/zorp-7.0.1~alpha2/lib/kzorp.cc Examining data/zorp-7.0.1~alpha2/lib/modules.cc Examining data/zorp-7.0.1~alpha2/lib/plugsession.cc Examining data/zorp-7.0.1~alpha2/lib/proxy.cc Examining data/zorp-7.0.1~alpha2/lib/proxygroup.cc Examining data/zorp-7.0.1~alpha2/lib/proxyssl.cc Examining data/zorp-7.0.1~alpha2/lib/proxysslhostiface.cc Examining data/zorp-7.0.1~alpha2/lib/proxystack.cc Examining data/zorp-7.0.1~alpha2/lib/pyattach.cc Examining data/zorp-7.0.1~alpha2/lib/pycore.cc Examining data/zorp-7.0.1~alpha2/lib/pydict.cc Examining data/zorp-7.0.1~alpha2/lib/pydispatch.cc Examining data/zorp-7.0.1~alpha2/lib/pyencryption.cc Examining data/zorp-7.0.1~alpha2/lib/pypolicy.cc Examining data/zorp-7.0.1~alpha2/lib/pyproxy.cc Examining data/zorp-7.0.1~alpha2/lib/pyproxygroup.cc Examining data/zorp-7.0.1~alpha2/lib/pysockaddr.cc Examining data/zorp-7.0.1~alpha2/lib/pystream.cc Examining data/zorp-7.0.1~alpha2/lib/pystruct.cc Examining data/zorp-7.0.1~alpha2/lib/pyx509.cc Examining data/zorp-7.0.1~alpha2/lib/pyx509chain.cc Examining data/zorp-7.0.1~alpha2/lib/session.cc Examining data/zorp-7.0.1~alpha2/lib/szig.cc Examining data/zorp-7.0.1~alpha2/lib/tpsocket.cc Examining data/zorp-7.0.1~alpha2/lib/zorp.cc Examining data/zorp-7.0.1~alpha2/lib/zorp/attach.h Examining data/zorp-7.0.1~alpha2/lib/zorp/authprovider.h Examining data/zorp-7.0.1~alpha2/lib/zorp/certchain.h Examining data/zorp-7.0.1~alpha2/lib/zorp/connection.h Examining data/zorp-7.0.1~alpha2/lib/zorp/coredump.h Examining data/zorp-7.0.1~alpha2/lib/zorp/dgram.h Examining data/zorp-7.0.1~alpha2/lib/zorp/dimhash.h Examining data/zorp-7.0.1~alpha2/lib/zorp/dispatch.h Examining data/zorp-7.0.1~alpha2/lib/zorp/ifmonitor.h Examining data/zorp-7.0.1~alpha2/lib/zorp/kzorp-kernel.h Examining data/zorp-7.0.1~alpha2/lib/zorp/kzorp.h Examining data/zorp-7.0.1~alpha2/lib/zorp/modules.h Examining data/zorp-7.0.1~alpha2/lib/zorp/nfdynexpect-kernel.h Examining data/zorp-7.0.1~alpha2/lib/zorp/plugsession.h Examining data/zorp-7.0.1~alpha2/lib/zorp/policy.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxy.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxycommon.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxygroup.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxyssl.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxysslhostiface.h Examining data/zorp-7.0.1~alpha2/lib/zorp/proxystack.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyattach.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pycore.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pydict.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pydispatch.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyencryption.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyencryption_private.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyproxy.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyproxygroup.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pysockaddr.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pystream.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pystruct.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyx509.h Examining data/zorp-7.0.1~alpha2/lib/zorp/pyx509chain.h Examining data/zorp-7.0.1~alpha2/lib/zorp/session.h Examining data/zorp-7.0.1~alpha2/lib/zorp/session_impl.h Examining data/zorp-7.0.1~alpha2/lib/zorp/sessionid.h Examining data/zorp-7.0.1~alpha2/lib/zorp/szig.h Examining data/zorp-7.0.1~alpha2/lib/zorp/tpsocket.h Examining data/zorp-7.0.1~alpha2/lib/zorp/zorp.h Examining data/zorp-7.0.1~alpha2/lib/zorp/zpython.h Examining data/zorp-7.0.1~alpha2/lib/zpython.cc Examining data/zorp-7.0.1~alpha2/libproxy/dottransfer.cc Examining data/zorp-7.0.1~alpha2/libproxy/errorloader.cc Examining data/zorp-7.0.1~alpha2/libproxy/transfer2.cc Examining data/zorp-7.0.1~alpha2/libproxy/zorp/proxy/dottransfer.h Examining data/zorp-7.0.1~alpha2/libproxy/zorp/proxy/errorloader.h Examining data/zorp-7.0.1~alpha2/libproxy/zorp/proxy/transfer2.h Examining data/zorp-7.0.1~alpha2/modules/anypy/anypy.cc Examining data/zorp-7.0.1~alpha2/modules/apr/apr.cc Examining data/zorp-7.0.1~alpha2/modules/finger/finger.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftp.h Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.h Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpdata.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftphash.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftphash.h Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpmsg.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpmsg.h Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpolicy.cc Examining data/zorp-7.0.1~alpha2/modules/ftp/ftpolicy.h Examining data/zorp-7.0.1~alpha2/modules/http/http.cc Examining data/zorp-7.0.1~alpha2/modules/http/http.h Examining data/zorp-7.0.1~alpha2/modules/http/httpcommon.h Examining data/zorp-7.0.1~alpha2/modules/http/httpfltr.cc Examining data/zorp-7.0.1~alpha2/modules/http/httpfltr.h Examining data/zorp-7.0.1~alpha2/modules/http/httpftp.cc Examining data/zorp-7.0.1~alpha2/modules/http/httphdr.cc Examining data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc Examining data/zorp-7.0.1~alpha2/modules/http/httpproto.cc Examining data/zorp-7.0.1~alpha2/modules/http/tests/http_canon_url.cc Examining data/zorp-7.0.1~alpha2/modules/http/tests/http_parse_url.cc Examining data/zorp-7.0.1~alpha2/modules/http/tests/http_remove_cookie.cc Examining data/zorp-7.0.1~alpha2/modules/plug/plug.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3.h Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3auth.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3cmd.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3cmd.h Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3data.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3data.h Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3misc.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3misc.h Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3policy.cc Examining data/zorp-7.0.1~alpha2/modules/pop3/pop3policy.h Examining data/zorp-7.0.1~alpha2/modules/smtp/smtp.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/smtp.h Examining data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/smtpdata.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/smtpmsg.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/smtpmsg.h Examining data/zorp-7.0.1~alpha2/modules/smtp/smtppolicy.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_parse.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_request.cc Examining data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_sanitize_addr.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnet.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnet.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetlineedit.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetlineedit.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetoption.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetoption.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetpolicy.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetpolicy.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetprotocol.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetprotocol.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetstate.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetstate.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetsuboption.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnetsuboption.h Examining data/zorp-7.0.1~alpha2/modules/telnet/telnettls.cc Examining data/zorp-7.0.1~alpha2/modules/telnet/telnettls.h Examining data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc Examining data/zorp-7.0.1~alpha2/modules/whois/whois.cc Examining data/zorp-7.0.1~alpha2/tests/unit/test_dhparam.cc Examining data/zorp-7.0.1~alpha2/tests/unit/test_pystruct.cc Examining data/zorp-7.0.1~alpha2/tests/unit/test_szig.cc Examining data/zorp-7.0.1~alpha2/zorp/logtags_gperf.c Examining data/zorp-7.0.1~alpha2/zorp/logtags_gperf.h Examining data/zorp-7.0.1~alpha2/zorp/main.cc FINAL RESULTS: data/zorp-7.0.1~alpha2/lib/dimhash.cc:134: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(new_key, key_parts[0]); data/zorp-7.0.1~alpha2/lib/dimhash.cc:140:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(new_key, key_parts[i]); data/zorp-7.0.1~alpha2/lib/dimhash.cc:172:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(keys[i], save_keys[i]); data/zorp-7.0.1~alpha2/lib/proxystack.cc:500:7: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "/bin/sh", "-c", program, NULL); data/zorp-7.0.1~alpha2/lib/pydict.cc:1243:15: [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(keys[i], key); data/zorp-7.0.1~alpha2/lib/pydict.cc:1294:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(keys[0], key); data/zorp-7.0.1~alpha2/lib/pydict.cc:1313:15: [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(keys[i], key); data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1391:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(self->line, tmp); data/zorp-7.0.1~alpha2/lib/attach.cc:129:155: [3] (random) random: 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. self->connector = z_stream_connector_new(self->session_id, self->bind_addr, self->remote, (self->params.loose ? ZSF_LOOSE_BIND : 0) | (self->params.random ? ZSF_RANDOM_BIND : 0) | ZSF_MARK_TPROXY, z_attach_callback, self, NULL); data/zorp-7.0.1~alpha2/lib/attach.cc:133:154: [3] (random) random: 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. self->connector = z_dgram_connector_new(self->session_id, self->bind_addr, self->remote, (self->params.loose ? ZSF_LOOSE_BIND : 0) | (self->params.random ? ZSF_RANDOM_BIND : 0) | ZSF_MARK_TPROXY, z_attach_callback, self, NULL); data/zorp-7.0.1~alpha2/lib/pyattach.cc:222:61: [3] (random) random: 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. ¶ms.tos, ¶ms.random, ¶ms.server_socket_mark)) data/zorp-7.0.1~alpha2/lib/pyattach.cc:230:61: [3] (random) random: 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. ¶ms.tos, ¶ms.random, ¶ms.server_socket_mark)) data/zorp-7.0.1~alpha2/lib/zorp/attach.h:41:12: [3] (random) random: 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. gboolean random; /**< choose port in the same group randomly (securely). if TRUE, loose should be TRUE too. */ data/zorp-7.0.1~alpha2/lib/zpython.cc:40:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("PYTHONPATH") == NULL) data/zorp-7.0.1~alpha2/lib/zpython.cc:46:73: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. g_snprintf(buf, sizeof(buf), "PYTHONPATH=%s:%s", ZORP_SYSCONFDIR, getenv("PYTHONPATH")); data/zorp-7.0.1~alpha2/tests/unit/test_pystruct.cc:157:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. gchar *srcdir = getenv("srcdir"); data/zorp-7.0.1~alpha2/zorp/main.cc:424:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(*((unsigned int *) buf)); data/zorp-7.0.1~alpha2/zorp/main.cc:578:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL) ^ getpid()); data/zorp-7.0.1~alpha2/lib/connection.cc:72:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf_remote, "NULL"); data/zorp-7.0.1~alpha2/lib/connection.cc:76:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf_local, "NULL"); data/zorp-7.0.1~alpha2/lib/connection.cc:80:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf_dest, "NULL"); data/zorp-7.0.1~alpha2/lib/dgram.cc:56:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gint (*open)(guint flags, ZSockAddr *remote, ZSockAddr *local, guint32 sock_flags, gint tos, GError **error); data/zorp-7.0.1~alpha2/lib/dgram.cc:71:30: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return dgram_socket_funcs->open(flags, remote, local, sock_flags, tos, error); data/zorp-7.0.1~alpha2/lib/dgram.cc:342: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(tos, CMSG_DATA(cmsg), sizeof(*tos)); data/zorp-7.0.1~alpha2/lib/dimhash.cc:138:7: [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(new_key, "::"); data/zorp-7.0.1~alpha2/lib/dispatch.cc:491:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&self->params, params, sizeof(*params)); data/zorp-7.0.1~alpha2/lib/proxyssl.cc:531:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error_str[256]; data/zorp-7.0.1~alpha2/lib/proxyssl.cc:643:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/zorp-7.0.1~alpha2/lib/proxyssl.cc:841:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subject_name[512], issuer_name[512]; data/zorp-7.0.1~alpha2/lib/proxyssl.cc:974:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serial_str[128]; data/zorp-7.0.1~alpha2/lib/proxyssl.cc:987:19: [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(serial_str, ptr, len); data/zorp-7.0.1~alpha2/lib/proxyssl.cc:1178:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serial_str[128]; data/zorp-7.0.1~alpha2/lib/proxyssl.cc:1192:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(serial_str, ptr, len); data/zorp-7.0.1~alpha2/lib/proxysslhostiface.cc:115:19: [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(pattern_buf, dnsname, dnsname_len); data/zorp-7.0.1~alpha2/lib/pydispatch.cc:53:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_SOCKADDR_STRING]; data/zorp-7.0.1~alpha2/lib/pydispatch.cc:84:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_SOCKADDR_STRING]; data/zorp-7.0.1~alpha2/lib/pydispatch.cc:211:22: [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). ifgroups = fopen("/etc/iproute2/rt_ifgroup", "r"); data/zorp-7.0.1~alpha2/lib/pyencryption.cc:400:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/zorp-7.0.1~alpha2/lib/pypolicy.cc:1131:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). script = fopen(self->policy_filename, "r"); data/zorp-7.0.1~alpha2/lib/pysockaddr.cc:245:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_SOCKADDR_STRING]; data/zorp-7.0.1~alpha2/lib/pysockaddr.cc:326:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_SOCKADDR_STRING]; data/zorp-7.0.1~alpha2/lib/pystruct.cc:215:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&z_policy_struct_types[i], &z_policy_struct_types[Z_PST_NONE], sizeof(z_policy_struct_types[Z_PST_NONE])); data/zorp-7.0.1~alpha2/lib/pyx509.cc:185: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. unsigned char usage_data_bytes[2] = {(unsigned char)usage_data, (unsigned char)(usage_data >> 8)}; data/zorp-7.0.1~alpha2/lib/szig.cc:254:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&target->u.time_value, &source->u.time_value, sizeof(source->u.time_value)); data/zorp-7.0.1~alpha2/lib/zorp/kzorp-kernel.h:30: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 czone_name[KZ_ATTR_NAME_MAX_LENGTH + 1]; data/zorp-7.0.1~alpha2/lib/zorp/kzorp-kernel.h:31: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 szone_name[KZ_ATTR_NAME_MAX_LENGTH + 1]; data/zorp-7.0.1~alpha2/lib/zorp/kzorp-kernel.h:32: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 dispatcher_name[KZ_ATTR_NAME_MAX_LENGTH + 1]; data/zorp-7.0.1~alpha2/lib/zorp/kzorp-kernel.h:33:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char service_name[KZ_ATTR_NAME_MAX_LENGTH + 1]; data/zorp-7.0.1~alpha2/lib/zpython.cc:38:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2048]; data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:70: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). fd = open(filepath, O_RDONLY); data/zorp-7.0.1~alpha2/modules/finger/finger.cc:446:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(response, line, line_len); data/zorp-7.0.1~alpha2/modules/finger/finger.cc:447:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(response + line_len, "\r\n"); data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:902:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1308:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char funcs[10] = { 241, 242, 243, 244, 245, 246, 247, 248, 249, '\0' }; data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1309:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char negot[5] = { 251, 252, 253, 254, '\0' }; data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1452:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[4]; data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1584:23: [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). self->answer_code = atoi(self->answer_cmd->str); data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc:812:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/zorp-7.0.1~alpha2/modules/ftp/ftpolicy.cc:476: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. typedef char t_ftp_command[8]; data/zorp-7.0.1~alpha2/modules/http/httpfltr.cc:136: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(line_buf, line, line_length); data/zorp-7.0.1~alpha2/modules/http/httpftp.cc:102:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msg, &line[4], copy); data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:1134:25: [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). self->response_code = atoi(self->response); data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:927:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi(self->response->str) != 220) data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc:278:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char testdata[TELNET_BUFFER_SIZE + 16]; data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc:297:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char testdata[TELNET_BUFFER_SIZE + 16]; data/zorp-7.0.1~alpha2/modules/whois/whois.cc:240:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(response, line, line_len); data/zorp-7.0.1~alpha2/modules/whois/whois.cc:241:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(response + line_len, "\r\n"); data/zorp-7.0.1~alpha2/tests/unit/test_pystruct.cc:170:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). script = fopen(policy->policy_filename, "r"); data/zorp-7.0.1~alpha2/lib/dimhash.cc:94:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key[strlen(key)-1] = 0; data/zorp-7.0.1~alpha2/lib/dimhash.cc:127: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). keylen += strlen(key_parts[i]); data/zorp-7.0.1~alpha2/lib/dimhash.cc:368:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(save_keys[i], keys[i], DIMHASH_MAX_KEYSIZE - 1); data/zorp-7.0.1~alpha2/lib/pydict.cc:384: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). entry->ts.cstring_buflen = strlen((gchar *) entry->value); data/zorp-7.0.1~alpha2/lib/pydict.cc:1242:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). keys[i] = g_new0(gchar, strlen(key)+1); data/zorp-7.0.1~alpha2/lib/pydict.cc:1293: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). keys[0] = g_new0(gchar, strlen(key)+1); data/zorp-7.0.1~alpha2/lib/pydict.cc:1312:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). keys[i] = g_new0(gchar, strlen(key)+1); data/zorp-7.0.1~alpha2/lib/pydispatch.cc:222:23: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(buf, "%x %32s\n", &value, name) == 2) data/zorp-7.0.1~alpha2/lib/pyx509.cc:248:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BIO *bio = BIO_new_mem_buf(cert, strlen(cert)); data/zorp-7.0.1~alpha2/lib/szig.cc:880:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(node_name) == 0) data/zorp-7.0.1~alpha2/lib/szig.cc:1851:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (prefix && strlen(prefix) > 0) data/zorp-7.0.1~alpha2/lib/szig.cc:1903:15: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(response, "\n", sizeof(response) - strlen(response) - 1); data/zorp-7.0.1~alpha2/lib/szig.cc:1903:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(response, "\n", sizeof(response) - strlen(response) - 1); data/zorp-7.0.1~alpha2/lib/szig.cc:1919: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). gchar *e = name + strlen(name) - 1; data/zorp-7.0.1~alpha2/lib/szig.cc:2044:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (z_stream_write_buf(conn->stream, response, strlen(response), TRUE, FALSE) != G_IO_STATUS_NORMAL) data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:87:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, contents, sizeof(contents) - 1); data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:132:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gint left = strlen(src + 1); data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:136: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). gint var_length = strlen(infos[i].variable); data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:138:92: [1] (buffer) strlen: Does not handle 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 (left > var_length && strncmp(src + 1, infos[i].variable, strlen(infos[i].variable)) == 0 && data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:154:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). src += strlen(infos[i].variable) + 1; data/zorp-7.0.1~alpha2/libproxy/errorloader.cc:170:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, contents, sizeof(contents) - 1); data/zorp-7.0.1~alpha2/modules/finger/finger.cc:388: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). strlen(request), data/zorp-7.0.1~alpha2/modules/finger/finger.cc:509: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). strlen(errmsg), data/zorp-7.0.1~alpha2/modules/finger/finger.cc:573: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). strlen(errmsg), data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1685: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). bytes_to_write = strlen(msg); data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1893: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). gint bytes_to_write = strlen(msg); data/zorp-7.0.1~alpha2/modules/ftp/ftp.cc:1908:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(answer_p) > 0) data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc:451:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). clen = strlen(self->request_param->str); data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc:1183:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(split[1]) == 0 || strcmp(split[1],"1") == 0) data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc:1199:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(split[2]) > 0) data/zorp-7.0.1~alpha2/modules/ftp/ftpcmd.cc:2062:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(endptr) >= 4 && endptr[0] == ' ' && endptr[1] == 'R' && endptr[2] == ' ' && endptr[3] != ' ') data/zorp-7.0.1~alpha2/modules/http/http.cc:247: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). res = z_policy_var_build("s#", self->request_version, strlen(self->request_version)); data/zorp-7.0.1~alpha2/modules/http/http.cc:443: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). p = http_add_header(&self->headers[side], header, strlen(header), new_value, strlen(new_value)); data/zorp-7.0.1~alpha2/modules/http/http.cc:443:86: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = http_add_header(&self->headers[side], header, strlen(header), new_value, strlen(new_value)); data/zorp-7.0.1~alpha2/modules/http/http.cc:472:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = z_policy_var_build("s#", self->headers[side].flat->str, strlen(self->headers[side].flat->str)); data/zorp-7.0.1~alpha2/modules/http/http.cc:985:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (http_write(self, EP_CLIENT, response, strlen(response)) != G_IO_STATUS_NORMAL) data/zorp-7.0.1~alpha2/modules/http/http.cc:1029:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). http_write(self, EP_CLIENT, error_msg, strlen(error_msg)); data/zorp-7.0.1~alpha2/modules/http/http.cc:1334:58: [1] (buffer) strlen: Does not handle 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 (!http_decode_base64(userpass, sizeof(userpass), p, strlen(p))) data/zorp-7.0.1~alpha2/modules/http/http.cc:1849: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). guint header_name_size = strlen(header_name); data/zorp-7.0.1~alpha2/modules/http/http.cc:1976:67: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). http_add_header(&self->headers[EP_CLIENT], "Authorization", strlen("Authorization"), data/zorp-7.0.1~alpha2/modules/http/http.cc:1983:73: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). http_add_header(&self->headers[EP_CLIENT], "Proxy-Authorization", strlen("Proxy-Authorization"), data/zorp-7.0.1~alpha2/modules/http/http.cc:2044:15: [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(client_key, authorization_header->value->str, authorization_header->value->len); data/zorp-7.0.1~alpha2/modules/http/http.cc:2950:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). http_add_header(&self->headers[EP_SERVER], "Set-Cookie", strlen("Set-Cookie"), data/zorp-7.0.1~alpha2/modules/http/http.cc:3038:87: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). self->connection_hdr = http_add_header(&self->headers[EP_SERVER], conn_hdr_str, strlen(conn_hdr_str), "close", 5); data/zorp-7.0.1~alpha2/modules/http/http.cc:3408:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (http_write(self, EP_CLIENT, success, strlen(success)) != G_IO_STATUS_NORMAL) data/zorp-7.0.1~alpha2/modules/http/httpfltr.cc:566: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). self->dst_chunk_length_end = strlen(self->dst_chunk_length_buf); data/zorp-7.0.1~alpha2/modules/http/httpftp.cc:141:69: [1] (buffer) strlen: Does not handle 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 (z_stream_write(self->super.endpoints[EP_SERVER], request_msg, strlen(request_msg), &bw, NULL) != G_IO_STATUS_NORMAL) data/zorp-7.0.1~alpha2/modules/http/httphdr.cc:212: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). http_add_header(hdrs, key, strlen(key), value, strlen(value)); data/zorp-7.0.1~alpha2/modules/http/httphdr.cc:212:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). http_add_header(hdrs, key, strlen(key), value, strlen(value)); data/zorp-7.0.1~alpha2/modules/http/httphdr.cc:837:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hdr = http_add_header(hdrs, "Cookie", strlen("Cookie"), data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:821: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). fragment_len = strlen(fragment_start); data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:827: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). query_len = strlen(query_start); data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:833: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). fragment_len = strlen(fragment_start); data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:837: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). file_len = strlen(file_start); data/zorp-7.0.1~alpha2/modules/http/httpmisc.cc:1015: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). self->request_method->len = strlen(self->request_method->str); data/zorp-7.0.1~alpha2/modules/http/tests/http_remove_cookie.cc:43:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). HttpHeader *cookie_hdr = http_add_header(&hdrs, "Cookie", strlen("Cookie"), data/zorp-7.0.1~alpha2/modules/http/tests/http_remove_cookie.cc:44:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cookie_value_in_str, strlen(cookie_value_in_str)); data/zorp-7.0.1~alpha2/modules/pop3/pop3.cc:63: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). rc = z_stream_write(self->super.endpoints[EP_CLIENT], msg, strlen(msg), &bytes_written, NULL); data/zorp-7.0.1~alpha2/modules/pop3/pop3.cc:74: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). rc = z_stream_write(self->super.endpoints[EP_SERVER], msg, strlen(msg), &bytes_written, NULL); data/zorp-7.0.1~alpha2/modules/pop3/pop3.cc:132: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). error_len = strlen(error_msg); data/zorp-7.0.1~alpha2/modules/pop3/pop3cmd.cc:112:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(self->command_param->str) == 0) data/zorp-7.0.1~alpha2/modules/smtp/smtp.cc:446:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(newline); data/zorp-7.0.1~alpha2/modules/smtp/smtp.cc:522:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(newline); data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:707:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (g_ascii_strncasecmp(self->request_param->str, FROM_ADDR, strlen(FROM_ADDR)) == 0) data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:710:84: [1] (buffer) strlen: Does not handle 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 (smtp_sanitize_address(self, sanitized_address, &self->request_param->str[strlen(FROM_ADDR)], TRUE, &end)) data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:713:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). forward_extensions = g_string_sized_new(strlen(end) + 1); data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:753: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). if (g_ascii_strncasecmp(self->request_param->str, TO_ADDR, strlen(TO_ADDR)) == 0) data/zorp-7.0.1~alpha2/modules/smtp/smtpcmd.cc:755:92: [1] (buffer) strlen: Does not handle 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 (smtp_sanitize_address(self, self->sanitized_recipient, &self->request_param->str[strlen(TO_ADDR)], FALSE, NULL)) data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_parse.cc:42:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_CHECK(end == OFFSET_TO_PTR(str, strlen(str))); data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_parse.cc:79:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_CHECK_EQUAL(_end - str, strlen(expected)); \ data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_request.cc:45: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). BOOST_CHECK(smtp_parse_request(self, _line, strlen(_line)) == FALSE); \ data/zorp-7.0.1~alpha2/modules/smtp/tests/smtp_request.cc:52: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). BOOST_CHECK(smtp_parse_request(self, _line, strlen(_line))); \ data/zorp-7.0.1~alpha2/modules/telnet/telnettls.cc:86:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). z_pktbuf_put_c8s(response, strlen(message), message); data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc:143:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). telnet_protocol_is_running(p) && i < strlen(bytes); \ data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc:205: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). z_pktbuf_append(buf, testdata, strlen(testdata)); data/zorp-7.0.1~alpha2/modules/telnet/tests/test_telnet.cc:210:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). z_pktbuf_append(expected, expecteddata, strlen(expecteddata)); data/zorp-7.0.1~alpha2/modules/whois/whois.cc:197: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). strlen(request), data/zorp-7.0.1~alpha2/modules/whois/whois.cc:276: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). strlen(errmsg), data/zorp-7.0.1~alpha2/modules/whois/whois.cc:328: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). strlen(errmsg), data/zorp-7.0.1~alpha2/zorp/main.cc:355: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 (write(fd, request, strlen(request)) < 0) data/zorp-7.0.1~alpha2/zorp/main.cc:384:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((len = read(fd, response, sizeof(response) - 1)) < 0) ANALYSIS SUMMARY: Hits = 149 Lines analyzed = 58286 in approximately 1.29 seconds (45301 lines/second) Physical Source Lines of Code (SLOC) = 38885 Hits@level = [0] 27 [1] 81 [2] 50 [3] 10 [4] 8 [5] 0 Hits@level+ = [0+] 176 [1+] 149 [2+] 68 [3+] 18 [4+] 8 [5+] 0 Hits/KSLOC@level+ = [0+] 4.52617 [1+] 3.83181 [2+] 1.74875 [3+] 0.462903 [4+] 0.205735 [5+] 0 Dot directories skipped = 2 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.