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-modules-0.5.4/services/virus_scan/virus_scan.h Examining data/c-icap-modules-0.5.4/services/virus_scan/av_body.h Examining data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c Examining data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c Examining data/c-icap-modules-0.5.4/services/virus_scan/av_body.c Examining data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c Examining data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c Examining data/c-icap-modules-0.5.4/services/virus_scan/profiles.c Examining data/c-icap-modules-0.5.4/services/content_filtering/srv_body.c Examining data/c-icap-modules-0.5.4/services/content_filtering/srv_content_filtering.c Examining data/c-icap-modules-0.5.4/services/content_filtering/filters.h Examining data/c-icap-modules-0.5.4/services/content_filtering/srv_body.h Examining data/c-icap-modules-0.5.4/services/content_filtering/filters.c Examining data/c-icap-modules-0.5.4/services/content_filtering/profiles.c Examining data/c-icap-modules-0.5.4/services/url_check/sguardDB.h Examining data/c-icap-modules-0.5.4/services/url_check/sguardDB.c Examining data/c-icap-modules-0.5.4/services/url_check/request_filter.c Examining data/c-icap-modules-0.5.4/services/url_check/url_check_body.h Examining data/c-icap-modules-0.5.4/services/url_check/url_check_body.c Examining data/c-icap-modules-0.5.4/services/url_check/request_filter.h Examining data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c Examining data/c-icap-modules-0.5.4/common.h FINAL RESULTS: data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:575:6: [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-modules-0.5.4/services/url_check/sguardDB.c:581:6: [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-modules-0.5.4/services/url_check/srv_url_check.c:408: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(httpinf->raw_url, httpinf->site); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:449: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(httpinf->site, httpinf->host); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:563:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(a_virus.virus, vinfo->virus_name); // Both of ize AV_NAME_SIZE data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:591:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(daily_path, "%s/daily.cvd", cl_retdbdir()); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:596:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(daily_path, "%s/daily.cld", cl_retdbdir()); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:601:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(daily_path, "%s/daily.inc/daily.info", cl_retdbdir()); data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:413: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(a_virus.virus, vinfo->virus_name); // Both of ize AV_NAME_SIZE data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:798: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(pb->buf, buf); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:863: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(pb->buf, buf); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1218:5: [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(buf, sizeof(buf), "Content-Length: %" PRINTF_OFF_T, (CAST_OFF_T)new_file_size); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:340: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)data->expected_size); data/c-icap-modules-0.5.4/services/content_filtering/filters.c:238: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 url[URL_MAX_SIZE]; data/c-icap-modules-0.5.4/services/content_filtering/filters.c:315:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1]; data/c-icap-modules-0.5.4/services/content_filtering/filters.c:487: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-modules-0.5.4/services/content_filtering/filters.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 line[65536]; data/c-icap-modules-0.5.4/services/content_filtering/filters.c:690: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(file, "r+")) == NULL) { data/c-icap-modules-0.5.4/services/content_filtering/filters.h:20: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[128]; data/c-icap-modules-0.5.4/services/content_filtering/filters.h:24: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 template[512]; data/c-icap-modules-0.5.4/services/content_filtering/profiles.c:217: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 *newArgv[5]; data/c-icap-modules-0.5.4/services/content_filtering/srv_body.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 str[3]; data/c-icap-modules-0.5.4/services/content_filtering/srv_body.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 output[512]; data/c-icap-modules-0.5.4/services/content_filtering/srv_content_filtering.c:303: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[1024]; data/c-icap-modules-0.5.4/services/content_filtering/srv_content_filtering.c:423:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/content_filtering/srv_content_filtering.c:452: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-modules-0.5.4/services/content_filtering/srv_content_filtering.c:453: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[1024]; data/c-icap-modules-0.5.4/services/url_check/request_filter.c:58:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/url_check/request_filter.c:120:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[65536]; data/c-icap-modules-0.5.4/services/url_check/request_filter.c:139:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/url_check/request_filter.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 host[CI_MAXHOSTNAMELEN + 1]; data/c-icap-modules-0.5.4/services/url_check/request_filter.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 server_ip[64]; /*I think ipv6 address needs about 32 bytes*/ data/c-icap-modules-0.5.4/services/url_check/request_filter.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 site[CI_MAXHOSTNAMELEN + 1]; data/c-icap-modules-0.5.4/services/url_check/request_filter.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 raw_url[MAX_URL_SIZE]; /*The url*/ data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:61:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = dbenv->open(dbenv, home, DB_CREATE | DB_INIT_LOCK | DB_INIT_MPOOL|DB_THREAD /*| DB_SYSTEM_MEM*/, 0)) != 0){ data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:112:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = dbp->open( dbp, NULL, filename, NULL, data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:120:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = dbp->open( dbp, filename, NULL, data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:136: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-modules-0.5.4/services/url_check/sguardDB.c:435:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8192], *s; data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:441: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(file, "r+")) == NULL) { data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:481: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-modules-0.5.4/services/url_check/sguardDB.c:511: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[512]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:69: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 matched_dbs[_MATCHDB_SZ]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:71: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 last_subcat[_DB_NAME_SIZE]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:72: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 action_db[_DB_NAME_SIZE]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:565:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:609:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:670: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-modules-0.5.4/services/url_check/srv_url_check.c:1355:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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-modules-0.5.4/services/url_check/srv_url_check.c:1474: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], *e; data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1518:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_subcats[1024]; data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:108:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char CLAMAVLIB_VERSION[CLAMAVLIB_VERSION_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:110:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char CLAMAV_SIGNATURE[CLAMAV_SIGNATURE_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:632: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_version[64]; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:24: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 CLAMD_ADDR[CI_MAX_PATH]; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:62:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char CLAMD_VERSION[CLAMD_VERSION_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:64:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char CLAMD_SIGNATURE[CLAMD_SIGNATURE_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:146:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024], *s; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.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 buf[CI_MAX_PATH]; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:254: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-modules-0.5.4/services/virus_scan/clamd_mod.c:310: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], *s; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.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 resp[1024], *s, *f, *v, *filename; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:429: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_version[64]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:319:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data->engine, DEFAULT_ENGINES, AV_MAX_ENGINES * sizeof(av_engine_t *)); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:375:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:401:14: [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->engine, prof->engines, AV_MAX_ENGINES * sizeof(av_engine_t *)); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:782: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-modules-0.5.4/services/virus_scan/virus_scan.c:846: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-modules-0.5.4/services/virus_scan/virus_scan.c:899: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 head[1024]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:912: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(head, "X-Violations-Found: "); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:940:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char istag[SERVICE_ISTAG_SIZE + 1]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:942: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. unsigned char digest[16]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1089:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1155:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1199: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-modules-0.5.4/services/virus_scan/virus_scan.h:27: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 virus_name[AV_NAME_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.h:34: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 virus[AV_NAME_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.h:35: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[AV_NAME_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.h:61:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char url_log[LOG_URL_SIZE]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:50:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:346: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 url[1024]; data/c-icap-modules-0.5.4/services/content_filtering/filters.c:634: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). for (i = 0; i < strlen(replaceWithStr); ++i) { data/c-icap-modules-0.5.4/services/content_filtering/filters.c:698:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). e = line + strlen(line); data/c-icap-modules-0.5.4/services/content_filtering/profiles.c:186:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(actionEntry.header, header, sizeof(actionEntry.header)); data/c-icap-modules-0.5.4/services/content_filtering/profiles.c:195:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(actionEntry.template, ((template && template[0] != '\0') ? template : "BLOCK"), sizeof(actionEntry.template)); data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:212:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int domain_len=strlen(domain); data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:254: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). key.size = strlen(entry); data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:344: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). key.size = strlen(entry); data/c-icap-modules-0.5.4/services/url_check/sguardDB.c:371: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). key.size = strlen(entry); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:428:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(httpinf->raw_url, str, raw_url_len); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:821:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(match_info->matched_dbs); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:831: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(match_info->matched_dbs + len, db_name, _MATCHDB_SZ- len - 1); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:836:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(match_info->last_subcat, sub_cats, _DB_NAME_SIZE); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1103: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-modules-0.5.4/services/url_check/srv_url_check.c:1123: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 (strlen(s) != 0) { data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1336:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). match_info->match_length = strlen(http_info->url); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1403:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(db_data->path, argv[1], CI_MAX_PATH); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1495:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, vals[i], len); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1507:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str_cats, cmp.str, str_cats_size); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1583: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). len = strlen(http_info->url); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1605: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). match_info->match_length = strlen(s); data/c-icap-modules-0.5.4/services/url_check/srv_url_check.c:1824:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(match_info->action_db, db->name, _DB_NAME_SIZE); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:558:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(vinfo->virus_name, virname, AV_NAME_SIZE); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:586: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). daily_path = malloc(strlen(cl_retdbdir()) + 128); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:685: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). pos = strlen(pua_list); data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:691: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(argv[i]) + 1; data/c-icap-modules-0.5.4/services/virus_scan/clamav_mod.c:697: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). pos += strlen(argv[i]) + 1; data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:86:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(usa.sun_path, CLAMD_SOCKET_PATH, sizeof(usa.sun_path)); data/c-icap-modules-0.5.4/services/virus_scan/clamd_mod.c:268:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(CLAMD_ADDR, CLAMD_SOCKET_PATH, sizeof(CLAMD_ADDR)); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:713:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data->virus_info.virus_name, err, AV_NAME_SIZE); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:934: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_MD5Update(mdctx, (const unsigned char *)sig, (size_t)strlen(sig)); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1029:14: [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(data->url_log, "-"); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan.c:1184:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, str, s); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:65:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp_file_name = ci_buffer_alloc(strlen(data->requested_filename) + 1); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:66:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(url_decoder(data->requested_filename, temp_file_name, strlen(data->requested_filename) + 1)) data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:208: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). else namelen = strlen(filename); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:216:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abuf, filename, namelen); data/c-icap-modules-0.5.4/services/virus_scan/virus_scan_vir.c:250:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abuf, str, namelen); ANALYSIS SUMMARY: Hits = 118 Lines analyzed = 8772 in approximately 0.43 seconds (20523 lines/second) Physical Source Lines of Code (SLOC) = 6952 Hits@level = [0] 81 [1] 37 [2] 68 [3] 0 [4] 13 [5] 0 Hits@level+ = [0+] 199 [1+] 118 [2+] 81 [3+] 13 [4+] 13 [5+] 0 Hits/KSLOC@level+ = [0+] 28.6249 [1+] 16.9735 [2+] 11.6513 [3+] 1.86997 [4+] 1.86997 [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.