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/smbnetfs-0.6.1/src/stat_workaround.h
Examining data/smbnetfs-0.6.1/src/stat_workaround.c
Examining data/smbnetfs-0.6.1/src/smbitem.h
Examining data/smbnetfs-0.6.1/src/smbitem.c
Examining data/smbnetfs-0.6.1/src/smb_conn_srv.h
Examining data/smbnetfs-0.6.1/src/smb_conn_srv.c
Examining data/smbnetfs-0.6.1/src/smb_conn_proto.h
Examining data/smbnetfs-0.6.1/src/smb_conn.h
Examining data/smbnetfs-0.6.1/src/smb_conn.c
Examining data/smbnetfs-0.6.1/src/samba.h
Examining data/smbnetfs-0.6.1/src/samba.c
Examining data/smbnetfs-0.6.1/src/reconfigure.h
Examining data/smbnetfs-0.6.1/src/process.h
Examining data/smbnetfs-0.6.1/src/process.c
Examining data/smbnetfs-0.6.1/src/neg_cache.h
Examining data/smbnetfs-0.6.1/src/neg_cache.c
Examining data/smbnetfs-0.6.1/src/main.c
Examining data/smbnetfs-0.6.1/src/list.h
Examining data/smbnetfs-0.6.1/src/function.h
Examining data/smbnetfs-0.6.1/src/function.c
Examining data/smbnetfs-0.6.1/src/event.h
Examining data/smbnetfs-0.6.1/src/event.c
Examining data/smbnetfs-0.6.1/src/common.h
Examining data/smbnetfs-0.6.1/src/common.c
Examining data/smbnetfs-0.6.1/src/charset.h
Examining data/smbnetfs-0.6.1/src/charset.c
Examining data/smbnetfs-0.6.1/src/auth.h
Examining data/smbnetfs-0.6.1/src/auth.c
Examining data/smbnetfs-0.6.1/src/auth-libsecret.h
Examining data/smbnetfs-0.6.1/src/auth-libsecret.c
Examining data/smbnetfs-0.6.1/src/reconfigure.c

FINAL RESULTS:

