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/c-icap-0.5.6/body.c Examining data/c-icap-0.5.6/info.c Examining data/c-icap-0.5.6/encode.c Examining data/c-icap-0.5.6/include/access.h Examining data/c-icap-0.5.6/include/md5.h Examining data/c-icap-0.5.6/include/ci_regex.h Examining data/c-icap-0.5.6/include/cfg_param.h Examining data/c-icap-0.5.6/include/stats.h Examining data/c-icap-0.5.6/include/proc_threads_queues.h Examining data/c-icap-0.5.6/include/acl.h Examining data/c-icap-0.5.6/include/log.h Examining data/c-icap-0.5.6/include/registry.h Examining data/c-icap-0.5.6/include/cache.h Examining data/c-icap-0.5.6/include/service.h Examining data/c-icap-0.5.6/include/c-icap.h Examining data/c-icap-0.5.6/include/body.h Examining data/c-icap-0.5.6/include/dlib.h Examining data/c-icap-0.5.6/include/module.h Examining data/c-icap-0.5.6/include/ci_threads.h Examining data/c-icap-0.5.6/include/simple_api.h Examining data/c-icap-0.5.6/include/lookup_table.h Examining data/c-icap-0.5.6/include/header.h Examining data/c-icap-0.5.6/include/port.h Examining data/c-icap-0.5.6/include/c-icap-conf.h Examining data/c-icap-0.5.6/include/shared_mem.h Examining data/c-icap-0.5.6/include/array.h Examining data/c-icap-0.5.6/include/util.h Examining data/c-icap-0.5.6/include/filetype.h Examining data/c-icap-0.5.6/include/request.h Examining data/c-icap-0.5.6/include/hash.h Examining data/c-icap-0.5.6/include/txt_format.h Examining data/c-icap-0.5.6/include/mem.h Examining data/c-icap-0.5.6/include/net_io_ssl.h Examining data/c-icap-0.5.6/include/commands.h Examining data/c-icap-0.5.6/include/types_ops.h Examining data/c-icap-0.5.6/include/txtTemplate.h Examining data/c-icap-0.5.6/include/net_io.h Examining data/c-icap-0.5.6/include/proc_mutex.h Examining data/c-icap-0.5.6/include/debug.h Examining data/c-icap-0.5.6/filetype.c Examining data/c-icap-0.5.6/registry.c Examining data/c-icap-0.5.6/services/ex-206/srv_ex206.c Examining data/c-icap-0.5.6/services/echo/srv_echo.c Examining data/c-icap-0.5.6/debug.c Examining data/c-icap-0.5.6/txtTemplate.c Examining data/c-icap-0.5.6/port.c Examining data/c-icap-0.5.6/modules/shared_cache.c Examining data/c-icap-0.5.6/modules/bdb_tables.c Examining data/c-icap-0.5.6/modules/sys_logger.c Examining data/c-icap-0.5.6/modules/perl_handler.c Examining data/c-icap-0.5.6/modules/ldap_module.c Examining data/c-icap-0.5.6/modules/memcached.c Examining data/c-icap-0.5.6/modules/dnsbl_tables.c Examining data/c-icap-0.5.6/md5.c Examining data/c-icap-0.5.6/default_acl.c Examining data/c-icap-0.5.6/tests/test_cache.c Examining data/c-icap-0.5.6/tests/test_tables.c Examining data/c-icap-0.5.6/tests/test_body.c Examining data/c-icap-0.5.6/tests/test_lists.c Examining data/c-icap-0.5.6/tests/test_base64.c Examining data/c-icap-0.5.6/tests/test_ops.c Examining data/c-icap-0.5.6/tests/test_md5.c Examining data/c-icap-0.5.6/tests/test_headers.c Examining data/c-icap-0.5.6/tests/test_arrays.c Examining data/c-icap-0.5.6/tests/test_allocators.c Examining data/c-icap-0.5.6/module.c Examining data/c-icap-0.5.6/config-w32.h Examining data/c-icap-0.5.6/request.c Examining data/c-icap-0.5.6/utils/c-icap-mkbdb.c Examining data/c-icap-0.5.6/utils/c-icap-client.c Examining data/c-icap-0.5.6/utils/c-icap-stretch.c Examining data/c-icap-0.5.6/access.c Examining data/c-icap-0.5.6/aserver.c Examining data/c-icap-0.5.6/regex.c Examining data/c-icap-0.5.6/txt_format.c Examining data/c-icap-0.5.6/commands.c Examining data/c-icap-0.5.6/cfg_lib.c Examining data/c-icap-0.5.6/array.c Examining data/c-icap-0.5.6/header.c Examining data/c-icap-0.5.6/log.c Examining data/c-icap-0.5.6/decode.c Examining data/c-icap-0.5.6/util.c Examining data/c-icap-0.5.6/dlib.c Examining data/c-icap-0.5.6/types_ops.c Examining data/c-icap-0.5.6/hash.c Examining data/c-icap-0.5.6/service_lib.c Examining data/c-icap-0.5.6/stats.c Examining data/c-icap-0.5.6/request_common.c Examining data/c-icap-0.5.6/acl.c Examining data/c-icap-0.5.6/lookup_file_table.c Examining data/c-icap-0.5.6/lookup_table.c Examining data/c-icap-0.5.6/mpmt_server.c Examining data/c-icap-0.5.6/net_io.c Examining data/c-icap-0.5.6/os/win32/threads.c Examining data/c-icap-0.5.6/os/win32/dll_entry.c Examining data/c-icap-0.5.6/os/win32/proc_mutex.c Examining data/c-icap-0.5.6/os/win32/shared_mem.c Examining data/c-icap-0.5.6/os/win32/utilfunc.c Examining data/c-icap-0.5.6/os/win32/net_io.c Examining data/c-icap-0.5.6/os/unix/proc_utils.c Examining data/c-icap-0.5.6/os/unix/threads.c Examining data/c-icap-0.5.6/os/unix/proc_mutex.c Examining data/c-icap-0.5.6/os/unix/shared_mem.c Examining data/c-icap-0.5.6/os/unix/dlib.c Examining data/c-icap-0.5.6/os/unix/utilfunc.c Examining data/c-icap-0.5.6/os/unix/net_io.c Examining data/c-icap-0.5.6/winnt_server.c Examining data/c-icap-0.5.6/service.c Examining data/c-icap-0.5.6/cfg_param.c Examining data/c-icap-0.5.6/http_auth.c Examining data/c-icap-0.5.6/common.h Examining data/c-icap-0.5.6/cache.c Examining data/c-icap-0.5.6/mem.c Examining data/c-icap-0.5.6/simple_api.c Examining data/c-icap-0.5.6/openssl/net_io_ssl.c Examining data/c-icap-0.5.6/openssl/openssl_options.c Examining data/c-icap-0.5.6/proc_threads_queues.c FINAL RESULTS: data/c-icap-0.5.6/array.c:94: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(item->name, name); data/c-icap-0.5.6/array.c:178: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(item->name, name); data/c-icap-0.5.6/aserver.c:70:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(MY_HOSTNAME, hostname); data/c-icap-0.5.6/cfg_lib.c:161: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(*((char **) setdata), argv[0]); data/c-icap-0.5.6/cfg_param.c:614: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(CI_CONF.TMPDIR, argv[0]); data/c-icap-0.5.6/cfg_param.c:708:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, CI_MAX_PATH, CONFDIR "/%s", cfg_file); data/c-icap-0.5.6/config-w32.h:15:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/c-icap-0.5.6/config-w32.h:15:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/c-icap-0.5.6/debug.c:44:13: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(format, ap); data/c-icap-0.5.6/filetype.c:94: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(db->types[indx].name, name); data/c-icap-0.5.6/filetype.c:95: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(db->types[indx].descr, descr); data/c-icap-0.5.6/filetype.c:113: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(db->groups[indx].name, name); data/c-icap-0.5.6/filetype.c:114: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(db->groups[indx].descr, descr); data/c-icap-0.5.6/header.c:257: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(newhead, line); data/c-icap-0.5.6/http_auth.c:265:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(new_s, str); data/c-icap-0.5.6/http_auth.c:537:20: [4] (crypto) crypt_r: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. pass_enc = crypt_r(data->http_pass, pass[0], &crypt_data); data/c-icap-0.5.6/include/debug.h:44:123: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define ci_debug_printf(i, args...) if(i<=CI_DEBUG_LEVEL){ if(__log_error) (*__log_error)(NULL,args); if(CI_DEBUG_STDOUT) printf(args);} data/c-icap-0.5.6/info.c:311:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE,tmpl->gen_template, data/c-icap-0.5.6/info.c:329:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->childs_tmpl, info_data->child_pids[k]); data/c-icap-0.5.6/info.c:339:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->childs_tmpl, info_data->closing_child_pids[k]); data/c-icap-0.5.6/info.c:347:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->d1TableHeader_tmpl, "Semaphores in use"); data/c-icap-0.5.6/info.c:353:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->d1TableEntry_tmpl, buf2); data/c-icap-0.5.6/info.c:357:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->d1TableEntry_tmpl, buf2); data/c-icap-0.5.6/info.c:363:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->d1TableHeader_tmpl, "Shared mem blocks in use"); data/c-icap-0.5.6/info.c:371:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->d1TableEntry_tmpl, buf2); data/c-icap-0.5.6/info.c:380:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->statsHeader, stat_group); data/c-icap-0.5.6/info.c:386:22: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->statline_tmpl_int, data/c-icap-0.5.6/info.c:397:22: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. sz = snprintf(buf, LOCAL_BUF_SIZE, tmpl->statline_tmpl_kbs, data/c-icap-0.5.6/log.c:349:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(server_log, buf, ap); data/c-icap-0.5.6/modules/memcached.c:516:20: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. mckeylen = sprintf(mckey, "v%s:%s", search_domain, key); data/c-icap-0.5.6/modules/memcached.c:522:20: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. mckeylen = sprintf(mckey, "v%s:%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", data/c-icap-0.5.6/modules/sys_logger.c:210:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, 511, (const char *) prefix, ap); data/c-icap-0.5.6/openssl/net_io_ssl.c:190:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *f = popen(script, "r"); data/c-icap-0.5.6/os/unix/dlib.c:41:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, default_path); data/c-icap-0.5.6/os/unix/dlib.c:43: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(path, module_file); data/c-icap-0.5.6/os/unix/proc_mutex.c:187: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(mutex->name, CI_MUTEX_FILE_TEMPLATE); data/c-icap-0.5.6/request.c:110:9: [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. int access; data/c-icap-0.5.6/request.c:127:24: [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. req->access_type = access; data/c-icap-0.5.6/request.c:134:9: [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. int access; data/c-icap-0.5.6/request.c:145:24: [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. req->access_type = access; data/c-icap-0.5.6/request.c:414:21: [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(req->args, salias->args); data/c-icap-0.5.6/request_common.c:447: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(req->log_str, logstr); data/c-icap-0.5.6/request_common.c:897:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. int bytes = sprintf(req->wbuf, "0%s\r\n\r\n", has_eof ? "; ieof" : ""); data/c-icap-0.5.6/request_common.c:917:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. int bytes = sprintf(req->wbuf, "\r\n0%s\r\n\r\n", has_eof ? "; ieof" : ""); data/c-icap-0.5.6/service.c:282:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(srv_xdata->ISTag, ISTAG "-XXXXXXXXX"); data/c-icap-0.5.6/service.c:569:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(service_aliases[alias_indx].args, salias->args); /*we had check for len */ data/c-icap-0.5.6/service.c:576:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(service_aliases[alias_indx].args + len, args); data/c-icap-0.5.6/services/ex-206/srv_ex206.c:157:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(head, 512, "Content-Length: %" PRINTF_OFF_T, (CAST_OFF_T) content_len); data/c-icap-0.5.6/services/ex-206/srv_ex206.c:165:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "X-Ex206-Service: %s", (body_altered ? "Modified" : "Unmodified")); data/c-icap-0.5.6/tests/test_arrays.c:15:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/tests/test_body.c:24:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/tests/test_cache.c:50:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/tests/test_lists.c:15:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/tests/test_ops.c:17:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/%s", data/c-icap-0.5.6/tests/test_ops.c:57:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/tests/test_tables.c:23:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/txt_format.c:571:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->bytes_in); data/c-icap-0.5.6/txt_format.c:576:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->bytes_out); data/c-icap-0.5.6/txt_format.c:581:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->http_bytes_in); data/c-icap-0.5.6/txt_format.c:586:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->http_bytes_out); data/c-icap-0.5.6/txt_format.c:591:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->body_bytes_in); data/c-icap-0.5.6/txt_format.c:596:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return snprintf(buf, len, "%" PRINTF_OFF_T, (CAST_OFF_T) req->body_bytes_out); data/c-icap-0.5.6/types_ops.c:37:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(new_s, str); data/c-icap-0.5.6/utils/c-icap-client.c:260:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/utils/c-icap-client.c:266:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:341:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:347:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/utils/c-icap-stretch.c:710:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/utils/c-icap-stretch.c:716:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/c-icap-0.5.6/mpmt_server.c:910:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(((unsigned int)time(NULL)) + (unsigned int)getpid()); data/c-icap-0.5.6/os/win32/threads.c:23:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(pmutex); data/c-icap-0.5.6/os/win32/threads.c:35:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(pmutex); data/c-icap-0.5.6/os/win32/threads.c:103:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(rwlock); data/c-icap-0.5.6/os/win32/threads.c:115:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(rwlock); data/c-icap-0.5.6/os/win32/threads.c:121:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(rwlock); data/c-icap-0.5.6/os/win32/utilfunc.c:104:5: [3] (tmpfile) GetTempFileName: Temporary file race condition in certain cases (e.g., if run as SYSTEM in many versions of Windows) (CWE-377). GetTempFileName(dir, template, 1, filename); data/c-icap-0.5.6/utils/c-icap-stretch.c:744:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((int) START_TIME); data/c-icap-0.5.6/acl.c:339:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/acl.c:952:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, val, value_size); data/c-icap-0.5.6/acl.c:1054:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, first_line, first_line_size); data/c-icap-0.5.6/acl.c:1086:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, first_line, first_line_size); data/c-icap-0.5.6/acl.c:1120:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, first_line, found_size); data/c-icap-0.5.6/array.c:95:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(item->value, value, size); data/c-icap-0.5.6/array.c:307:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(item->name, name, name_size); data/c-icap-0.5.6/array.c:309: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(item->value, value, size); data/c-icap-0.5.6/array.c:418:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(item, value, size); data/c-icap-0.5.6/array.c:580: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(it->item, data, list->obj_size); data/c-icap-0.5.6/array.c:636: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(data, it->item, list->obj_size); data/c-icap-0.5.6/array.c:669: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(data, it->item, list->obj_size); data/c-icap-0.5.6/aserver.c:42:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char MY_HOSTNAME[CI_MAXHOSTNAMELEN + 1]; data/c-icap-0.5.6/aserver.c:60:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[64]; data/c-icap-0.5.6/aserver.c:72:9: [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(MY_HOSTNAME, "localhost"); data/c-icap-0.5.6/aserver.c:102: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). fd = open("/dev/null", O_RDWR); data/c-icap-0.5.6/body.c:202: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(b->buf + b->endpos, data, remains); data/c-icap-0.5.6/body.c:218: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(b->buf + b->endpos, data, len); data/c-icap-0.5.6/body.c:239: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(data, b->buf + b->readpos, copybytes); data/c-icap-0.5.6/body.c:318:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(pathname, flags, F_PERM); data/c-icap-0.5.6/body.c:513: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(body->buf + body->endpos, buf, len); data/c-icap-0.5.6/body.c:560:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, body->buf + body->readpos, bytes); data/c-icap-0.5.6/body.c:964: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(wb, data, wb_len); data/c-icap-0.5.6/body.c:984: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(data, rb, rb_len); data/c-icap-0.5.6/cache.c:265: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(*val, e->val, e->val_size); data/c-icap-0.5.6/cache.c:343:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(e->key, key, key_size); data/c-icap-0.5.6/cache.c:355: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(e->val, val, e->val_size); data/c-icap-0.5.6/cache.c:480:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, &(v->max_size), sizeof(size_t)); data/c-icap-0.5.6/cache.c:482:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)data_indx+vector_indx_size, vector_data_start, vector_data_size); data/c-icap-0.5.6/cfg_lib.c:98:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *act_args[2]; data/c-icap-0.5.6/cfg_lib.c:161: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. strcpy(*((char **) setdata), argv[0]); data/c-icap-0.5.6/cfg_param.c:342: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. if (*(char *) table[i].data) { data/c-icap-0.5.6/cfg_param.c:343:46: [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. ci_debug_printf(9, "%s\n", *(char **) table[i].data) data/c-icap-0.5.6/cfg_param.c:431:18: [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). pcfg->port = atoi(s); data/c-icap-0.5.6/cfg_param.c:700: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 path[CI_MAX_PATH]; data/c-icap-0.5.6/cfg_param.c:833: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(argv[i], str, len); /*copy until len or end of string */ data/c-icap-0.5.6/cfg_param.c:868:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINESIZE]; data/c-icap-0.5.6/cfg_param.c:900:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINESIZE]; data/c-icap-0.5.6/cfg_param.c:910:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f_conf = fopen(conf_file, "r")) == NULL) { data/c-icap-0.5.6/cfg_param.c:1124:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dval->value, value, size); data/c-icap-0.5.6/cfg_param.c:1147:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dval->value, value, dval->size); data/c-icap-0.5.6/cfg_param.c:1172:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(param, dval->value, dval->size); data/c-icap-0.5.6/cfg_param.c:1181: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(dval->param, dval->value, dval->size); data/c-icap-0.5.6/commands.c:31: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 name[CMD_NM_SIZE]; data/c-icap-0.5.6/decode.c:139:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[3]; data/c-icap-0.5.6/decode.c:170:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[3]; data/c-icap-0.5.6/decode.c:268:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ab->buf, buf, ab->out_len); data/c-icap-0.5.6/decode.c:505:14: [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 *out, OUT[CHUNK]; data/c-icap-0.5.6/decode.c:656: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 *out, OUT[CHUNK]; data/c-icap-0.5.6/encode.c:304:14: [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 out[CHUNK]; data/c-icap-0.5.6/encode.c:424: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 out[CHUNK]; data/c-icap-0.5.6/filetype.c:59:14: [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 magic[MAGIC_SIZE + 1]; data/c-icap-0.5.6/filetype.c:61: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 type[NAME_SIZE + 1]; data/c-icap-0.5.6/filetype.c:62:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *groups[MAX_GROUPS + 1]; data/c-icap-0.5.6/filetype.c:63: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 descr[DESCR_SIZE + 1]; data/c-icap-0.5.6/filetype.c:130:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(db->magics[indx].magic, magic, len); data/c-icap-0.5.6/filetype.c:183: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 *s, *end, num[4]; data/c-icap-0.5.6/filetype.c:321:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[RECORD_LINE]; data/c-icap-0.5.6/filetype.c:325:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename, "r")) == NULL) { data/c-icap-0.5.6/filetype.c:405:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char text_chars[256] = { data/c-icap-0.5.6/header.c:303:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(h->buf + h->bufused, headers->buf, headers->bufused + 2); data/c-icap-0.5.6/header.c:492:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[256]; data/c-icap-0.5.6/header.c:493: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 value[8196]; data/c-icap-0.5.6/header.c:616:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, heads->buf, heads->bufused); data/c-icap-0.5.6/http_auth.c:168: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 (!gsrc->db->open(gsrc->db)) { data/c-icap-0.5.6/http_auth.c:424: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 dec_http_user[MAX_USERNAME_LEN + HTTP_MAX_PASS_LEN + 2], *str; data/c-icap-0.5.6/http_auth.c:490:24: [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 (!users_db->open(users_db)) { data/c-icap-0.5.6/include/access.h:47: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 http_user[MAX_USERNAME_LEN+1]; data/c-icap-0.5.6/include/access.h:48: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 http_pass[HTTP_MAX_PASS_LEN+1]; data/c-icap-0.5.6/include/acl.h:53: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 name[MAX_NAME_LEN+1]; data/c-icap-0.5.6/include/acl.h:120: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 name[MAX_NAME_LEN + 1]; data/c-icap-0.5.6/include/body.h:86: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[CI_FILENAME_LEN+1]; data/c-icap-0.5.6/include/body.h: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 filename[CI_FILENAME_LEN+1]; data/c-icap-0.5.6/include/c-icap.h:130:24: [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. struct _ci_align_test {char n[1]; double d;}; data/c-icap-0.5.6/include/commands.h:43: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 name[CMD_NM_SIZE]; data/c-icap-0.5.6/include/filetype.h:44: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 name[NAME_SIZE+1]; data/c-icap-0.5.6/include/filetype.h:45:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char descr[DESCR_SIZE+1]; data/c-icap-0.5.6/include/filetype.h:50: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 name[NAME_SIZE+1]; data/c-icap-0.5.6/include/filetype.h:51: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 descr[DESCR_SIZE+1]; data/c-icap-0.5.6/include/filetype.h:57:14: [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 magic[MAGIC_SIZE+1]; data/c-icap-0.5.6/include/lookup_table.h:45:13: [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). void *(*open)(struct ci_lookup_table *table); data/c-icap-0.5.6/include/lookup_table.h:58:13: [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). void *(*open)(struct ci_lookup_table *table); data/c-icap-0.5.6/include/md5.h:14:14: [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 in[64]; data/c-icap-0.5.6/include/md5.h:19:44: [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. CI_DECLARE_FUNC(void) ci_MD5Final(unsigned char digest[16], struct ci_MD5Context *ctx); data/c-icap-0.5.6/include/net_io.h:76:35: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define ci_inaddr_copy(dest,src) (memcpy(&(dest),&(src),sizeof(ci_in_addr_t))) data/c-icap-0.5.6/include/proc_mutex.h:58: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 name[CI_PROC_MUTEX_NAME_SIZE]; data/c-icap-0.5.6/include/request.h:118: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 req_server[CI_MAXHOSTNAMELEN+1]; data/c-icap-0.5.6/include/request.h:120: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 user[MAX_USERNAME_LEN+1]; data/c-icap-0.5.6/include/request.h:121: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 service[MAX_SERVICE_NAME+1]; data/c-icap-0.5.6/include/request.h: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 args[MAX_SERVICE_ARGS + 1]; data/c-icap-0.5.6/include/request.h:138: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 rbuf[BUFSIZE]; data/c-icap-0.5.6/include/request.h:139: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 wbuf[MAX_CHUNK_SIZE+EXTRA_CHUNK_SIZE+2]; data/c-icap-0.5.6/include/service.h:74:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[64]; data/c-icap-0.5.6/include/service.h:89: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 ISTag[SRV_ISTAG_SIZE+1]; data/c-icap-0.5.6/include/service.h:90:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xincludes[XINCLUDES_SIZE+1]; data/c-icap-0.5.6/include/service.h:91: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 TransferPreview[MAX_HEADER_SIZE+1]; data/c-icap-0.5.6/include/service.h:92: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 TransferIgnore[MAX_HEADER_SIZE+1]; data/c-icap-0.5.6/include/service.h:93: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 TransferComplete[MAX_HEADER_SIZE+1]; data/c-icap-0.5.6/include/service.h:300: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 alias[MAX_SERVICE_NAME+1]; data/c-icap-0.5.6/include/service.h:301:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char args[MAX_SERVICE_ARGS+1]; data/c-icap-0.5.6/include/shared_mem.h:49: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 name[CI_SHARED_MEM_NAME_SIZE]; data/c-icap-0.5.6/include/util.h:39:22: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). CI_DECLARE_FUNC(int) mkstemp(char *filename); data/c-icap-0.5.6/info.c:295:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LOCAL_BUF_SIZE]; data/c-icap-0.5.6/info.c:296: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 buf2[LOCAL_BUF_SIZE]; data/c-icap-0.5.6/log.c:79: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 prefix[64]; data/c-icap-0.5.6/log.c:85:13: [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(prefix, "main proc"); data/c-icap-0.5.6/log.c:221:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(fname, "a+"); data/c-icap-0.5.6/log.c:319:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char logline[4096]; data/c-icap-0.5.6/log.c:339:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/lookup_file_table.c:105:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[65536]; data/c-icap-0.5.6/lookup_file_table.c:209:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename, "r")) == NULL) { data/c-icap-0.5.6/lookup_table.c:104:31: [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 (!lt_type || !lt_type->open) { data/c-icap-0.5.6/lookup_table.c:130:25: [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). lt->open = lt_type->open; data/c-icap-0.5.6/lookup_table.c:172:37: [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 (!table->_lt_type || !table->open) { data/c-icap-0.5.6/lookup_table.c:176:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return table->open(table); data/c-icap-0.5.6/md5.c:79: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(p, buf, len); data/c-icap-0.5.6/md5.c:82: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(p, buf, t); data/c-icap-0.5.6/md5.c:91:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->in, buf, 64); data/c-icap-0.5.6/md5.c:100:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->in, buf, len); data/c-icap-0.5.6/md5.c:107:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void ci_MD5Final(unsigned char digest[16], struct ci_MD5Context *ctx) data/c-icap-0.5.6/md5.c:146:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, ctx->buf, 16); data/c-icap-0.5.6/mem.c:101: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 ptr[1]; data/c-icap-0.5.6/mem.c:256: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(data, block->data.ptr, block->ID); data/c-icap-0.5.6/modules/bdb_tables.c:61: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 *s,home[CI_MAX_PATH]; data/c-icap-0.5.6/modules/bdb_tables.c:119:32: [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 ((ret = dbdata->env_db->open(dbdata->env_db, home, data/c-icap-0.5.6/modules/bdb_tables.c:144:28: [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 ((ret = dbdata->db->open( dbdata->db, NULL, table->path, NULL, data/c-icap-0.5.6/modules/bdb_tables.c:147:28: [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 ((ret = dbdata->db->open( dbdata->db, table->path, NULL, data/c-icap-0.5.6/modules/dnsbl_tables.c:54: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 check_domain[CI_MAXHOSTNAMELEN+1]; data/c-icap-0.5.6/modules/dnsbl_tables.c:115: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 tname[CI_MAXHOSTNAMELEN + 8]; data/c-icap-0.5.6/modules/dnsbl_tables.c:142: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 dnsname[CI_MAXHOSTNAMELEN + 8]; data/c-icap-0.5.6/modules/dnsbl_tables.c:195:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/modules/dnsbl_tables.c:211:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(addr.sockaddr), cur->ai_addr, CI_SOCKADDR_SIZE); data/c-icap-0.5.6/modules/ldap_module.c:97: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 ldap_uri[1024]; data/c-icap-0.5.6/modules/ldap_module.c:98: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 server[CI_MAXHOSTNAMELEN+1]; data/c-icap-0.5.6/modules/ldap_module.c:101: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 user[256]; data/c-icap-0.5.6/modules/ldap_module.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char password[256]; data/c-icap-0.5.6/modules/ldap_module.c:518: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 tname[1024]; data/c-icap-0.5.6/modules/ldap_module.c:684: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 filter[MAX_LDAP_FILTER_SIZE]; data/c-icap-0.5.6/modules/ldap_module.c:685:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2048]; data/c-icap-0.5.6/modules/ldap_module.c:735:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, attrs[i]->bv_val, v_size); data/c-icap-0.5.6/modules/memcached.c:77:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[HOSTNAME_LEN]; data/c-icap-0.5.6/modules/memcached.c:87: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 domain[MC_DOMAINLEN + 1]; data/c-icap-0.5.6/modules/memcached.c:247: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 useDomain[MC_DOMAINLEN + 1]; data/c-icap-0.5.6/modules/memcached.c:288: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 mckey[MC_MAXKEYLEN+1]; data/c-icap-0.5.6/modules/memcached.c:337: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(*val, value, value_len); data/c-icap-0.5.6/modules/memcached.c:350: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 mckey[MC_MAXKEYLEN+1]; data/c-icap-0.5.6/modules/memcached.c:403: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 mckey[MC_MAXKEYLEN+1]; data/c-icap-0.5.6/modules/memcached.c:439:24: [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). srv.port = atoi(s); data/c-icap-0.5.6/modules/memcached.c:510:14: [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 digest[16]; data/c-icap-0.5.6/modules/perl_handler.c:78: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 *argv[2]; data/c-icap-0.5.6/modules/shared_cache.c:113:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/c-icap-0.5.6/modules/shared_cache.c:235:25: [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(*val, cache_val, slot->value_size); data/c-icap-0.5.6/modules/shared_cache.c:303: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(cache_key, key, key_size); data/c-icap-0.5.6/modules/shared_cache.c:308: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(cache_val, val, slot->value_size); data/c-icap-0.5.6/modules/sys_logger.c:187:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char logline[1024]; data/c-icap-0.5.6/modules/sys_logger.c:204:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-0.5.6/modules/sys_logger.c:205: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 prefix[150]; data/c-icap-0.5.6/mpmt_server.c:449:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pipe = open(name, O_RDWR | O_NONBLOCK); data/c-icap-0.5.6/mpmt_server.c:456:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pipe = open(name, O_RDWR | O_NONBLOCK); data/c-icap-0.5.6/mpmt_server.c:562: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 clientname[CI_MAXHOSTNAMELEN + 1]; data/c-icap-0.5.6/mpmt_server.c:937: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[512]; data/c-icap-0.5.6/mpmt_server.c:1101: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 command_buffer[COMMANDS_BUFFER_SIZE]; data/c-icap-0.5.6/net_io.c:55:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest, src, sizeof(ci_sockaddr_t)); data/c-icap-0.5.6/net_io.c:75:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest, src, sizeof(ci_sockaddr_t)); data/c-icap-0.5.6/net_io.c:83:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip_dest->address,src->ci_sin_addr,sizeof(ci_in_addr_t)); data/c-icap-0.5.6/net_io.c:200:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(addr->sockaddr), res->ai_addr, CI_SOCKADDR_SIZE); data/c-icap-0.5.6/net_io.c:229: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 errBuf[512]; data/c-icap-0.5.6/openssl/net_io_ssl.c:67: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 fpath[CI_MAX_PATH]; data/c-icap-0.5.6/openssl/net_io_ssl.c:179: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 script[65535]; data/c-icap-0.5.6/openssl/net_io_ssl.c:417: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 portString[128]; data/c-icap-0.5.6/openssl/net_io_ssl.c:714:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-0.5.6/openssl/net_io_ssl.c:715:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[CI_MAXHOSTNAMELEN + 1]; data/c-icap-0.5.6/os/unix/dlib.c:29: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 path[CI_MAX_PATH]; data/c-icap-0.5.6/os/unix/net_io.c:462:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/c-icap-0.5.6/os/unix/proc_mutex.c:189:27: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((mutex->file.fd = mkstemp(mutex->name)) < 0) data/c-icap-0.5.6/os/unix/proc_utils.c:33: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 strPid[30]; /*30 must be enough for storing pids on a string */ data/c-icap-0.5.6/os/unix/proc_utils.c:36:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(pidfile, O_CREAT | O_TRUNC | O_WRONLY, 0644)) < 0) { data/c-icap-0.5.6/os/unix/proc_utils.c:63: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 strPid[30]; /*30 must be enough for storing pids on a string */ data/c-icap-0.5.6/os/unix/proc_utils.c:64:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(pidfile, O_RDONLY, 0644)) < 0) { data/c-icap-0.5.6/os/unix/utilfunc.c:81:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). return mkstemp(filename); data/c-icap-0.5.6/os/win32/net_io.c:316:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/c-icap-0.5.6/os/win32/utilfunc.c:58:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tm, localtime(t), sizeof(struct tm)); data/c-icap-0.5.6/os/win32/utilfunc.c:65:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tm, gmtime(t), sizeof(struct tm)); data/c-icap-0.5.6/os/win32/utilfunc.c:105: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). fd = open(filename, O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE); data/c-icap-0.5.6/registry.c:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/request.c:273: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(h->buf, req->pstrblock_read, readed); data/c-icap-0.5.6/request.c:353:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(req->req_server, start, servnamelen); data/c-icap-0.5.6/request.c:617:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/request.c:630:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/request.c:690:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-0.5.6/request.c:777: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 tmpbuf[EXTRA_CHUNK_SIZE]; data/c-icap-0.5.6/request.c:797: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(wbuf, tmpbuf, def_bytes); data/c-icap-0.5.6/request.c:802:25: [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. def_bytes = sprintf(req->wbuf, "0; use-original-body=%" PRId64 "\r\n\r\n", data/c-icap-0.5.6/request.c:807:13: [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(req->wbuf, "0\r\n\r\n"); data/c-icap-0.5.6/request.c:1159:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_HEADER_SIZE + 1]; data/c-icap-0.5.6/request.c:1175: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, "Methods: "); data/c-icap-0.5.6/request.c:1177:9: [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(buf, "RESPMOD"); data/c-icap-0.5.6/request.c:1180:13: [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(buf, ", REQMOD"); data/c-icap-0.5.6/request.c:1183:9: [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(buf, "REQMOD"); data/c-icap-0.5.6/request.c:1238:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Options-TTL: %d", ttl); data/c-icap-0.5.6/request.c:1242: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, "Date: "); data/c-icap-0.5.6/request.c:1246:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Preview: %d", srv_xdata->preview_size); data/c-icap-0.5.6/request.c:1250:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Max-Connections: %d", max_conns); data/c-icap-0.5.6/request.c:1259:9: [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, "X-Include: "); data/c-icap-0.5.6/request.c:1262:13: [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(buf, "X-Client-IP"); data/c-icap-0.5.6/request.c:1267:17: [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(buf, ", "); data/c-icap-0.5.6/request.c:1270:13: [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(buf, "X-Server-IP"); data/c-icap-0.5.6/request.c:1275:17: [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(buf, ", "); data/c-icap-0.5.6/request.c:1278:13: [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(buf, "X-Subscriber-ID"); data/c-icap-0.5.6/request.c:1283:17: [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(buf, ", "); data/c-icap-0.5.6/request.c:1286:13: [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(buf, "X-Authenticated-User"); data/c-icap-0.5.6/request.c:1291:17: [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(buf, ", "); data/c-icap-0.5.6/request.c:1294:13: [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(buf, "X-Authenticated-Groups"); data/c-icap-0.5.6/request_common.c:83:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->buf + buf->used, data, len); data/c-icap-0.5.6/request_common.c:100:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-0.5.6/request_common.c:106:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Preview: %d", req->preview); data/c-icap-0.5.6/request_common.c:126:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Encapsulated: null-body=0"); data/c-icap-0.5.6/request_common.c:755:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/request_common.c:891:25: [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. int bytes = sprintf(req->wbuf, "%x\r\n", req->preview); data/c-icap-0.5.6/request_common.c:969:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, req->pstrblock_read, readed); data/c-icap-0.5.6/request_common.c:1001: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(h->buf + h->bufused, req->pstrblock_read, readed); data/c-icap-0.5.6/request_common.c:1113: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 tmpbuf[EXTRA_CHUNK_SIZE]; data/c-icap-0.5.6/request_common.c:1130:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(wbuf, tmpbuf, def_bytes); data/c-icap-0.5.6/service.c:277:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/service.c:278: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 stat_group[1024]; data/c-icap-0.5.6/service.c:281: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(srv_xdata->ISTag, "ISTag: "); data/c-icap-0.5.6/service.c:502:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/service_lib.c:49: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(srv_xdata->TransferPreview, "Transfer-Preview: "); data/c-icap-0.5.6/service_lib.c:59: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(srv_xdata->TransferIgnore, "Transfer-Ignore: "); data/c-icap-0.5.6/service_lib.c:69: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(srv_xdata->TransferComplete, "Transfer-Complete: "); data/c-icap-0.5.6/service_lib.c:137:13: [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(srv_xdata->xincludes, ", "); data/c-icap-0.5.6/services/ex-206/srv_ex206.c:124:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/services/ex-206/srv_ex206.c:156: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 head[512]; data/c-icap-0.5.6/tests/test_arrays.c:44: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 name[128]; data/c-icap-0.5.6/tests/test_arrays.c:45:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value[128]; data/c-icap-0.5.6/tests/test_arrays.c:59:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "name%d", i); data/c-icap-0.5.6/tests/test_arrays.c:60:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "value%d", i); data/c-icap-0.5.6/tests/test_arrays.c:81:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "name%d", i); data/c-icap-0.5.6/tests/test_arrays.c:82:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "value%d", i); data/c-icap-0.5.6/tests/test_arrays.c:100:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "name%d", i); data/c-icap-0.5.6/tests/test_arrays.c:101:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "dynvalue%d", i); data/c-icap-0.5.6/tests/test_arrays.c:109:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-0.5.6/tests/test_arrays.c:122:13: [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(value, "value: %d", i); data/c-icap-0.5.6/tests/test_arrays.c:149:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "name%d", i); data/c-icap-0.5.6/tests/test_arrays.c:150:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(value, "value%d", i); data/c-icap-0.5.6/tests/test_base64.c:7: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 encoded[1024]; data/c-icap-0.5.6/tests/test_base64.c:8: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 decoded[1024]; data/c-icap-0.5.6/tests/test_body.c:11: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. MDPrint(const char *label, unsigned char digest[16]) data/c-icap-0.5.6/tests/test_body.c:11:37: [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. MDPrint(const char *label, unsigned char digest[16]) data/c-icap-0.5.6/tests/test_body.c:59:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/c-icap-0.5.6/tests/test_body.c:61:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(FILENAME, "r")) == NULL) { data/c-icap-0.5.6/tests/test_body.c:72:14: [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 digest[16]; data/c-icap-0.5.6/tests/test_headers.c:23:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/c-icap-0.5.6/tests/test_lists.c:38:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/c-icap-0.5.6/tests/test_md5.c:7:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static void MDPrint(unsigned char digest[16]); data/c-icap-0.5.6/tests/test_md5.c:14:14: [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 digest[16]; data/c-icap-0.5.6/tests/test_md5.c:25:18: [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. MDPrint(unsigned char digest[16]) data/c-icap-0.5.6/tests/test_ops.c:14: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 ip_buf[512]; data/c-icap-0.5.6/tests/test_ops.c:15: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 mask_buf[512]; data/c-icap-0.5.6/tests/test_ops.c:16:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[1024]; data/c-icap-0.5.6/tests/test_ops.c:26:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ip_buf[128]; data/c-icap-0.5.6/tests/test_tables.c:124:17: [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 (!table->open(table)) { data/c-icap-0.5.6/txtTemplate.c:111: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 path[CI_MAX_PATH]; data/c-icap-0.5.6/txtTemplate.c:255: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 path[CI_MAX_PATH]; data/c-icap-0.5.6/txtTemplate.c:256:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/c-icap-0.5.6/txtTemplate.c:281: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). fd = open(path, O_RDONLY); data/c-icap-0.5.6/txtTemplate.c:351: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 preferred[32]; data/c-icap-0.5.6/txtTemplate.c:399: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 templpath[CI_MAX_PATH]; data/c-icap-0.5.6/txt_format.c:249: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 parameter[MAX_VARIABLE_SIZE]; data/c-icap-0.5.6/types_ops.c:449:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_addr[CI_IPLEN+1], str_netmask[CI_IPLEN+1]; data/c-icap-0.5.6/types_ops.c:528:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128],buf1[128],buf2[128]; data/c-icap-0.5.6/types_ops.c:566:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128],buf1[128],buf2[128]; data/c-icap-0.5.6/utils/c-icap-client.c:77: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 lbuf[512]; data/c-icap-0.5.6/utils/c-icap-client.c:85: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(lbuf, "Date: "); data/c-icap-0.5.6/utils/c-icap-client.c:91: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(lbuf, "Last-Modified: "); data/c-icap-0.5.6/utils/c-icap-client.c:96: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(lbuf, "Content-Length: %d", filesize); data/c-icap-0.5.6/utils/c-icap-client.c:106: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 lbuf[1024]; data/c-icap-0.5.6/utils/c-icap-client.c:113: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(lbuf, "Date: "); data/c-icap-0.5.6/utils/c-icap-client.c:121:9: [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(lbuf, "Last-Modified: "); data/c-icap-0.5.6/utils/c-icap-client.c:126:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(lbuf, "Content-Length: %d", filesize); data/c-icap-0.5.6/utils/c-icap-client.c:154:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4095]; data/c-icap-0.5.6/utils/c-icap-client.c:273: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 ip[CI_IPLEN]; data/c-icap-0.5.6/utils/c-icap-client.c:346:36: [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 (input_file && (fd_in = open(input_file, O_RDONLY)) < 0) { data/c-icap-0.5.6/utils/c-icap-client.c:353:25: [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). open(output_file, O_CREAT | O_RDWR | O_EXCL, data/c-icap-0.5.6/utils/c-icap-mkbdb.c:73: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 *s,home[CI_MAX_PATH]; data/c-icap-0.5.6/utils/c-icap-mkbdb.c:95:24: [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 ((ret = env_db->open(env_db, home, data/c-icap-0.5.6/utils/c-icap-mkbdb.c:113: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 ((ret = db->open(db, NULL, path, NULL, data/c-icap-0.5.6/utils/c-icap-mkbdb.c:169:33: [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. printf("%s |", (char *)store_index[i]); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:270: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(store_value, avalue, avalue_size); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:276:64: [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. printf("\t\t- Storing val:%s at pos:%p(%s:%d)\n", (char *)avalue, store_index[i], data/c-icap-0.5.6/utils/c-icap-mkbdb.c:356: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 outfile[CI_MAX_PATH]; data/c-icap-0.5.6/utils/c-icap-mkbdb.c:357:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MAXLINE]; data/c-icap-0.5.6/utils/c-icap-mkbdb.c:397:9: [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(outfile,".db"); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:413:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(txtfile, "r+")) == NULL) { data/c-icap-0.5.6/utils/c-icap-stretch.c:57:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *URLS[MAX_URLS]; data/c-icap-0.5.6/utils/c-icap-stretch.c:159:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[URL_SIZE+1]; data/c-icap-0.5.6/utils/c-icap-stretch.c:164:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename, "r")) == NULL) { data/c-icap-0.5.6/utils/c-icap-stretch.c:195: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 lbuf[512]; data/c-icap-0.5.6/utils/c-icap-stretch.c:205: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(lbuf, "Date: "); data/c-icap-0.5.6/utils/c-icap-stretch.c:211: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(lbuf, "Last-Modified: "); data/c-icap-0.5.6/utils/c-icap-stretch.c:216: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(lbuf, "Content-Length: %d", filesize); data/c-icap-0.5.6/utils/c-icap-stretch.c:225: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 lbuf[1024]; data/c-icap-0.5.6/utils/c-icap-stretch.c:232: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(lbuf, "Date: "); data/c-icap-0.5.6/utils/c-icap-stretch.c:261: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 lbuf[1024]; data/c-icap-0.5.6/utils/c-icap-stretch.c:262: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 host[512]; data/c-icap-0.5.6/utils/c-icap-stretch.c:263: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 path[512]; data/c-icap-0.5.6/utils/c-icap-stretch.c:280:13: [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(path, "/index.html"); data/c-icap-0.5.6/utils/c-icap-stretch.c:297: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(lbuf, "Date: "); data/c-icap-0.5.6/utils/c-icap-stretch.c:432:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd_in = open(input_file, O_RDONLY)) < 0) { data/c-icap-0.5.6/utils/c-icap-stretch.c:625:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-0.5.6/utils/c-icap-stretch.c:658:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "X-Client-IP: %d.%d.%d.%d", ip1, ip2,ip3,i); data/c-icap-0.5.6/winnt_server.c:129:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char clientname[CI_MAXHOSTNAMELEN + 1]; data/c-icap-0.5.6/acl.c:343:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, str, sizeof(buf)); data/c-icap-0.5.6/acl.c:350: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 (strncasecmp(s, days[i].day, strlen(days[i].day)) == 0) { data/c-icap-0.5.6/acl.c:360: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). s += strlen(days[i].day); data/c-icap-0.5.6/acl.c:582:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(spec->name, name, MAX_NAME_LEN); data/c-icap-0.5.6/acl.c:717:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cur->name, type->name, MAX_NAME_LEN); data/c-icap-0.5.6/acl.c:761:18: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (ops->equal(spec_data->data, (void *)req_raw_data)) { data/c-icap-0.5.6/array.c:85: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). item->name = ci_pack_allocator_alloc_from_rear(packer, strlen(name) + 1); data/c-icap-0.5.6/array.c:172: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). item->name = ci_pack_allocator_alloc_from_rear(packer, strlen(name) + 1); data/c-icap-0.5.6/array.c:205:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, item->name, name_size); data/c-icap-0.5.6/array.c:290: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). name_size = strlen(name) + 1; data/c-icap-0.5.6/aserver.c:67:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(MY_HOSTNAME, hent->h_name, CI_MAXHOSTNAMELEN); data/c-icap-0.5.6/aserver.c:88:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/c-icap-0.5.6/body.c:301:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(fd, buf, count); data/c-icap-0.5.6/cfg_lib.c:157:51: [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 (!(*((char **) setdata) = ci_cfg_alloc_mem(strlen(argv[0]) + 1))) { data/c-icap-0.5.6/cfg_param.c:418: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). if (addr[strlen(addr) - 1] != ']') { data/c-icap-0.5.6/cfg_param.c:424: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). addr[strlen(addr) - 1] = '\0'; data/c-icap-0.5.6/cfg_param.c:611:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(argv[0]); data/c-icap-0.5.6/cfg_param.c:768: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(line) >= LINESIZE - 2 && line[LINESIZE - 2] != '\n') { //Size of line > LINESIZE data/c-icap-0.5.6/cfg_param.c:770:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc(f_conf) == '\n') data/c-icap-0.5.6/cfg_param.c:870:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line, orig_line, LINESIZE); data/c-icap-0.5.6/commands.c:59:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmd.name, name, CMD_NM_SIZE); data/c-icap-0.5.6/commands.c:79:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmd.name, name, CMD_NM_SIZE); data/c-icap-0.5.6/commands.c:137: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(cmd_line); data/c-icap-0.5.6/commands.c:140:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpCmd.name, cmd_line, len); data/c-icap-0.5.6/commands.c:213:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sch.name, name, CMD_NM_SIZE); data/c-icap-0.5.6/decode.c:97:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(encoded); data/c-icap-0.5.6/filetype.c:186:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(line)) < 4) /*must have at least 4 ':' */ data/c-icap-0.5.6/filetype.c:235:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(record->type, s, NAME_SIZE); data/c-icap-0.5.6/filetype.c:243:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(record->descr, s, DESCR_SIZE); data/c-icap-0.5.6/filetype.c:251:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(record->groups[i], s, NAME_SIZE); data/c-icap-0.5.6/filetype.c:260:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(record->groups[i], s, NAME_SIZE); data/c-icap-0.5.6/header.c:240: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). linelen = strlen(line); data/c-icap-0.5.6/header.c:254: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). h->headers[i] = h->headers[i - 1] + strlen(h->headers[i - 1]) + 2; data/c-icap-0.5.6/header.c:310: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). h->headers[i] = h->headers[i - 1] + strlen(h->headers[i - 1]) + 2; data/c-icap-0.5.6/header.c:337: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). size_t header_size = strlen(header); data/c-icap-0.5.6/header.c:440: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). header_size = strlen(header); data/c-icap-0.5.6/header.c:467:37: [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). cur_head_size = strlen(h->headers[j - 1]); data/c-icap-0.5.6/header.c:521: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(h->headers[i]); data/c-icap-0.5.6/http_auth.c:74:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->user, username, MAX_USERNAME_LEN); data/c-icap-0.5.6/http_auth.c:107:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->user, username, MAX_USERNAME_LEN); data/c-icap-0.5.6/http_auth.c:263: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). char *new_s = allocator->alloc(allocator,strlen(str)+1); data/c-icap-0.5.6/http_auth.c:276: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). return strlen((const char *)key)+1; data/c-icap-0.5.6/http_auth.c:402:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int size = strlen(BASIC_HEAD_PREFIX)+strlen(basic_realm)+3; data/c-icap-0.5.6/http_auth.c:402: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). int size = strlen(BASIC_HEAD_PREFIX)+strlen(basic_realm)+3; data/c-icap-0.5.6/http_auth.c:435:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data->http_pass, str, HTTP_MAX_PASS_LEN); data/c-icap-0.5.6/http_auth.c:438:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data->http_user, dec_http_user, MAX_USERNAME_LEN); data/c-icap-0.5.6/include/array.h:174:96: [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). #define ci_str_array_add(array, name, value) ci_array_add((ci_array_t *)(array), name, value, (strlen(value)+1)) data/c-icap-0.5.6/include/array.h:532:102: [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). #define ci_str_vector_add(vect, string) ((const char *)ci_vector_add((ci_vector_t *)(vect), string, (strlen(string)+1))) data/c-icap-0.5.6/include/types_ops.h:36:11: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. int (*equal)(const void *ref_key,const void *check_key); data/c-icap-0.5.6/info.c:327: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). ci_membuf_write(info_data->body, tmpl->childsHeader, strlen(tmpl->childsHeader), 0); data/c-icap-0.5.6/info.c:334:55: [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). ci_membuf_write(info_data->body, tmpl->childsEnd, strlen(tmpl->childsEnd), 0); data/c-icap-0.5.6/info.c:337: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). ci_membuf_write(info_data->body, tmpl->closingChildsHeader, strlen(tmpl->closingChildsHeader), 0); data/c-icap-0.5.6/info.c:344:55: [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). ci_membuf_write(info_data->body, tmpl->childsEnd, strlen(tmpl->childsEnd), 0); data/c-icap-0.5.6/info.c:360: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). ci_membuf_write(info_data->body, tmpl->d1TableEnd_tmpl, strlen(tmpl->d1TableEnd_tmpl), 0); data/c-icap-0.5.6/info.c:374: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). ci_membuf_write(info_data->body, tmpl->d1TableEnd_tmpl, strlen(tmpl->d1TableEnd_tmpl), 0); data/c-icap-0.5.6/info.c:405: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). ci_membuf_write(info_data->body,tmpl->statsEnd, strlen(tmpl->statsEnd), 0); data/c-icap-0.5.6/log.c:345: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). const size_t len = strlen(buf); data/c-icap-0.5.6/lookup_file_table.c:118: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). if ((line_len=strlen(line))>65535) { data/c-icap-0.5.6/lookup_file_table.c:157: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). end = s + strlen(s); data/c-icap-0.5.6/module.c:392: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). len_extension = strlen(extension); data/c-icap-0.5.6/module.c:399: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). len_s = strlen(s); data/c-icap-0.5.6/modules/bdb_tables.c:78:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(home,table->path,CI_MAX_PATH); data/c-icap-0.5.6/modules/dnsbl_tables.c:69: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(table->path) >= CI_MAXHOSTNAMELEN ) { data/c-icap-0.5.6/modules/dnsbl_tables.c:85:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dnsbl_data->check_domain, table->path, CI_MAXHOSTNAMELEN); data/c-icap-0.5.6/modules/ldap_module.c:192:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pool->server, server, CI_MAXHOSTNAMELEN); data/c-icap-0.5.6/modules/ldap_module.c:200:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pool->user,user,256); data/c-icap-0.5.6/modules/ldap_module.c:206:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pool->password,password,256); data/c-icap-0.5.6/modules/ldap_module.c:322: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). ldap_passwd.bv_len = strlen(pool->password); data/c-icap-0.5.6/modules/memcached.c:248:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(useDomain, domain, MC_DOMAINLEN); data/c-icap-0.5.6/modules/memcached.c:265:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(mc_data->domain, useDomain, MC_DOMAINLEN); data/c-icap-0.5.6/modules/memcached.c:434:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(srv.hostname, argv[argc], HOSTNAME_LEN); data/c-icap-0.5.6/modules/memcached.c:515: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(key)+strlen(search_domain)+2 < MC_MAXKEYLEN) { data/c-icap-0.5.6/modules/memcached.c:515: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). if (strlen(key)+strlen(search_domain)+2 < MC_MAXKEYLEN) { data/c-icap-0.5.6/modules/memcached.c:519:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ci_MD5Update(&md5, (const unsigned char *)key, strlen(key)); data/c-icap-0.5.6/modules/sys_logger.c:99:51: [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). else if (strncmp(argv[0], "local", 5) == 0 && strlen(argv[0]) == 6) { data/c-icap-0.5.6/mpmt_server.c:523: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). strlen(cmd_line)); data/c-icap-0.5.6/openssl/net_io_ssl.c:200: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). return strlen(buf); data/c-icap-0.5.6/os/unix/dlib.c:33: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(default_path) + strlen(module_file) + 1; /*plus the '/' delimiter */ data/c-icap-0.5.6/os/unix/dlib.c:33: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). len = strlen(default_path) + strlen(module_file) + 1; /*plus the '/' delimiter */ data/c-icap-0.5.6/os/unix/dlib.c:42:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(path, "/"); data/c-icap-0.5.6/os/unix/dlib.c:45:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, module_file, CI_MAX_PATH - 1); data/c-icap-0.5.6/os/unix/net_io.c:367:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(fd, buf, count); data/c-icap-0.5.6/os/unix/net_io.c:380:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(fd, buf, count); data/c-icap-0.5.6/os/unix/net_io.c:428:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(fd, buf, count); data/c-icap-0.5.6/os/unix/proc_mutex.c:69:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(mutex->name, name, CI_PROC_MUTEX_NAME_SIZE); data/c-icap-0.5.6/os/unix/proc_utils.c:42: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). bytes = write(fd, strPid, strlen(strPid)); data/c-icap-0.5.6/os/unix/proc_utils.c:43: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). if (bytes != strlen(strPid)) { data/c-icap-0.5.6/os/unix/proc_utils.c:67:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(fd, strPid, sizeof(strPid)); data/c-icap-0.5.6/os/unix/utilfunc.c:58: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). buf[strlen(buf) - 1] = '\0'; data/c-icap-0.5.6/os/win32/shared_mem.c:66:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(id->name, name, CI_SHARED_MEM_NAME_SIZE); data/c-icap-0.5.6/regex.c:21: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(str); data/c-icap-0.5.6/regex.c:28:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, str, slen); data/c-icap-0.5.6/regex.c:130: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). int str_length = len >=0 ? len : strlen(str); data/c-icap-0.5.6/request.c:120: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(FORBITTEN_STR); data/c-icap-0.5.6/request.c:141: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(FORBITTEN_STR); data/c-icap-0.5.6/request.c:364:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->service, start, len); data/c-icap-0.5.6/request.c:371: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). args_len = strlen(req->args); data/c-icap-0.5.6/request.c:379:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->args + args_len, start, len); data/c-icap-0.5.6/request.c:406:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->service, DEFAULT_SERVICE, MAX_SERVICE_NAME); data/c-icap-0.5.6/request.c:622:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/c-icap-0.5.6/request.c:1243: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). ci_strtime_rfc822(buf + strlen(buf)); data/c-icap-0.5.6/request_common.c:443: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). size = strlen(logstr) + 1; data/c-icap-0.5.6/request_common.c:698:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->req_server, server, CI_MAXHOSTNAMELEN); data/c-icap-0.5.6/request_common.c:700:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(req->service, service, MAX_SERVICE_NAME); data/c-icap-0.5.6/service.c:563:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(service_aliases[alias_indx].alias, data/c-icap-0.5.6/service.c:568: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(salias->args); data/c-icap-0.5.6/service_lib.c:39:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(srv_xdata->ISTag + SRV_ISTAG_POS, istag, data/c-icap-0.5.6/service_lib.c:50:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(srv_xdata->TransferPreview, preview, data/c-icap-0.5.6/service_lib.c:60:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(srv_xdata->TransferIgnore, ignore, data/c-icap-0.5.6/service_lib.c:70:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(srv_xdata->TransferComplete, complete, data/c-icap-0.5.6/service_lib.c:140:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(srv_xdata->xincludes, xincludes[i], XINCLUDES_SIZE - len); data/c-icap-0.5.6/service_lib.c:141:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(xincludes[i]); data/c-icap-0.5.6/service_lib.c:155:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(oh.name, name, sizeof(oh.name) - 1); data/c-icap-0.5.6/services/ex-206/srv_ex206.c:147:55: [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). ci_membuf_write(ex206_data->body, script, strlen(script), 1); data/c-icap-0.5.6/services/ex-206/srv_ex206.c:148: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). ex206_data->script_size = strlen(script); data/c-icap-0.5.6/tests/test_arrays.c:151: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). if (ci_dyn_array_add(dyn_arr, name, value, strlen(value) + 1) == NULL) { data/c-icap-0.5.6/tests/test_arrays.c:154: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). j += strlen(name) + strlen(value) + 2; data/c-icap-0.5.6/tests/test_arrays.c:154: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). j += strlen(name) + strlen(value) + 2; data/c-icap-0.5.6/tests/test_arrays.c:160: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). j += strlen(n) + strlen(v) + 2; data/c-icap-0.5.6/tests/test_arrays.c:160: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). j += strlen(n) + strlen(v) + 2; data/c-icap-0.5.6/tests/test_base64.c:15: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). ci_base64_encode((unsigned char *)str, (size_t)strlen(str), encoded, 1024); data/c-icap-0.5.6/tests/test_cache.c:99: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). ci_cache_update(cache, "test1", "A test1 val", strlen("A test1 val") + 1, NULL); data/c-icap-0.5.6/tests/test_cache.c:101: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). ci_cache_update(cache, "test2", "A test2 val", strlen("A test2 val") + 1, NULL); data/c-icap-0.5.6/tests/test_cache.c:103: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). ci_cache_update(cache, "test3", "A test 3 val", strlen("A test 3 val") + 1, NULL); data/c-icap-0.5.6/tests/test_cache.c:105: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). ci_cache_update(cache, "test4", "A test 4 val", strlen("A test 4 val") + 1, NULL); data/c-icap-0.5.6/tests/test_md5.c:15: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). unsigned int len = strlen(string); data/c-icap-0.5.6/tests/test_ops.c:33:25: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. ret = ci_ip_ops.equal(ip1, ip2); data/c-icap-0.5.6/tests/test_ops.c:43:25: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. ret = ci_ip_ops.equal(ip1, ip2); data/c-icap-0.5.6/txtTemplate.c:299:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((len = read(fd, buf, sizeof(buf))) > 0) { data/c-icap-0.5.6/txtTemplate.c:414: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). ci_membuf_attr_add(content, "lang", template->LANGUAGE, strlen(template->LANGUAGE) + 1); data/c-icap-0.5.6/txtTemplate.c:422: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). ci_membuf_attr_add(content, "lang", TEMPLATE_DEF_LANG, strlen(TEMPLATE_DEF_LANG) + 1); data/c-icap-0.5.6/txt_format.c:316:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "-" ); data/c-icap-0.5.6/txt_format.c:318: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). return strlen(buf); data/c-icap-0.5.6/txt_format.c:327:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "-" ); data/c-icap-0.5.6/txt_format.c:329: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). return strlen(buf); data/c-icap-0.5.6/types_ops.c:35: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). char *new_s = allocator->alloc(allocator,strlen(str)+1); data/c-icap-0.5.6/types_ops.c:57: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). return strlen((const char *)key)+1; data/c-icap-0.5.6/types_ops.c:276: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). return (ci_regex_apply(reg->preg, (const char *)key2, strlen(key2), 0, NULL, NULL) == 0 ? 1 : 0); data/c-icap-0.5.6/types_ops.c:284: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). return ci_regex_apply(reg->preg, (const char *)key2, strlen(key2), 0, NULL, NULL) != 0; data/c-icap-0.5.6/types_ops.c:289: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). return strlen(((const struct ci_acl_regex *)key)->str); data/c-icap-0.5.6/types_ops.c:469:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str_addr,value,len); data/c-icap-0.5.6/types_ops.c:477:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str_netmask, pstr+1, CI_IPLEN); data/c-icap-0.5.6/util.c:30: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). size_t len = strlen(find); data/c-icap-0.5.6/util.c:61: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). size_t len = strlen(find); data/c-icap-0.5.6/util.c:127: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). e = str+strlen(str); data/c-icap-0.5.6/util.c:140: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). e = s + strlen(s); data/c-icap-0.5.6/util.c:187: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). ci_dyn_array_add(args_array, k, v ? v : "", v ? strlen(v) + 1 : 1); data/c-icap-0.5.6/utils/c-icap-client.c:87: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-client.c:88:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-client.c:92: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-client.c:93:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-client.c:115: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-client.c:116:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-client.c:122: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-client.c:123: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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-client.c:139:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(*(int *) fd, buf, len); data/c-icap-0.5.6/utils/c-icap-client.c:158:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((len = read(fd_in, buf, sizeof(buf))) > 0) { data/c-icap-0.5.6/utils/c-icap-mkbdb.c:75:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(home, path,CI_MAX_PATH); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:214: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). e = s + strlen(s); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:390:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(outfile, txtfile, CI_MAX_PATH); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:392: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). len=strlen(outfile); data/c-icap-0.5.6/utils/c-icap-mkbdb.c:399:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(outfile, dbfile, CI_MAX_PATH); data/c-icap-0.5.6/utils/c-icap-stretch.c:151: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). e = str+strlen(str); data/c-icap-0.5.6/utils/c-icap-stretch.c:170: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). line[strlen(line)-1] = '\0'; data/c-icap-0.5.6/utils/c-icap-stretch.c:207: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-stretch.c:208:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-stretch.c:212: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-stretch.c:213:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-stretch.c:234: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-stretch.c:235:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-stretch.c:246:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(*(int *) fd, buf, len); data/c-icap-0.5.6/utils/c-icap-stretch.c:273:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, url, 512 > (s-url) ? (s-url): 512); data/c-icap-0.5.6/utils/c-icap-stretch.c:275:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, s, 512); data/c-icap-0.5.6/utils/c-icap-stretch.c:278:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, url, 512); data/c-icap-0.5.6/utils/c-icap-stretch.c:299: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). ctime_r(<imet, lbuf + strlen(lbuf)); data/c-icap-0.5.6/utils/c-icap-stretch.c:300:10: [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). lbuf[strlen(lbuf) - 1] = '\0'; data/c-icap-0.5.6/utils/c-icap-stretch.c:404:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/c-icap-0.5.6/utils/c-icap-stretch.c:410:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000000); data/c-icap-0.5.6/utils/c-icap-stretch.c:547:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/c-icap-0.5.6/utils/c-icap-stretch.c:560:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000000); ANALYSIS SUMMARY: Hits = 569 Lines analyzed = 38229 in approximately 1.19 seconds (32091 lines/second) Physical Source Lines of Code (SLOC) = 27384 Hits@level = [0] 178 [1] 180 [2] 312 [3] 8 [4] 69 [5] 0 Hits@level+ = [0+] 747 [1+] 569 [2+] 389 [3+] 77 [4+] 69 [5+] 0 Hits/KSLOC@level+ = [0+] 27.2787 [1+] 20.7786 [2+] 14.2054 [3+] 2.81186 [4+] 2.51972 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.