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/dotconf-1.3/examples/argdouble/argdouble.c Examining data/dotconf-1.3/examples/caseinsensitive/caseinsensitive.c Examining data/dotconf-1.3/examples/context/context.c Examining data/dotconf-1.3/examples/duplicates/duplicate.c Examining data/dotconf-1.3/examples/duplicates/first_module.c Examining data/dotconf-1.3/examples/duplicates/second_module.c Examining data/dotconf-1.3/examples/errorhandler/errorhandler.c Examining data/dotconf-1.3/examples/fallback/fallback.c Examining data/dotconf-1.3/examples/libpool/libpool.h Examining data/dotconf-1.3/examples/libpool/pool.c Examining data/dotconf-1.3/examples/modules/module.c Examining data/dotconf-1.3/examples/modules/my_module.c Examining data/dotconf-1.3/examples/noinline/noinline.c Examining data/dotconf-1.3/examples/simple/simple.c Examining data/dotconf-1.3/src/dotconf.h Examining data/dotconf-1.3/src/dotconf_priv.h Examining data/dotconf-1.3/src/readdir.c Examining data/dotconf-1.3/src/readdir.h Examining data/dotconf-1.3/src/dotconf.c FINAL RESULTS: data/dotconf-1.3/examples/duplicates/duplicate.c:134:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(context->current_end_token, "</%s", cmd->name + 1); data/dotconf-1.3/examples/duplicates/duplicate.c:151:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(context->current_end_token, "%s", old_end_token); data/dotconf-1.3/examples/duplicates/duplicate.c:215:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename, R_OK) == 0) { /* if file access is permitted */ data/dotconf-1.3/examples/duplicates/duplicate.c:270:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(begin_context_tag, "<%s>", cmd->data.list[0]); data/dotconf-1.3/examples/duplicates/duplicate.c:271:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(end_context_tag, "</%s>", cmd->data.list[0]); data/dotconf-1.3/examples/libpool/pool.c:30:9: [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. #define vsnprintf _vsnprintf data/dotconf-1.3/examples/libpool/pool.c:215:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cp, str); data/dotconf-1.3/examples/libpool/pool.c:228:2: [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(res, str); data/dotconf-1.3/examples/libpool/pool.c:251:2: [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(buffer, 8192, fmt, args); data/dotconf-1.3/examples/modules/module.c:107:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(filename, R_OK)) { /* if file access is permitted */ data/dotconf-1.3/src/dotconf.c:62: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/dotconf-1.3/src/dotconf.c:62: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/dotconf-1.3/src/dotconf.c:63:9: [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. #define vsnprintf _vsnprintf data/dotconf-1.3/src/dotconf.c:192:3: [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(msg, CFG_BUFSIZE, fmt, args); data/dotconf-1.3/src/dotconf.c:200:3: [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, fmt, args); data/dotconf-1.3/src/dotconf.c:310:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cp1 + length - 2, cp2); data/dotconf-1.3/src/dotconf.c:1132:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(new_path, "%s%s%s", path, data/dotconf-1.3/src/dotconf.c:1141:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(already_matched, data/dotconf-1.3/src/dotconf.c:1174:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(new_path, "%s%s", path, dirptr->d_name); data/dotconf-1.3/src/dotconf.c:1176: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. if (access(new_path, R_OK)) { data/dotconf-1.3/src/dotconf.c:1331:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(new_pre, new_ext); data/dotconf-1.3/src/dotconf.c:1333:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(new_path, "%s%s%s", path, data/dotconf-1.3/src/dotconf.c:1342:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(already_matched, data/dotconf-1.3/src/dotconf.c:1375:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(new_path, "%s%s", path, dirptr->d_name); data/dotconf-1.3/src/dotconf.c:1377: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. if (access(new_path, R_OK)) { data/dotconf-1.3/src/dotconf.c:1508:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename, R_OK)) { data/dotconf-1.3/src/readdir.c:94:1: [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(filespec, dir); data/dotconf-1.3/src/dotconf.c:164:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((env_value = getenv(env_name)) != NULL) { data/dotconf-1.3/src/dotconf.c:837:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dc_env = getenv(CFG_INCLUDEPATH_ENV); data/dotconf-1.3/src/dotconf.c:1537:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *env = getenv(CFG_INCLUDEPATH_ENV); data/dotconf-1.3/examples/duplicates/duplicate.c:19:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char current_end_token[1024]; data/dotconf-1.3/examples/duplicates/duplicate.c:202:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[FILENAME_MAX] = ""; data/dotconf-1.3/examples/libpool/pool.c:247:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; data/dotconf-1.3/examples/modules/module.c:101:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[128]; /* filename of modules */ data/dotconf-1.3/src/dotconf.c:74: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 name[CFG_MAX_OPTION + 1]; /* option name */ data/dotconf-1.3/src/dotconf.c:124:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char env_name[CFG_MAX_VALUE + 1]; data/dotconf-1.3/src/dotconf.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char env_default[CFG_MAX_VALUE + 1]; data/dotconf-1.3/src/dotconf.c:126:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp_value[CFG_MAX_VALUE + 1]; data/dotconf-1.3/src/dotconf.c:191: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 msg[CFG_BUFSIZE]; data/dotconf-1.3/src/dotconf.c:284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[CFG_BUFSIZE]; data/dotconf-1.3/src/dotconf.c:322:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[CFG_BUFSIZE]; data/dotconf-1.3/src/dotconf.c:324:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char here_limit[9]; /* max length for here-document delimiter: 8 */ data/dotconf-1.3/src/dotconf.c:379:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[CFG_MAX_VALUE]; data/dotconf-1.3/src/dotconf.c:729:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[CFG_BUFSIZE]; data/dotconf-1.3/src/dotconf.c:742:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[CFG_BUFSIZE]; data/dotconf-1.3/src/dotconf.c:798:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). new_cfg->stream = fopen(fname, "r"); data/dotconf-1.3/src/dotconf.c:1065:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_pre[CFG_MAX_FILENAME]; data/dotconf-1.3/src/dotconf.c:1066:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char already_matched[CFG_MAX_FILENAME]; data/dotconf-1.3/src/dotconf.c:1230:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_pre[CFG_MAX_FILENAME]; data/dotconf-1.3/src/dotconf.c:1231:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_ext[CFG_MAX_FILENAME]; data/dotconf-1.3/src/dotconf.c:1232:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char already_matched[CFG_MAX_FILENAME]; data/dotconf-1.3/src/readdir.c:102:1: [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(filespec, "/*"); data/dotconf-1.3/src/readdir.h:83:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */ data/dotconf-1.3/examples/duplicates/duplicate.c:62: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). (strlen(context->current_end_token) > data/dotconf-1.3/examples/duplicates/duplicate.c:259: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). (char *)malloc(strlen(cmd->data.list[1]) + 2 + 1); data/dotconf-1.3/examples/duplicates/duplicate.c:261: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). (char *)malloc(strlen(cmd->data.list[1]) + 3 + 1); data/dotconf-1.3/examples/duplicates/duplicate.c:294: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). for (opt_idx = 0; strlen(module_options[opt_idx].name); data/dotconf-1.3/examples/libpool/pool.c:204: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). size += strlen(str); data/dotconf-1.3/examples/libpool/pool.c:216: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). cp += strlen(str); data/dotconf-1.3/examples/libpool/pool.c:227: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). res = pool_alloc(pool, strlen(str) + 1); data/dotconf-1.3/examples/libpool/pool.c:238:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res, str, n); data/dotconf-1.3/src/dotconf.c:133: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). eob = cp1 + strlen(str) + 1; data/dotconf-1.3/src/dotconf.c:165:6: [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(cp2, env_value, eos - cp2); data/dotconf-1.3/src/dotconf.c:166: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). cp2 += strlen(env_value); data/dotconf-1.3/src/dotconf.c:168:6: [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(cp2, env_default, eos - cp2); data/dotconf-1.3/src/dotconf.c:169: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). cp2 += strlen(env_default); data/dotconf-1.3/src/dotconf.c:298: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). length = strlen(cp1); data/dotconf-1.3/src/dotconf.c:311: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). length = strlen(cp1); data/dotconf-1.3/src/dotconf.c:499: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). signed char *eob = args + strlen(args); data/dotconf-1.3/src/dotconf.c:643: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). eob = cp1 + strlen(cp1); data/dotconf-1.3/src/dotconf.c:864:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int wildcards_len = strlen(WILDCARDS); data/dotconf-1.3/src/dotconf.c:927: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). int len = strlen(filename); data/dotconf-1.3/src/dotconf.c:957:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*path, filename, tmp_count); data/dotconf-1.3/src/dotconf.c:960:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*pre, (tmp + (found_path ? 1 : 0)), data/dotconf-1.3/src/dotconf.c:987: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). int len_1 = strlen(s1); data/dotconf-1.3/src/dotconf.c:988: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). int len_2 = strlen(s2); data/dotconf-1.3/src/dotconf.c:1004: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). int dir_name_len = strlen(dir_name); data/dotconf-1.3/src/dotconf.c:1005: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 pre_len = strlen(pre); data/dotconf-1.3/src/dotconf.c:1006: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 ext_len = strlen(ext); data/dotconf-1.3/src/dotconf.c:1031: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). int dir_name_len = strlen(dir_name); data/dotconf-1.3/src/dotconf.c:1032: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 pre_len = strlen(pre); data/dotconf-1.3/src/dotconf.c:1033: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 ext_len = strlen(ext); data/dotconf-1.3/src/dotconf.c:1082: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). pre_len = strlen(pre); data/dotconf-1.3/src/dotconf.c:1091: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). name_len = strlen(dirptr->d_name); data/dotconf-1.3/src/dotconf.c:1093: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). strlen(path) + name_len + strlen(ext) + 1; data/dotconf-1.3/src/dotconf.c:1093: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(path) + name_len + strlen(ext) + 1; data/dotconf-1.3/src/dotconf.c:1123:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_pre, dirptr->d_name, data/dotconf-1.3/src/dotconf.c:1253: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). pre_len = strlen(pre); data/dotconf-1.3/src/dotconf.c:1269:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_ext, s_ext, t_ext_count); data/dotconf-1.3/src/dotconf.c:1281: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). name_len = strlen(dirptr->d_name); data/dotconf-1.3/src/dotconf.c:1283: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). strlen(path) + name_len + strlen(s_ext) + 1; data/dotconf-1.3/src/dotconf.c:1283: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(path) + name_len + strlen(s_ext) + 1; data/dotconf-1.3/src/dotconf.c:1328:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_pre, dirptr->d_name, data/dotconf-1.3/src/dotconf.c:1439:3: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(buf, "/"); data/dotconf-1.3/src/dotconf.c:1467: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). inclen = strlen(cmd->configfile->includepath); data/dotconf-1.3/src/dotconf.c:1469: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). (strlen(cmd->data.str) + inclen + 1)) == data/dotconf-1.3/src/readdir.c:92: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). filespec = malloc(strlen(dir) + 2 + 1); data/dotconf-1.3/src/readdir.c:96: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). index = strlen(filespec) - 1; data/dotconf-1.3/src/readdir.c:160:1: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME); data/dotconf-1.3/src/readdir.c:164: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). dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name); ANALYSIS SUMMARY: Hits = 100 Lines analyzed = 3382 in approximately 0.14 seconds (24227 lines/second) Physical Source Lines of Code (SLOC) = 2256 Hits@level = [0] 66 [1] 47 [2] 23 [3] 3 [4] 27 [5] 0 Hits@level+ = [0+] 166 [1+] 100 [2+] 53 [3+] 30 [4+] 27 [5+] 0 Hits/KSLOC@level+ = [0+] 73.5816 [1+] 44.3262 [2+] 23.4929 [3+] 13.2979 [4+] 11.9681 [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.