data/smbnetfs-0.6.1/src/auth-libsecret.c:93: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(info->domain,   domain);
data/smbnetfs-0.6.1/src/auth-libsecret.c:94:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(info->user,     user);
data/smbnetfs-0.6.1/src/auth-libsecret.c:95:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(info->password, password);
data/smbnetfs-0.6.1/src/auth.c:54: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(info->domain,   domain);
data/smbnetfs-0.6.1/src/auth.c:55: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(info->user,     user);
data/smbnetfs-0.6.1/src/auth.c:56: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(info->password, password);
data/smbnetfs-0.6.1/src/auth.c:130:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(item->name, name);
data/smbnetfs-0.6.1/src/charset.c:126: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(dst, smb_prefix);
data/smbnetfs-0.6.1/src/common.h:25:62:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void common_debug_print(const char *fmt, ...) ATTRIB((format(printf, 1, 2)));
data/smbnetfs-0.6.1/src/reconfigure.c:81: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(config_dir, path);
data/smbnetfs-0.6.1/src/reconfigure.c:123: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(buf, home);
data/smbnetfs-0.6.1/src/reconfigure.c:124: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, (home[strlen(home) - 1] == '/') ? dir + 1 : dir);
data/smbnetfs-0.6.1/src/reconfigure.c:407: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(config_file, name);
data/smbnetfs-0.6.1/src/reconfigure.c:545:2:  [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(link, name);
data/smbnetfs-0.6.1/src/reconfigure.c:578: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(tmp, config_dir);
data/smbnetfs-0.6.1/src/reconfigure.c:579:2:  [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, filename);
data/smbnetfs-0.6.1/src/reconfigure.c:606:2:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	fscanf(file, pattern, s);
data/smbnetfs-0.6.1/src/samba.c:112:8:  [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.
	ret = snprintf(pos, len, ptn, ctx->name, ctx->ref_count);
data/smbnetfs-0.6.1/src/smb_conn.c:625: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(file->url, url);
data/smbnetfs-0.6.1/src/smb_conn.c:672: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(file->url, url);
data/smbnetfs-0.6.1/src/smb_conn.c:883: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(file->url, url);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:37:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, (size_t) bytes, fmt, ap);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:47:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1021: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(pos->d_name, name);
data/smbnetfs-0.6.1/src/smb_conn_srv.h:31:42:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				const char *fmt, ...) ATTRIB((format(printf, 6, 7)));
data/smbnetfs-0.6.1/src/smb_conn_srv.h:73: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, "srv(%d)->%s: " fmt, getpid(), __FUNCTION__, ## args); fflush(stderr); \
data/smbnetfs-0.6.1/src/smb_conn_srv.h:77: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, "srv(%d)->%s: " fmt, getpid(), __FUNCTION__, ## args); fflush(stderr); \
data/smbnetfs-0.6.1/src/smbitem.c:25:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(item->name, name);
data/smbnetfs-0.6.1/src/smbitem.c:41:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(item->name, name);
data/smbnetfs-0.6.1/src/smbitem.c:57:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(item->name, name);
data/smbnetfs-0.6.1/src/smbitem.c:61:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(item->linkpath, linkpath);
data/smbnetfs-0.6.1/src/stat_workaround.c:89: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(workaround->name, name);
data/smbnetfs-0.6.1/src/reconfigure.c:102:12:  [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.
    user = getenv("USER");
data/smbnetfs-0.6.1/src/reconfigure.c:103:51:  [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 ((user == NULL) || (*user == '\0')) user = getenv("LOGNAME");
data/smbnetfs-0.6.1/src/reconfigure.c:113:12:  [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.
    home = getenv("HOME");
data/smbnetfs-0.6.1/src/auth.c:23: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		auth_login[64]		= "guest";
data/smbnetfs-0.6.1/src/charset.c:7: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	charset_buf[CHARSET_BUF_SIZE];
data/smbnetfs-0.6.1/src/common.c:17: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		common_logfile[256]	= "";
data/smbnetfs-0.6.1/src/common.c:48:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    common_logfd[1] = open(common_logfile, O_WRONLY | O_APPEND | O_CREAT, 0644);
data/smbnetfs-0.6.1/src/common.h:36: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 __tstamp[20]; \
data/smbnetfs-0.6.1/src/event.c:125: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], name[256], link[256];
data/smbnetfs-0.6.1/src/event.c:159:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		buf[4096];
data/smbnetfs-0.6.1/src/function.c:243: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				readdir_buf[4096];
data/smbnetfs-0.6.1/src/function.c:244: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				name[1024];
data/smbnetfs-0.6.1/src/function.c:245: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				link[1024];
data/smbnetfs-0.6.1/src/function.c:347:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		buf[2048];
data/smbnetfs-0.6.1/src/neg_cache.c:15:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		hostname[1];
data/smbnetfs-0.6.1/src/process.c:26: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	process_system_charset[CHARSET_LEN]		= "UTF-8";
data/smbnetfs-0.6.1/src/process.c:27: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	process_server_local_charset[CHARSET_LEN]	= "UTF-8";
data/smbnetfs-0.6.1/src/process.c:28: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	process_server_samba_charset[CHARSET_LEN]	= "UTF-8";
data/smbnetfs-0.6.1/src/reconfigure.c:36: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		config_file[256]	= "smbnetfs.conf";
data/smbnetfs-0.6.1/src/reconfigure.c:37: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		config_dir[2048]	= "/";
data/smbnetfs-0.6.1/src/reconfigure.c:96:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char			buf[2048];
data/smbnetfs-0.6.1/src/reconfigure.c:376: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	*pos, *name, path[2048];
data/smbnetfs-0.6.1/src/reconfigure.c:544:2:  [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(link, "../");
data/smbnetfs-0.6.1/src/reconfigure.c:563:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	s[LINE_SIZE];
data/smbnetfs-0.6.1/src/reconfigure.c:564: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	pattern[PATTERN_SIZE];
data/smbnetfs-0.6.1/src/reconfigure.c:565: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	fields[FIELD_MAX][LINE_SIZE], *arg[FIELD_MAX];
data/smbnetfs-0.6.1/src/reconfigure.c:590:17:  [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 ((file = fopen(filename, "r")) == NULL){
data/smbnetfs-0.6.1/src/samba.c:17:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		name[128];
data/smbnetfs-0.6.1/src/samba.c:96:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char		buffer[4096];
data/smbnetfs-0.6.1/src/samba.c:124: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(buffer + sizeof(buffer) - 5, "...)");
data/smbnetfs-0.6.1/src/smb_conn.c:222: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				workgroup[256];
data/smbnetfs-0.6.1/src/smb_conn.c:347: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[COMM_BUF_SIZE];
data/smbnetfs-0.6.1/src/smb_conn.c:441:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	if (reply_len != 0) memcpy(reply, reply_hdr + 1, reply_len);
data/smbnetfs-0.6.1/src/smb_conn.c:544:30:  [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).
		struct smb_conn_open_query	open;
data/smbnetfs-0.6.1/src/smb_conn.c:552:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    fd_len = sizeof(fd_query.open);
data/smbnetfs-0.6.1/src/smb_conn.c:554:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    fd_query.open.url_offs = sizeof(fd_query.open);
data/smbnetfs-0.6.1/src/smb_conn.c:554:48:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    fd_query.open.url_offs = sizeof(fd_query.open);
data/smbnetfs-0.6.1/src/smb_conn.c:555:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    fd_query.open.mode     = 0664;
data/smbnetfs-0.6.1/src/smb_conn.c:556:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    fd_query.open.flags    = file->reopen_flags & (~(O_CREAT | O_TRUNC));
data/smbnetfs-0.6.1/src/smb_conn.c:729:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(buf, ctx->shmem_ptr, reply.bufsize);
data/smbnetfs-0.6.1/src/smb_conn.c:766: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(ctx->shmem_ptr, buf, bufsize);
data/smbnetfs-0.6.1/src/smb_conn.c:1008:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(buf, ctx->shmem_ptr, reply.bufsize);
data/smbnetfs-0.6.1/src/smb_conn.c:1082:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(st, &reply.stat, sizeof(struct stat));
data/smbnetfs-0.6.1/src/smb_conn.c:1119:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(st, &reply.stat, sizeof(struct stat));
data/smbnetfs-0.6.1/src/smb_conn.c:1186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&query.tbuf, tbuf, 2 * sizeof(struct timeval));
data/smbnetfs-0.6.1/src/smb_conn.c:1221:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->shmem_ptr, value, size);
data/smbnetfs-0.6.1/src/smb_conn.c:1263:4:  [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(value, ctx->shmem_ptr, reply.bufsize);
data/smbnetfs-0.6.1/src/smb_conn.c:1303:4:  [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(list, ctx->shmem_ptr, reply.bufsize);
data/smbnetfs-0.6.1/src/smb_conn_proto.h:54:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char			d_name[MAX_FILENAME_LEN + 1];
data/smbnetfs-0.6.1/src/smb_conn_srv.c:24:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char			buf[COMM_BUF_SIZE];
data/smbnetfs-0.6.1/src/smb_conn_srv.c:59:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char			buf[COMM_BUF_SIZE];
data/smbnetfs-0.6.1/src/smb_conn_srv.c:60:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char			charset_buf[CHARSET_BUF_SIZE];
data/smbnetfs-0.6.1/src/smb_conn_srv.c:187:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char				buf[COMM_BUF_SIZE];
data/smbnetfs-0.6.1/src/smbitem.c:482:6:  [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(dir->childs, dir_user->childs,
data/smbnetfs-0.6.1/src/stat_workaround.c:24: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	name[1];	// name to be workarounded
data/smbnetfs-0.6.1/src/stat_workaround.c:32: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	path[1];	// exception path
data/smbnetfs-0.6.1/src/auth-libsecret.c:86: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).
                   strlen(domain) + strlen(user) + strlen(password) + 3);
data/smbnetfs-0.6.1/src/auth-libsecret.c:86: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).
                   strlen(domain) + strlen(user) + strlen(password) + 3);
data/smbnetfs-0.6.1/src/auth-libsecret.c:86: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).
                   strlen(domain) + strlen(user) + strlen(password) + 3);
data/smbnetfs-0.6.1/src/auth-libsecret.c:90: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).
    info->user     = info->domain + strlen(domain) + 1;
