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/mod-wsgi-4.7.1/src/server/mod_wsgi.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_apache.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_apache.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_buckets.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_buckets.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_convert.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_convert.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_daemon.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_daemon.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_interp.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_interp.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_logger.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_logger.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_memory.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_memory.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_metrics.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_metrics.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_python.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_restrict.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_restrict.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_server.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_server.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_stream.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_stream.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_thread.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_thread.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_validate.c Examining data/mod-wsgi-4.7.1/src/server/wsgi_validate.h Examining data/mod-wsgi-4.7.1/src/server/wsgi_version.h FINAL RESULTS: data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8597:13: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(process->socket_path, socket_uid, -1) < 0) { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:10661:25: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(entry->mutex_path, entry->uid, -1) < 0) { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13283:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(package, "mod_wsgi/%s", MOD_WSGI_VERSION_STRING); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2275:26: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. else if (access(python_home, X_OK) == -1) { data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2290:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pyvenv_cfg, R_OK) == 0) data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:591:29: [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. value = getenv(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:740:29: [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. value = getenv(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:786:25: [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. value = getenv(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7909:21: [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. entry->random = random(); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8330:13: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(daemon->group->root) == -1) { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11969:56: [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. key = apr_psprintf(r->pool, "%ld|%s|%s|%s", group->random, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12866:52: [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. wsgi_daemon_process->group->random, data/mod-wsgi-4.7.1/src/server/wsgi_daemon.h:88:10: [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. long random; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:714:30: [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 (pwent && getenv("USER")) { data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:732:30: [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 (pwent && getenv("USERNAME")) { data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:750:30: [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 (pwent && getenv("LOGNAME")) { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1207: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1311: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 dummy[1]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1343: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(buffer, self->buffer + self->offset, length); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1349: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(buffer, self->buffer + self->offset, length); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1447: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(buffer, self->buffer + self->offset, length); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1657: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(self->buffer, p, self->size); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:1790: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(self->buffer, p, self->size); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2433: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2505:65: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). static int Adapter_output_file(AdapterObject *self, apr_file_t* tmpfile, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2528:28: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). apr_file_dup(&dupfile, tmpfile, r->pool); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2534:36: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). b = apr_bucket_file_create(tmpfile, offset, (apr_size_t)len, r->pool, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2544:36: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). b = apr_bucket_file_create(tmpfile, offset, MAX_BUCKET_SIZE, r->pool, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2576: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2866:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). apr_os_file_put(&tmpfile, &fd, APR_SENDFILE_ENABLED, self->r->pool); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2868:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). apr_os_file_put(&tmpfile, &fd, 0, self->r->pool); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2870:67: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). rv = apr_file_info_get(&finfo, APR_FINFO_SIZE|APR_FINFO_TYPE, tmpfile); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2892:24: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). rv = apr_file_seek(tmpfile, APR_CUR, &fd_offset); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2972:39: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (Adapter_output_file(self, tmpfile, fo_offset, length)) data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2985:39: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (Adapter_output_file(self, tmpfile, fo_offset, length)) data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2996:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). apr_file_seek(tmpfile, APR_SET, &fd_offset); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3700: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(filename, "r"); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:4938: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). sconfig->python_optimize = atoi(f); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:5724: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 msgbuf[128]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7532: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). processes = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7542: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). threads = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7591:26: [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). stack_size = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7600: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). maximum_requests = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7608:31: [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). startup_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7616: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). shutdown_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7624: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). deadlock_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7632: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). inactivity_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7640:31: [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). request_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7648: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). graceful_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7656: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). eviction_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7664: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). restart_interval = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7672:31: [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). connect_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7680:30: [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). socket_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7688:29: [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). queue_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7696:30: [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). listen_backlog = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7707: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). send_buffer_size = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7717: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). recv_buffer_size = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7727: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). header_buffer_size = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7737:36: [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). response_buffer_size = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7747: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). response_socket_timeout = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7812:30: [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). cpu_time_limit = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7820: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). cpu_priority = atoi(value); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8319: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(argv0, display_name, slen); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8321: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(argv0, display_name, dlen); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:9723:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:10937:40: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. vec[i].iov_base = (char *) vec[i].iov_base + n; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11101: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 x[32768]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11248: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 malformed[32]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11299: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). r->status = cgi_status = atoi(l); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12176: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12200: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 chunk_hdr[20]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12212: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12246: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12281: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 status_buffer[512]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12973:40: [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). r->connection->client_addr->port = atoi(apr_table_get(r->subprocess_env, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12978:40: [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). r->connection->remote_addr->port = atoi(apr_table_get(r->subprocess_env, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13059: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). config->script_reloading = atoi(apr_table_get(r->subprocess_env, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13076:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). config->daemon_connects = atoi(apr_table_get(r->subprocess_env, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13078:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). config->daemon_restarts = atoi(apr_table_get(r->subprocess_env, data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13216: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 package[128]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13217: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 interpreter[256]; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:13289: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(interpreter, "Python/%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); data/mod-wsgi-4.7.1/src/server/wsgi_apache.c:140:13: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy (retstr, L"\\\\?\\"); data/mod-wsgi-4.7.1/src/server/wsgi_apache.c:150:13: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy (retstr, L"\\\\?\\UNC\\"); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:261: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(s, self->s, m); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:262: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(s+m, p, q-p); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:280: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(s, p, q-p); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:313: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(self->s+m, p, e-p); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:323: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(self->s, p, n-1); data/mod-wsgi-4.7.1/src/server/wsgi_memory.c:56:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd = open( "/proc/self/psinfo", O_RDONLY )) == -1 ) data/mod-wsgi-4.7.1/src/server/wsgi_memory.c:119:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fp = fopen( "/proc/self/statm", "r" )) == NULL ) data/mod-wsgi-4.7.1/src/server/wsgi_thread.c:122:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[256]; data/mod-wsgi-4.7.1/src/server/wsgi_thread.c: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 content[1024]; data/mod-wsgi-4.7.1/src/server/wsgi_thread.c:145: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(filename, "/proc/%ld/stat", tid); data/mod-wsgi-4.7.1/src/server/wsgi_thread.c:147: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(filename, "r"); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:471: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). long lu = strlen(uri); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:472: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). long lp = strlen(path_info); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:580: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). len = strlen(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:729: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). len = strlen(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:775:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2122:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(self->r->log_id), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2632:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_Decode(elts[i].val, strlen(elts[i].val), data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2637:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_Decode(elts[i].val, strlen(elts[i].val), data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:2643: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). strlen(elts[i].val), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3112:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(self->r->log_id), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3329:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(self->r->log_id), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3564: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). return PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3981: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(script) > 2 && script[0] == '(' && data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3982:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). script[strlen(script)-1] == ')') { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:3983:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = apr_pstrndup(r->pool, script+1, strlen(script)-2); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:4116: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). long length = strlen(data); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:6466: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). strlen(elts[i].val), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:6494:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(group, strlen(group), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:6626: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). return PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7553:46: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). if (*value || errno == ERANGE || umask < 0) data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:7927:20: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). entry->umask = umask; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8313:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dlen = strlen(argv0); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8314:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(display_name); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8454:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). if (daemon->group->umask != -1) data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8455:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(daemon->group->umask); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8455:30: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(daemon->group->umask); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8520: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(process->socket_path) > sizeof(addr.sun_path)) { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8532:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(0077); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:8545:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:10720:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen(sa->sun_path) + 1); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11029: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). vec_next->iov_len = strlen(elts[i].key) + 1; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11037: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). vec_next->iov_len = strlen(elts[i].val) + 1; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11178: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). p = strlen(w); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11250:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(malformed, w, sizeof(malformed)-1); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11284:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *endp = l + strlen(l) - 1; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:11973: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). memset(key, '\0', strlen(key)); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12451: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). l = strlen(offset) + 1; data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12501:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). vec1[0].iov_len = strlen("Status:"); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12505:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). vec1[2].iov_len = strlen(r->status_line); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12536: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). vec2_next->iov_len = strlen(t_elt->key); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12542: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). vec2_next->iov_len = strlen(t_elt->val); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12555: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). buflen = strlen(crlf); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12870: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). memset(key, '\0', strlen(key)); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12902: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 (strstr(path, root) == path && path[strlen(root)] == '/') { data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12903:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path += strlen(root); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:12920:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path += strlen(root); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14034:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *res = (char *)apr_palloc(a, sizeof("HTTP_") + strlen(w)); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14120: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). strlen(hdrs[i].val), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14130: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). strlen(hdrs[i].val), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14148: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). strlen(hdrs[i].val), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14163:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14176:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14185:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14195: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14205:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14215: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14227: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14238: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14249:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_Decode(value, strlen(value), data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14261: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14273:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14283:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14293:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14302:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14311:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14320:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14336: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14345: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14355: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14364: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14375: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14384: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). object = PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14413:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object = PyUnicode_DecodeLatin1(group, strlen(group), NULL); data/mod-wsgi-4.7.1/src/server/mod_wsgi.c:14550: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). return PyUnicode_DecodeLatin1(value, strlen(value), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_apache.c:120: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). apr_size_t srcremains = strlen(srcstr) + 1; data/mod-wsgi-4.7.1/src/server/wsgi_daemon.h:101:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). long umask; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:718: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). strlen(pwent->pw_name), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:736: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). strlen(pwent->pw_name), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:754: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). strlen(pwent->pw_name), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:806: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). strlen(pwent->pw_dir), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:852: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). strlen(wsgi_python_eggs), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1096: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). item = PyUnicode_Decode(home, strlen(home), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1173:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(wsgi_daemon_group), NULL)); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1175: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). PyUnicode_DecodeLatin1(name, strlen(name), NULL)); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1358: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). object = PyUnicode_DecodeLatin1(str, strlen(str), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1366: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). object = PyUnicode_DecodeLatin1(str, strlen(str), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1374: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). object = PyUnicode_DecodeLatin1(str, strlen(str), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1417: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). strlen(wsgi_newrelic_config_file), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:1427: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). strlen(wsgi_newrelic_environment), data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2159: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). int len = strlen(entries[i])+1; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2197:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(python_home)+1; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2302: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). len = strlen(python_exe)+1; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2313: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). len = strlen(python_home)+1; data/mod-wsgi-4.7.1/src/server/wsgi_interp.c:2640: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). object = PyUnicode_DecodeLatin1(reason, strlen(reason), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_logger.c:707: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). strlen(r->log_id), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_memory.c:58:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read( fd, &psinfo, sizeof(psinfo) ) != sizeof(psinfo) ) data/mod-wsgi-4.7.1/src/server/wsgi_metrics.c:92: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). strlen(r->log_id), NULL); data/mod-wsgi-4.7.1/src/server/wsgi_python.h:121: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). PyUnicode_DecodeLatin1(str, strlen(str), NULL) ANALYSIS SUMMARY: Hits = 193 Lines analyzed = 23276 in approximately 0.55 seconds (42218 lines/second) Physical Source Lines of Code (SLOC) = 14843 Hits@level = [0] 2 [1] 98 [2] 79 [3] 11 [4] 3 [5] 2 Hits@level+ = [0+] 195 [1+] 193 [2+] 95 [3+] 16 [4+] 5 [5+] 2 Hits/KSLOC@level+ = [0+] 13.1375 [1+] 13.0028 [2+] 6.40032 [3+] 1.07795 [4+] 0.336859 [5+] 0.134744 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.