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/fusesmb-0.8.7/configfile.c Examining data/fusesmb-0.8.7/configfile.h Examining data/fusesmb-0.8.7/debug.h Examining data/fusesmb-0.8.7/hash.c Examining data/fusesmb-0.8.7/hash.h Examining data/fusesmb-0.8.7/smbctx.c Examining data/fusesmb-0.8.7/smbctx.h Examining data/fusesmb-0.8.7/stringlist.c Examining data/fusesmb-0.8.7/stringlist.h Examining data/fusesmb-0.8.7/cache.c Examining data/fusesmb-0.8.7/fusesmb.c FINAL RESULTS: data/fusesmb-0.8.7/fusesmb.c:865:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (ctx->chmod(ctx, smb_path, mode) < 0) data/fusesmb-0.8.7/cache.c:98:12: [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. pipe = popen(wg_cmd, "r"); data/fusesmb-0.8.7/cache.c:145: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(ip_cmd, buf); data/fusesmb-0.8.7/cache.c:155:12: [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. pipe = popen(ip_cmd, "r"); data/fusesmb-0.8.7/cache.c:187: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(ip, tmp); data/fusesmb-0.8.7/cache.c:235: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(tmp_path, ip); data/fusesmb-0.8.7/cache.c:239: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(tmp_path, sv); data/fusesmb-0.8.7/cache.c:301: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(temp_path, wg); data/fusesmb-0.8.7/cache.c:349: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(sv, sl_item(servers, i)); data/fusesmb-0.8.7/configfile.c:165: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(buf, section); data/fusesmb-0.8.7/configfile.c:183: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(cmp_section, section); data/fusesmb-0.8.7/configfile.c:185: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(cmp_key, key); data/fusesmb-0.8.7/configfile.c:304: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(cmp_section, section); data/fusesmb-0.8.7/fusesmb.c:176:21: [4] (shell) system: 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. system(fusesmb_cache_bin); data/fusesmb-0.8.7/fusesmb.c:181:17: [4] (shell) system: 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. system("fusesmb.cache"); data/fusesmb-0.8.7/fusesmb.c:318: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:360: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:532: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:556: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:625: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:716: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:765: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(smb_path, stripworkgroup(file)); data/fusesmb-0.8.7/fusesmb.c:783: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:802: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:838: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:862: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:893: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:939: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(smb_path, stripworkgroup(path)); data/fusesmb-0.8.7/fusesmb.c:940: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(new_smb_path, stripworkgroup(new_path)); data/fusesmb-0.8.7/fusesmb.c:1017:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, strerror(errno)); data/fusesmb-0.8.7/fusesmb.c:1022:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, strerror(errno)); data/fusesmb-0.8.7/fusesmb.c:1038:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, strerror(errno)); data/fusesmb-0.8.7/fusesmb.c:1045:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, strerror(errno)); data/fusesmb-0.8.7/smbctx.c:32: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(ipcmd, ip_server); data/fusesmb-0.8.7/smbctx.c:33:18: [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 *pipe = popen(ipcmd, "r"); data/fusesmb-0.8.7/smbctx.c:51: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(ip, tmp); data/fusesmb-0.8.7/smbctx.c:105: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(sv_section, server); data/fusesmb-0.8.7/smbctx.c:107: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(sv_section, share); data/fusesmb-0.8.7/smbctx.c:129: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(sv_section, server); data/fusesmb-0.8.7/smbctx.c:192: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(sv_section, sv); data/fusesmb-0.8.7/smbctx.c:194: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(sv_section, share); data/fusesmb-0.8.7/smbctx.c:212: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(sv_section, sv); data/fusesmb-0.8.7/stringlist.c:105: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(sl->lines[sl->numlines], str); data/fusesmb-0.8.7/cache.c:472:66: [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. snprintf(tmp_cachefile, 1024, "%s/.smb/fusesmb.cache.XXXXX", getenv("HOME")); data/fusesmb-0.8.7/cache.c:474:56: [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. snprintf(cachefile, 1024, "%s/.smb/fusesmb.cache", getenv("HOME")); data/fusesmb-0.8.7/cache.c:499:58: [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. snprintf(pidfile, 1024, "%s/.smb/fusesmb.cache.pid", getenv("HOME")); data/fusesmb-0.8.7/cache.c:502:56: [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. snprintf(configfile, 1024, "%s/.smb/fusesmb.conf", getenv("HOME")); data/fusesmb-0.8.7/fusesmb.c:166:60: [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. snprintf(cachefile, 1024, "%s/.smb/fusesmb.cache", getenv("HOME")); data/fusesmb-0.8.7/fusesmb.c:259:61: [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. snprintf(cache_file, 1024, "%s/.smb/fusesmb.cache", getenv("HOME")); data/fusesmb-0.8.7/fusesmb.c:397:61: [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. snprintf(cache_file, 1024, "%s/.smb/fusesmb.cache", getenv("HOME")); data/fusesmb-0.8.7/fusesmb.c:1011:44: [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. snprintf(cache_path, 1024, "%s/.smb/", getenv("HOME")); data/fusesmb-0.8.7/fusesmb.c:1033:56: [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. snprintf(configfile, 1024, "%s/.smb/fusesmb.conf", getenv("HOME")); data/fusesmb-0.8.7/cache.c:94: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 wg_cmd[512]; data/fusesmb-0.8.7/cache.c:106: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(ip_cmd, "nmblookup -A "); data/fusesmb-0.8.7/cache.c:116: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[4096]; data/fusesmb-0.8.7/cache.c:164: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 buf2[4096]; data/fusesmb-0.8.7/cache.c:165: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[4096]; data/fusesmb-0.8.7/cache.c:166: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 ip[32]; data/fusesmb-0.8.7/cache.c:232: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 tmp_path[MAXPATHLEN] = "smb://"; data/fusesmb-0.8.7/cache.c:263: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 tmp[len]; data/fusesmb-0.8.7/cache.c: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 temp_path[MAXPATHLEN] = "smb://"; data/fusesmb-0.8.7/cache.c:348: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 sv[1024] = "/"; data/fusesmb-0.8.7/cache.c:470: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 cachefile[1024]; data/fusesmb-0.8.7/cache.c:471: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 tmp_cachefile[1024]; data/fusesmb-0.8.7/cache.c:473:5: [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). mkstemp(tmp_cachefile); data/fusesmb-0.8.7/cache.c:477:16: [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 *fp = fopen(tmp_cachefile, "w"); data/fusesmb-0.8.7/cache.c:498: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 pidfile[1024]; data/fusesmb-0.8.7/cache.c:501: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 configfile[1024]; data/fusesmb-0.8.7/cache.c:521:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f=fopen(pidfile, "r"))) data/fusesmb-0.8.7/cache.c:563: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). FILE *fp = fopen(pidfile, "w"); data/fusesmb-0.8.7/configfile.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 buf[4096]; data/fusesmb-0.8.7/configfile.c:72:16: [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 *fp = fopen(cf->file, "r"); data/fusesmb-0.8.7/configfile.c:97:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char section_string[4096]; data/fusesmb-0.8.7/configfile.c:105:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_string[4096]; data/fusesmb-0.8.7/configfile.c:163: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[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:180: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 cmp_section[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:181: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 cmp_key[strlen(key)+2]; data/fusesmb-0.8.7/configfile.c:302: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 cmp_section[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:325:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/fusesmb-0.8.7/configfile.h:34: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 file[MAXPATHLEN+1]; data/fusesmb-0.8.7/fusesmb.c:85: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 fusesmb_cache_bin[MAXPATHLEN]; data/fusesmb-0.8.7/fusesmb.c:165: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 cachefile[1024]; data/fusesmb-0.8.7/fusesmb.c:250: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 smb_path[MY_MAXPATHLEN] = "smb:/", buf[MY_MAXPATHLEN], cache_file[1024]; data/fusesmb-0.8.7/fusesmb.c:265: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). fp = fopen(cache_file, "r"); data/fusesmb-0.8.7/fusesmb.c:359: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:378: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[MY_MAXPATHLEN], data/fusesmb-0.8.7/fusesmb.c:398: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). fp = fopen(cache_file, "r"); data/fusesmb-0.8.7/fusesmb.c:489: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 full_entry_path[MY_MAXPATHLEN]; data/fusesmb-0.8.7/fusesmb.c:523: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:535:21: [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). file = rwd_ctx->open(rwd_ctx, smb_path, fi->flags, 0); data/fusesmb-0.8.7/fusesmb.c:551: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:565:26: [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 ((file = rwd_ctx->open(rwd_ctx, smb_path, fi->flags, 0)) == NULL) data/fusesmb-0.8.7/fusesmb.c:623: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:634:34: [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 (NULL == (file = rwd_ctx->open(rwd_ctx, smb_path, fi->flags, 0))) data/fusesmb-0.8.7/fusesmb.c:704: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:760: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:778: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:797: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:834: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:861: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:888: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 smb_path[MY_MAXPATHLEN] = "smb:/"; data/fusesmb-0.8.7/fusesmb.c:933: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 smb_path[MY_MAXPATHLEN] = "smb:/", data/fusesmb-0.8.7/fusesmb.c:1010: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 cache_path[1024]; data/fusesmb-0.8.7/fusesmb.c:1032: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 configfile[1024]; data/fusesmb-0.8.7/fusesmb.c:1043: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). if (-1 == (fd = open(configfile, O_WRONLY | O_CREAT, 00600))) data/fusesmb-0.8.7/hash.c:853:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef char input_t[256]; data/fusesmb-0.8.7/hash.c:887:2: [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(new, str, sz); data/fusesmb-0.8.7/smbctx.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 ipcmd[1024] = "nmblookup -A "; data/fusesmb-0.8.7/smbctx.c:38: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 buf2[4096]; data/fusesmb-0.8.7/smbctx.c:39: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[4096]; data/fusesmb-0.8.7/smbctx.c:40: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 ip[32]; data/fusesmb-0.8.7/smbctx.c:104: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 sv_section[1024] = "/"; data/fusesmb-0.8.7/smbctx.c:177: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 sv[1024]; data/fusesmb-0.8.7/smbctx.c:191: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 sv_section[1024] = "/"; data/fusesmb-0.8.7/cache.c:107: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 ip_cmd_len = strlen(ip_cmd); data/fusesmb-0.8.7/cache.c:127: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). int len = strlen(buf); data/fusesmb-0.8.7/cache.c:149: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(ip_cmd) == 13) data/fusesmb-0.8.7/cache.c:181: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 (strncmp(buf2, "Looking up status of ", strlen("Looking up status of ")) == 0) data/fusesmb-0.8.7/cache.c:262: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). int len = strlen(wg)+ strlen(sv) + strlen(share_dirent->name) + 4; data/fusesmb-0.8.7/cache.c:262: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). int len = strlen(wg)+ strlen(sv) + strlen(share_dirent->name) + 4; data/fusesmb-0.8.7/cache.c:262: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). int len = strlen(wg)+ strlen(sv) + strlen(share_dirent->name) + 4; data/fusesmb-0.8.7/cache.c:476:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(022); data/fusesmb-0.8.7/cache.c:478:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/fusesmb-0.8.7/cache.c:562:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(077); data/fusesmb-0.8.7/cache.c:564:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/fusesmb-0.8.7/configfile.c:40: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). char *end = start + strlen(str) -1; data/fusesmb-0.8.7/configfile.c:56: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). char *end = start + strlen(str) -1; data/fusesmb-0.8.7/configfile.c:91:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = stripped_string + strlen(stripped_string) -1; data/fusesmb-0.8.7/configfile.c:138:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cf->file, file, MAXPATHLEN); data/fusesmb-0.8.7/configfile.c:163: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). char buf[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:164:5: [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/fusesmb-0.8.7/configfile.c:166:5: [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(buf, "]"); data/fusesmb-0.8.7/configfile.c:180: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 cmp_section[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:181: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). char cmp_key[strlen(key)+2]; data/fusesmb-0.8.7/configfile.c:182:5: [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(cmp_section, "["); data/fusesmb-0.8.7/configfile.c:184:5: [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(cmp_section, "]"); data/fusesmb-0.8.7/configfile.c:186:5: [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(cmp_key, "="); data/fusesmb-0.8.7/configfile.c:203:66: [1] (buffer) strlen: Does not handle 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 (0 == strncasecmp(sl_item(cf->lines, i), cmp_key, strlen(cmp_key))) data/fusesmb-0.8.7/configfile.c:209: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(retval)) data/fusesmb-0.8.7/configfile.c:289:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(start)) data/fusesmb-0.8.7/configfile.c:302: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 cmp_section[strlen(section)+3]; data/fusesmb-0.8.7/configfile.c:303:5: [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(cmp_section, "["); data/fusesmb-0.8.7/configfile.c:305:5: [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(cmp_section, "]"); data/fusesmb-0.8.7/configfile.c:326:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, sl_item(cf->lines, i), 4096); data/fusesmb-0.8.7/configfile.c:331:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buf)) data/fusesmb-0.8.7/fusesmb.c:217: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). unsigned int i = 0, ret = 0, goodpos = 0, file_len = strlen(file); data/fusesmb-0.8.7/fusesmb.c:238:47: [1] (buffer) strlen: Does not handle 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 i = 0, count = 0, file_len = strlen(file); data/fusesmb-0.8.7/fusesmb.c:261:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(path) == 1 && path[0] == '/') data/fusesmb-0.8.7/fusesmb.c:272:40: [1] (buffer) strlen: Does not handle 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 (strncmp(buf, path, strlen(path)) == 0 && data/fusesmb-0.8.7/fusesmb.c:273: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). (buf[strlen(path)] == '/' || buf[strlen(path)] == '\n')) data/fusesmb-0.8.7/fusesmb.c:273:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (buf[strlen(path)] == '/' || buf[strlen(path)] == '\n')) data/fusesmb-0.8.7/fusesmb.c:406:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(buf, path, strlen(path)) == 0 && data/fusesmb-0.8.7/fusesmb.c:407: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). (strlen(buf) > strlen(path))) data/fusesmb-0.8.7/fusesmb.c:407: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). (strlen(buf) > strlen(path))) data/fusesmb-0.8.7/fusesmb.c:410: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). if (buf[strlen(path)] == '/' || strlen(path) == 1) data/fusesmb-0.8.7/fusesmb.c:410: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 (buf[strlen(path)] == '/' || strlen(path) == 1) data/fusesmb-0.8.7/fusesmb.c:413: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). if (strlen(path) > 1) data/fusesmb-0.8.7/fusesmb.c:415: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). dir_entry = strtok(&buf[strlen(path) + 1], "/"); data/fusesmb-0.8.7/fusesmb.c:419:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (dir_entry[strlen(dir_entry)-2] == '$') data/fusesmb-0.8.7/fusesmb.c:453:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(last_dir_entry, dir_entry, 4096); data/fusesmb-0.8.7/fusesmb.c:602:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ssize = rwd_ctx->read(rwd_ctx, (SMBCFILE *)fi->fh, buf, size)) < 0) data/fusesmb-0.8.7/fusesmb.c:1079:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fusesmb_cache_bin, "fusesmb.cache", MAXPATHLEN-1); data/fusesmb-0.8.7/fusesmb.c:1084:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fusesmb_cache_bin, FUSESMB_CACHE_BINDIR"/fusesmb.cache", MAXPATHLEN-1); data/fusesmb-0.8.7/hash.c:884: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 sz = strlen(str) + 1; data/fusesmb-0.8.7/smbctx.c:45: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 (strncmp(buf2, "Looking up status of ", strlen("Looking up status of ")) == 0) data/fusesmb-0.8.7/smbctx.c:80:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(output, start, outputsize); data/fusesmb-0.8.7/smbctx.c:106:5: [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(sv_section, "/"); data/fusesmb-0.8.7/smbctx.c:118:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:119:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/smbctx.c:128:5: [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(sv_section, "/"); data/fusesmb-0.8.7/smbctx.c:137:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:138:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/smbctx.c:154:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:155:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/smbctx.c:193:5: [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(sv_section, "/"); data/fusesmb-0.8.7/smbctx.c:201:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:202:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/smbctx.c:211:5: [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(sv_section, "/"); data/fusesmb-0.8.7/smbctx.c:218:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:219:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/smbctx.c:232:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, un, unmaxlen); data/fusesmb-0.8.7/smbctx.c:233:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(password, pw, pwmaxlen); data/fusesmb-0.8.7/stringlist.c:100: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). sl->lines[sl->numlines] = (char *)malloc( (strlen(str)+1) * sizeof(char)); ANALYSIS SUMMARY: Hits = 183 Lines analyzed = 4139 in approximately 0.13 seconds (31521 lines/second) Physical Source Lines of Code (SLOC) = 2912 Hits@level = [0] 56 [1] 69 [2] 62 [3] 9 [4] 42 [5] 1 Hits@level+ = [0+] 239 [1+] 183 [2+] 114 [3+] 52 [4+] 43 [5+] 1 Hits/KSLOC@level+ = [0+] 82.0742 [1+] 62.8434 [2+] 39.1484 [3+] 17.8571 [4+] 14.7665 [5+] 0.343407 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.