data/smbnetfs-0.6.1/src/auth-libsecret.c:91: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).
    info->password = info->user + strlen(user) + 1;
data/smbnetfs-0.6.1/src/auth.c:32:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(auth_login, name, sizeof(auth_login));
data/smbnetfs-0.6.1/src/auth.c:46:3:  [1] (buffer) strlen:
  Does not handle 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(domain) + strlen(user) + strlen(password) + 3;
data/smbnetfs-0.6.1/src/auth.c:46: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).
		strlen(domain) + strlen(user) + strlen(password) + 3;
data/smbnetfs-0.6.1/src/auth.c:46: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(domain) + strlen(user) + strlen(password) + 3;
data/smbnetfs-0.6.1/src/auth.c:51: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).
    info->user     = info->domain + strlen(domain) + 1;
data/smbnetfs-0.6.1/src/auth.c:52: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).
    info->password = info->user + strlen(user) + 1;
data/smbnetfs-0.6.1/src/auth.c:125:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    item = malloc(sizeof(struct authitem) + strlen(name) + 1);
data/smbnetfs-0.6.1/src/charset.c:129: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).
			src, strlen(src),
data/smbnetfs-0.6.1/src/charset.c:140: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).
			src, strlen(src),
data/smbnetfs-0.6.1/src/common.c:45:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(common_logfile, logfile, sizeof(common_logfile) - 1);
data/smbnetfs-0.6.1/src/function.c:71:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return (strncmp(name, xattr_name, strlen(xattr_name)) == 0);
data/smbnetfs-0.6.1/src/function.c:279:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    if ((rec->d_name[strlen(rec->d_name) - 1] == '$') &&
data/smbnetfs-0.6.1/src/function.c:380: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).
	    len = strlen(buf);
data/smbnetfs-0.6.1/src/main.c:145: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(value) == 0) return 1;
data/smbnetfs-0.6.1/src/neg_cache.c:136:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cache->hostname, url, len);
data/smbnetfs-0.6.1/src/process.c:50:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(process_system_charset, charset, CHARSET_LEN);
data/smbnetfs-0.6.1/src/process.c:55:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(process_server_local_charset, process_system_charset, CHARSET_LEN);
data/smbnetfs-0.6.1/src/process.c:57:5:  [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(process_server_samba_charset, "UTF-8", CHARSET_LEN);
data/smbnetfs-0.6.1/src/process.c:103:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(process_server_local_charset, charset, CHARSET_LEN);
data/smbnetfs-0.6.1/src/process.c:114:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(process_server_samba_charset, charset, CHARSET_LEN);
data/smbnetfs-0.6.1/src/reconfigure.c:77: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(path) + 2 > sizeof(config_dir)){
data/smbnetfs-0.6.1/src/reconfigure.c:82: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).
    if (path[strlen(path) - 1] != '/') strcat(config_dir, "/");
data/smbnetfs-0.6.1/src/reconfigure.c:82:40:  [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.
    if (path[strlen(path) - 1] != '/') strcat(config_dir, "/");
data/smbnetfs-0.6.1/src/reconfigure.c:122: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(home) + strlen(dir) + 1 > sizeof(buf)) home = "/";
data/smbnetfs-0.6.1/src/reconfigure.c:122:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(home) + strlen(dir) + 1 > sizeof(buf)) home = "/";
data/smbnetfs-0.6.1/src/reconfigure.c:124:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strcat(buf, (home[strlen(home) - 1] == '/') ? dir + 1 : dir);
data/smbnetfs-0.6.1/src/reconfigure.c:384: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).
	    len = strlen(path);
data/smbnetfs-0.6.1/src/reconfigure.c:387:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(path, "/");
data/smbnetfs-0.6.1/src/reconfigure.c:396: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(path, name, pos - name);
data/smbnetfs-0.6.1/src/reconfigure.c:402:6:  [1] (buffer) strlen:
  Does not handle 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  > sizeof(config_dir))  goto error;
data/smbnetfs-0.6.1/src/reconfigure.c:406:6:  [1] (buffer) strlen:
  Does not handle 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(name) + 1 > sizeof(config_file)) goto error;
data/smbnetfs-0.6.1/src/reconfigure.c:474:8:  [1] (buffer) strlen:
  Does not handle 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(case_ptn);
data/smbnetfs-0.6.1/src/reconfigure.c:480:8:  [1] (buffer) strlen:
  Does not handle 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(depth_ptn);
data/smbnetfs-0.6.1/src/reconfigure.c:505:8:  [1] (buffer) strlen:
  Does not handle 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(group_ptn);
data/smbnetfs-0.6.1/src/reconfigure.c:512:8:  [1] (buffer) strlen:
  Does not handle 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(visible_ptn);
data/smbnetfs-0.6.1/src/reconfigure.c:541: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	*link = malloc(strlen(name) + 4);
data/smbnetfs-0.6.1/src/reconfigure.c:576: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).
	char *tmp = malloc(strlen(config_dir) + strlen(filename) + 1);
data/smbnetfs-0.6.1/src/reconfigure.c:576:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *tmp = malloc(strlen(config_dir) + strlen(filename) + 1);
data/smbnetfs-0.6.1/src/samba.c:44:18:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    if (len > 0) strncpy(ctx->name, name, len);
data/smbnetfs-0.6.1/src/smb_conn.c:191:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[2].iov_len  = strlen(domain) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:193:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[3].iov_len  = strlen(user) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:195:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[4].iov_len  = strlen(password) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:331: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).
	iov[iov_cnt].iov_len  = strlen(str) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:363:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(ctx->conn_fd, buf, COMM_BUF_SIZE);
data/smbnetfs-0.6.1/src/smb_conn.c:391:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (bytes != (ssize_t) (strlen(msg) + 1)) goto error;
data/smbnetfs-0.6.1/src/smb_conn.c:425:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (bytes != (ssize_t) (strlen(server) + strlen(share) + 2))
data/smbnetfs-0.6.1/src/smb_conn.c:425: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).
	    if (bytes != (ssize_t) (strlen(server) + strlen(share) + 2))
data/smbnetfs-0.6.1/src/smb_conn.c:612:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    file = malloc(sizeof(struct smb_conn_file) + strlen(url) + 1);
data/smbnetfs-0.6.1/src/smb_conn.c:659:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    file = malloc(sizeof(struct smb_conn_file) + strlen(url) + 1);
data/smbnetfs-0.6.1/src/smb_conn.c:845:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    query.new_url_offs = sizeof(struct smb_conn_rename_query) + strlen(old_url) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:870:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    file = malloc(sizeof(struct smb_conn_file) + strlen(url) + 1);
data/smbnetfs-0.6.1/src/smb_conn.c:1215:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    query.name_offs = sizeof(struct smb_conn_setxattr_query) + strlen(url) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:1250:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    query.name_offs = sizeof(struct smb_conn_getxattr_query) + strlen(url) + 1;
data/smbnetfs-0.6.1/src/smb_conn.c:1324:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    query.name_offs = sizeof(struct smb_conn_removexattr_query) + strlen(url) + 1;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:88:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[2].iov_len  = strlen(server) + 1;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:90:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[3].iov_len  = strlen(share) + 1;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:119:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes = read(srv_ctx->conn_fd, buf, COMM_BUF_SIZE);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:145:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (bytes != (ssize_t) (strlen(domain) + strlen(username) +
data/smbnetfs-0.6.1/src/smb_conn_srv.c:145: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).
    if (bytes != (ssize_t) (strlen(domain) + strlen(username) +
data/smbnetfs-0.6.1/src/smb_conn_srv.c:146:4:  [1] (buffer) strlen:
  Does not handle 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(password) + 3)) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:149:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(wrkgrp, domain, wrkgrplen);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:152:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(user,   username, userlen); user[userlen - 1] = '\0';
data/smbnetfs-0.6.1/src/smb_conn_srv.c:153:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(passwd, password, passwdlen); passwd[passwdlen - 1] = '\0';
data/smbnetfs-0.6.1/src/smb_conn_srv.c:223:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	query_len = read(ctx->conn_fd, buf, COMM_BUF_SIZE);
data/smbnetfs-0.6.1/src/smb_conn_srv.c:372:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iov[2].iov_len  = strlen(msg) + 1;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:402:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (query_len != sizeof(struct smb_conn_open_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:461:63:  [1] (buffer) strlen:
  Does not handle 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 (query_len != sizeof(struct smb_conn_url_mode_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:643: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).
    if (query_len != sizeof(struct smb_conn_url_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:733:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (new_url != old_url + strlen(old_url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:735:4:  [1] (buffer) strlen:
  Does not handle 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(old_url) + strlen(new_url) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:735: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).
			strlen(old_url) + strlen(new_url) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:925: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).
    if (query_len != sizeof(struct smb_conn_url_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1015:6:  [1] (buffer) strlen:
  Does not handle 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(name) + 1 > sizeof(pos->d_name)){
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1045:63:  [1] (buffer) strlen:
  Does not handle 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 (query_len != sizeof(struct smb_conn_url_mode_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1084: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).
    if (query_len != sizeof(struct smb_conn_url_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1125: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).
    if (query_len != sizeof(struct smb_conn_url_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1237:63:  [1] (buffer) strlen:
  Does not handle 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 (query_len != sizeof(struct smb_conn_url_mode_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1275: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).
    if (query_len != sizeof(struct smb_conn_utimes_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1314:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (name != url + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1316:4:  [1] (buffer) strlen:
  Does not handle 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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1316: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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1363:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (name != url + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1365:4:  [1] (buffer) strlen:
  Does not handle 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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1365: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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1408:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (query_len != sizeof(struct smb_conn_listxattr_query) + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1453:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (name != url + strlen(url) + 1) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1455:4:  [1] (buffer) strlen:
  Does not handle 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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smb_conn_srv.c:1455: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(url) + strlen(name) + 2) goto error;
data/smbnetfs-0.6.1/src/smbitem.c:19: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).
    item = malloc(sizeof(struct smbitem) + strlen(name) + 1);
data/smbnetfs-0.6.1/src/smbitem.c:35: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).
    item = malloc(sizeof(struct smbitem) + strlen(name) + 1);
data/smbnetfs-0.6.1/src/smbitem.c:51:2:  [1] (buffer) strlen:
  Does not handle 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(name) + strlen(linkpath) + 2);
data/smbnetfs-0.6.1/src/smbitem.c:51: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).
	strlen(name) + strlen(linkpath) + 2);
data/smbnetfs-0.6.1/src/smbitem.c:60: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).
    item->linkpath = item->name + strlen(name) + 1;
data/smbnetfs-0.6.1/src/smbitem.c:149:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return smbitem_find_in_group_wl(group, name, strlen(name), first);
data/smbnetfs-0.6.1/src/smbitem.c:537: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).
    return (next != NULL) ? next : path + strlen(path);
data/smbnetfs-0.6.1/src/smbitem.c:660:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, dir->childs[pos]->linkpath, size);
data/smbnetfs-0.6.1/src/smbitem.c:700:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, item->name, size);
data/smbnetfs-0.6.1/src/stat_workaround.c:85: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).
    workaround = malloc(sizeof(struct stat_workaround) + strlen(name));
data/smbnetfs-0.6.1/src/stat_workaround.c:88:60:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memset(workaround, 0, sizeof(struct stat_workaround) + strlen(name));
data/smbnetfs-0.6.1/src/stat_workaround.c:90:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    workaround->len = strlen(name);
data/smbnetfs-0.6.1/src/stat_workaround.c:131:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(exception->path, path, len);
data/smbnetfs-0.6.1/src/stat_workaround.c:248:8:  [1] (buffer) strlen:
  Does not handle 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(workaround->name);
data/smbnetfs-0.6.1/src/stat_workaround.c:275: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).
    for(len = strlen(path); (len > 1) && (path[len - 1] == '/'); len--);

ANALYSIS SUMMARY:

Hits = 196
Lines analyzed = 8562 in approximately 0.22 seconds (39587 lines/second)
Physical Source Lines of Code (SLOC) = 6984
Hits@level = [0]  23 [1] 108 [2]  53 [3]   3 [4]  32 [5]   0
Hits@level+ = [0+] 219 [1+] 196 [2+]  88 [3+]  35 [4+]  32 [5+]   0
Hits/KSLOC@level+ = [0+] 31.3574 [1+] 28.0641 [2+] 12.6002 [3+] 5.01145 [4+] 4.5819 [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.