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/mysecureshell-2.0/SftpState/Main.c
Examining data/mysecureshell-2.0/SftpAdmin/Main.c
Examining data/mysecureshell-2.0/SftpServer/SftpServer.h
Examining data/mysecureshell-2.0/SftpServer/FileSystemAcl.c
Examining data/mysecureshell-2.0/SftpServer/Encoding.c
Examining data/mysecureshell-2.0/SftpServer/Send.h
Examining data/mysecureshell-2.0/SftpServer/SftpWho.h
Examining data/mysecureshell-2.0/SftpServer/FileSystem.c
Examining data/mysecureshell-2.0/SftpServer/Util.h
Examining data/mysecureshell-2.0/SftpServer/SftpExt.h
Examining data/mysecureshell-2.0/SftpServer/Handle.h
Examining data/mysecureshell-2.0/SftpServer/Send.c
Examining data/mysecureshell-2.0/SftpServer/Global.h
Examining data/mysecureshell-2.0/SftpServer/FileSystemAcl.h
Examining data/mysecureshell-2.0/SftpServer/SftpExt.c
Examining data/mysecureshell-2.0/SftpServer/FileSystem.h
Examining data/mysecureshell-2.0/SftpServer/Admin.c
Examining data/mysecureshell-2.0/SftpServer/Access.h
Examining data/mysecureshell-2.0/SftpServer/Encode.c
Examining data/mysecureshell-2.0/SftpServer/Log.c
Examining data/mysecureshell-2.0/SftpServer/GetUsersInfos.h
Examining data/mysecureshell-2.0/SftpServer/Admin.h
Examining data/mysecureshell-2.0/SftpServer/GetUsersInfos.c
Examining data/mysecureshell-2.0/SftpServer/SftpWho.c
Examining data/mysecureshell-2.0/SftpServer/Sftp.h
Examining data/mysecureshell-2.0/SftpServer/Util.c
Examining data/mysecureshell-2.0/SftpServer/Log.h
Examining data/mysecureshell-2.0/SftpServer/Buffer.h
Examining data/mysecureshell-2.0/SftpServer/Stats.c
Examining data/mysecureshell-2.0/SftpServer/Handle.c
Examining data/mysecureshell-2.0/SftpServer/Encode.h
Examining data/mysecureshell-2.0/SftpServer/Buffer.c
Examining data/mysecureshell-2.0/SftpServer/SftpServer.c
Examining data/mysecureshell-2.0/SftpServer/Sftp.c
Examining data/mysecureshell-2.0/SftpServer/Access.c
Examining data/mysecureshell-2.0/SftpServer/Stats.h
Examining data/mysecureshell-2.0/SftpServer/Defines.h
Examining data/mysecureshell-2.0/SftpServer/Encoding.h
Examining data/mysecureshell-2.0/Core/hash.c
Examining data/mysecureshell-2.0/Core/parsing.c
Examining data/mysecureshell-2.0/Core/ip.h
Examining data/mysecureshell-2.0/Core/string.h
Examining data/mysecureshell-2.0/Core/convert.c
Examining data/mysecureshell-2.0/Core/ip.c
Examining data/mysecureshell-2.0/Core/FileSpec.h
Examining data/mysecureshell-2.0/Core/prog.c
Examining data/mysecureshell-2.0/Core/string.c
Examining data/mysecureshell-2.0/Core/prog.h
Examining data/mysecureshell-2.0/Core/FileSpec.c
Examining data/mysecureshell-2.0/Core/user.h
Examining data/mysecureshell-2.0/Core/hash.h
Examining data/mysecureshell-2.0/Core/security.h
Examining data/mysecureshell-2.0/Core/user.c
Examining data/mysecureshell-2.0/Core/conf.h
Examining data/mysecureshell-2.0/Core/conf.c
Examining data/mysecureshell-2.0/Core/main.c
Examining data/mysecureshell-2.0/Core/parsing.h
Examining data/mysecureshell-2.0/SftpWho/Main.c

FINAL RESULTS:

data/mysecureshell-2.0/SftpServer/FileSystem.c:556:8:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	len = readlink(path->realPath, readLink, sizeofReadLink);
data/mysecureshell-2.0/SftpServer/Sftp.c:639:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			if (chmod(resolvedPath->realPath, a->perm) == -1)
data/mysecureshell-2.0/SftpServer/Sftp.c:650:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if (chown(resolvedPath->realPath, a->uid, a->gid) == -1)
data/mysecureshell-2.0/SftpServer/SftpServer.c:144:12:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		else if (chown(gl_var->home, uid, gid) == -1)
data/mysecureshell-2.0/Core/main.c:50:10:  [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) printf("\n\nOptions:\n  ACL support: "
data/mysecureshell-2.0/Core/main.c:410:7:  [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(cmd, av[i]);
data/mysecureshell-2.0/Core/main.c:415:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
					strcat(envVar, cmd);
data/mysecureshell-2.0/SftpAdmin/Main.c:66:11:  [4] (shell) execvp:
  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.
      if (execvp(args[0], args) == -1)
data/mysecureshell-2.0/SftpServer/Defines.h:23:34:  [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).
#define STRCAT(_DST, _SRC, _LEN)	strcat(_DST, _SRC)
data/mysecureshell-2.0/SftpServer/Defines.h:29:34:  [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).
#define STRCPY(_DST, _SRC, _LEN)	strcpy(_DST, _SRC)
data/mysecureshell-2.0/SftpServer/Log.c:206:16:  [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.
			if ((size = vsnprintf(buffer, sizeof(buffer), fmt, ap)) > 0)
data/mysecureshell-2.0/SftpServer/Util.c:190:25:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
int FlagsFromAccess(int access)
data/mysecureshell-2.0/SftpServer/Util.c:194:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (HAS_BIT(access, SSH5_ACE4_READ_DATA))
data/mysecureshell-2.0/SftpServer/Util.c:196:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (HAS_BIT(access, SSH5_ACE4_WRITE_DATA))
data/mysecureshell-2.0/SftpServer/Util.c:201:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	else if (HAS_BIT(access, SSH5_ACE4_WRITE_DATA))
data/mysecureshell-2.0/SftpServer/Util.c:203:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (HAS_BIT(access, SSH5_ACE4_APPEND_DATA))
data/mysecureshell-2.0/SftpServer/Util.c:205:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (HAS_BIT(access, SSH5_ACE4_SYNCHRONIZE))
data/mysecureshell-2.0/SftpServer/Util.c:291:10:  [4] (shell) execv:
  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.
		(void) execv(args[0], args);
data/mysecureshell-2.0/SftpServer/Util.h:31:25:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
int	FlagsFromAccess(int access);
data/mysecureshell-2.0/SftpState/Main.c:62:9:  [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.
		  if (system("sftp-kill all > /dev/null") == -1)
data/mysecureshell-2.0/Core/convert.c:75:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
				if ((env_var = getenv(env_str)))
data/mysecureshell-2.0/Core/ip.c:43:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((env = getenv("SSH_CONNECTION")) != NULL)
data/mysecureshell-2.0/Core/ip.c:70:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((env = getenv("SSH_CONNECTION")) != NULL)
data/mysecureshell-2.0/Core/ip.c:91: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.
	if ((ip = getenv("SSH_CONNECTION")) != NULL)
data/mysecureshell-2.0/Core/ip.c:115: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.
	if ((ip = getenv("SSH_CONNECTION")) != NULL)
data/mysecureshell-2.0/Core/FileSpec.c:117:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char buffer[256];
data/mysecureshell-2.0/Core/FileSpec.c:161: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(new, next, sizeof(tFileSpec));
data/mysecureshell-2.0/Core/conf.c:146:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char bTmp[256];
data/mysecureshell-2.0/Core/conf.c:174: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.
				ptr = (char *) hash_get(confParams[i].name);
data/mysecureshell-2.0/Core/conf.c:181: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.
				ptr = (char *) hash_get(confParams[i].name);
data/mysecureshell-2.0/Core/conf.c:233:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[1024];
data/mysecureshell-2.0/Core/conf.c:244:12:  [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 ((fh = fopen(file, "r")))
data/mysecureshell-2.0/Core/conf.c:315: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 bTmp[256];
data/mysecureshell-2.0/Core/conf.c:342:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				hash_set_int(tb[0], atoi(tb[1]));
data/mysecureshell-2.0/Core/ip.c:102:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				port = atoi(portClient);
data/mysecureshell-2.0/Core/ip.c:120:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			port = atoi(ip);
data/mysecureshell-2.0/Core/main.c:176:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(SHUTDOWN_FILE, O_RDONLY)) >= 0)
data/mysecureshell-2.0/Core/main.c:414:6:  [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(envVar, "SSH_ORIGINAL_COMMAND=");
data/mysecureshell-2.0/Core/parsing.c:174:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		port = atoi(ptr + 1);
data/mysecureshell-2.0/Core/parsing.c:179:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buffer[32];
data/mysecureshell-2.0/SftpAdmin/Main.c:63:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      (void )memcpy(args + 5, av + 1, (ac - 1) * sizeof(char *));
data/mysecureshell-2.0/SftpAdmin/Main.c:102:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		buffer[16384];
data/mysecureshell-2.0/SftpAdmin/Main.c:141:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  BufferPutInt32(b, (u_int32_t )atoi(arg));
data/mysecureshell-2.0/SftpAdmin/Main.c:317:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  size = atoi(arg);
data/mysecureshell-2.0/SftpAdmin/Main.c:389: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	buffer[1024];
data/mysecureshell-2.0/SftpServer/Admin.c:106:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if ((fd = open(SHUTDOWN_FILE, O_CREAT | O_TRUNC | O_RDWR, 0644)) >= 0)
data/mysecureshell-2.0/SftpServer/Admin.c:143:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(MSS_LOG, O_RDONLY)) >= 0)
data/mysecureshell-2.0/SftpServer/Admin.c:183:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  if ((fd = open(CONFIG_FILE, O_WRONLY | O_TRUNC | O_CREAT, 0644)) >= 0)
data/mysecureshell-2.0/SftpServer/Admin.c:235:44:  [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 (stat(CONFIG_FILE, &st) != -1 && (fd = open(CONFIG_FILE, O_RDONLY)) >= 0)
data/mysecureshell-2.0/SftpServer/Admin.c:251:47:  [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 (stat("/etc/shells", &st) != -1 && (fd = open("/etc/shells", O_RDONLY)) >= 0)
data/mysecureshell-2.0/SftpServer/Admin.c:277:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		*args[5];
data/mysecureshell-2.0/SftpServer/Admin.c:309:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		*args[5];
data/mysecureshell-2.0/SftpServer/Admin.c:329:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      *args[3];
data/mysecureshell-2.0/SftpServer/Buffer.c:126: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(b->data + b->length, data, size);
data/mysecureshell-2.0/SftpServer/Buffer.c:141: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(b->data + b->length, data, size);
data/mysecureshell-2.0/SftpServer/Buffer.c:282:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data, b->data + b->read, size);
data/mysecureshell-2.0/SftpServer/Encode.c:201:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(fileName, O_RDONLY)) >= 0)
data/mysecureshell-2.0/SftpServer/Encode.c:243: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 buf[11 + 1];
data/mysecureshell-2.0/SftpServer/Encode.c:259: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 buf[11 + 1];
data/mysecureshell-2.0/SftpServer/Encode.c:318:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[11 + 1];
data/mysecureshell-2.0/SftpServer/FileSystem.c:330: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).
	if ((*fileHandle = open(path->realPath, flags, mode)) == -1)
data/mysecureshell-2.0/SftpServer/Log.c:43:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char color[MYLOG_MAX][3];
data/mysecureshell-2.0/SftpServer/Log.c:72:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file != NULL && (fd = open(file, O_CREAT | O_APPEND | O_WRONLY, 0644)) != -1)
data/mysecureshell-2.0/SftpServer/Log.c:154:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[1024];
data/mysecureshell-2.0/SftpServer/Log.c:177:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char fmt[1024];
data/mysecureshell-2.0/SftpServer/Sftp.c:510: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 readLink[PATH_MAX];
data/mysecureshell-2.0/SftpServer/SftpExt.c:199:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char data[SSH2_READ_HASH];
data/mysecureshell-2.0/SftpServer/SftpWho.h:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		user[30];
data/mysecureshell-2.0/SftpServer/SftpWho.h:75:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		ip[256];
data/mysecureshell-2.0/SftpServer/SftpWho.h:76:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		path[200];
data/mysecureshell-2.0/SftpServer/SftpWho.h:77:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		file[200];
data/mysecureshell-2.0/SftpServer/SftpWho.h:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		home[196];
data/mysecureshell-2.0/SftpServer/Util.c:40:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static void StrMode(mode_t mode, char d[12])
data/mysecureshell-2.0/SftpServer/Util.c:104: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[1024], mode[11 + 1], tbuf[12 + 1], ubuf[11 + 1], gbuf[11 + 1];
data/mysecureshell-2.0/SftpServer/Util.c:253: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 *args[2];
data/mysecureshell-2.0/SftpServer/Util.c:264:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[1024], *str = NULL;
data/mysecureshell-2.0/SftpState/Main.c:48:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  if ((fd = open(SHUTDOWN_FILE, O_CREAT | O_TRUNC | O_RDWR, 0644)) >= 0)
data/mysecureshell-2.0/SftpState/Main.c:50: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.
	      char	buf[4];
data/mysecureshell-2.0/SftpState/Main.c:101:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if ((fd = open(SHUTDOWN_FILE, O_RDONLY)) >= 0)
data/mysecureshell-2.0/SftpWho/Main.c:59:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    do_loop = (unsigned int )atoi(av[i]);
data/mysecureshell-2.0/SftpWho/Main.c:80:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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[256];
data/mysecureshell-2.0/SftpWho/Main.c:97:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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	b1[256];
data/mysecureshell-2.0/SftpWho/Main.c:142:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char		b1[18], b2[18], b3[18], b4[18];
data/mysecureshell-2.0/Core/FileSpec.c:135: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).
		lenSpecsName = strlen(specsName);
data/mysecureshell-2.0/Core/conf.c:152: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).
			size_t len = strlen(confParams[i].name);
data/mysecureshell-2.0/Core/conf.c:167: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).
			for (j = maxLen - strlen(confParams[i].name) + 1; j > 0; j--)
data/mysecureshell-2.0/Core/conf.c:254:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				len = strlen(str) - 1;
data/mysecureshell-2.0/Core/convert.c:30: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).
	size_t len = strlen(path);
data/mysecureshell-2.0/Core/convert.c:47: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).
	max = strlen(res);
data/mysecureshell-2.0/Core/convert.c:71:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(env_str, res + beg + firstIsBlock, end - beg - firstIsBlock);
data/mysecureshell-2.0/Core/convert.c:79: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(res) - (end - beg) + strlen(env_var) + 1;
data/mysecureshell-2.0/Core/convert.c:79: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).
					len = strlen(res) - (end - beg) + strlen(env_var) + 1;
data/mysecureshell-2.0/Core/convert.c:83:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(new, res, beg - 1);
data/mysecureshell-2.0/Core/ip.c:54: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 (h != NULL && h->h_name != NULL && strlen(h->h_name) > 0)//check if a name is defined
data/mysecureshell-2.0/Core/main.c:171:11:  [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.
			(void) strncat(params->who->home, params->home, sizeof(params->who->home) - 1);
data/mysecureshell-2.0/Core/main.c:172:11:  [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.
			(void) strncat(params->who->user, params->user, sizeof(params->who->user) - 1);
data/mysecureshell-2.0/Core/main.c:173:11:  [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.
			(void) strncat(params->who->ip, params->ip, sizeof(params->who->ip) - 1);
data/mysecureshell-2.0/Core/main.c:402: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).
						len += strlen(av[i]);
data/mysecureshell-2.0/Core/main.c:409:8:  [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(cmd, " ");
data/mysecureshell-2.0/Core/parsing.c:87: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).
	len = *str != '\0' ? strlen(str) - 1 : 0;
data/mysecureshell-2.0/Core/string.c:62: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).
	i = strlen(buffer);
data/mysecureshell-2.0/Core/string.c:90: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).
	for (i = 0, max = strlen(buffer); i < max; i++)
data/mysecureshell-2.0/SftpAdmin/Main.c:90:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  len = (size_t )(bOut->length - bOut->read);
data/mysecureshell-2.0/SftpAdmin/Main.c:91:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret = write(_sftpIn, bOut->data + bOut->read, len);
data/mysecureshell-2.0/SftpAdmin/Main.c:104:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  len = read(_sftpOut, buffer, sizeof(buffer));
data/mysecureshell-2.0/SftpAdmin/Main.c:181:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (bIn->read < bIn->length)
data/mysecureshell-2.0/SftpAdmin/Main.c:246:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  oldRead = bIn->read;
data/mysecureshell-2.0/SftpAdmin/Main.c:250:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((bIn->length - bIn->read) < msgLen) //message not complete
data/mysecureshell-2.0/SftpAdmin/Main.c:392:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  len = read(0, buffer, sizeof(buffer));
data/mysecureshell-2.0/SftpServer/Admin.c:52:75:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      DEBUG((MYLOG_DEBUG, "[DoAdminListUsers]send length:'%i' return:%i", strlen(buf), ret));
data/mysecureshell-2.0/SftpServer/Admin.c:149:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				r = read(fd, buffer, size);
data/mysecureshell-2.0/SftpServer/Admin.c:245:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			r = read(fd, buffer, st.st_size);
data/mysecureshell-2.0/SftpServer/Admin.c:255:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				r = read(fd, buffer, st.st_size);
data/mysecureshell-2.0/SftpServer/Admin.c:339: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).
    SendData(bOut, 0, users, strlen(users));
data/mysecureshell-2.0/SftpServer/Buffer.c:49:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (b->read > 0)
data/mysecureshell-2.0/SftpServer/Buffer.c:51:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (b->length > b->read)
data/mysecureshell-2.0/SftpServer/Buffer.c:53:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			memmove(b->data, b->data + b->read, b->length - b->read);
data/mysecureshell-2.0/SftpServer/Buffer.c:53:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			memmove(b->data, b->data + b->read, b->length - b->read);
data/mysecureshell-2.0/SftpServer/Buffer.c:54:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			b->length -= b->read;
data/mysecureshell-2.0/SftpServer/Buffer.c:134: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).
	size = strlen(data);
data/mysecureshell-2.0/SftpServer/Buffer.c:168:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			b->length, b->read, b->size, trySize);
data/mysecureshell-2.0/SftpServer/Buffer.c:170:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (i = b->read, pos = 0; i < b->length; i++)
data/mysecureshell-2.0/SftpServer/Buffer.c:261:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	data = (char *) (b->data + b->read);
data/mysecureshell-2.0/SftpServer/Buffer.c:282:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		memcpy(data, b->data + b->read, size);
data/mysecureshell-2.0/SftpServer/Buffer.h:29:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  u_int32_t	read;
data/mysecureshell-2.0/SftpServer/Buffer.h:68:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define BufferGetReadPointer(_D) &(_D)->data[(_D)->read]
data/mysecureshell-2.0/SftpServer/Encode.c:189:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t pos = strlen(fileName) - 1;
data/mysecureshell-2.0/SftpServer/Encoding.c:42:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		iLen = strlen(str);
data/mysecureshell-2.0/SftpServer/Encoding.c:76: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).
		iLen = oLen = strlen(str);
data/mysecureshell-2.0/SftpServer/FileSystem.c:102: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(newPath->exposedPath);
data/mysecureshell-2.0/SftpServer/FileSystem.c:124: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(path);
data/mysecureshell-2.0/SftpServer/FileSystem.c:129: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).
		beg = len - strlen(ptr);
data/mysecureshell-2.0/SftpServer/FileSystem.c:169: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).
	len1 = strlen(path1);
data/mysecureshell-2.0/SftpServer/FileSystem.c:170: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).
	len2 = strlen(path2);
data/mysecureshell-2.0/SftpServer/FileSystem.c:233: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).
			&& strncmp(fullPath, _home->realPath, strlen(_home->realPath)) != 0)
data/mysecureshell-2.0/SftpServer/FileSystem.c:303: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(path->exposedPath);
data/mysecureshell-2.0/SftpServer/FileSystem.c:567: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).
			size_t	lenRP = strlen(_home->realPath);
data/mysecureshell-2.0/SftpServer/Send.c:124: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).
		msgLength = strlen(msg);
data/mysecureshell-2.0/SftpServer/Sftp.c:425:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(hdl->fd, buf, len);
data/mysecureshell-2.0/SftpServer/Sftp.c:841:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	parsePacket: if ((bIn->length - bIn->read) < 5) //header too small
data/mysecureshell-2.0/SftpServer/Sftp.c:846:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	oldRead = bIn->read;
data/mysecureshell-2.0/SftpServer/Sftp.c:854:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((bIn->length - bIn->read) < msgLen) //message not complete
data/mysecureshell-2.0/SftpServer/Sftp.c:1014:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						msgLen - (bIn->read - oldRead), bIn->read, oldRead, msgLen));
data/mysecureshell-2.0/SftpServer/Sftp.c:1136:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				len = read(0, BufferGetWritePointer(bIn), todo);
data/mysecureshell-2.0/SftpServer/Sftp.c:1154:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				u_int32_t todo = bOut->length - bOut->read;
data/mysecureshell-2.0/SftpServer/SftpExt.c:220:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((r = read(fd, data, len)) > 0)
data/mysecureshell-2.0/SftpServer/SftpServer.c:112:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(000);
data/mysecureshell-2.0/SftpServer/SftpWho.c:109:14:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
						(void) usleep(100);
data/mysecureshell-2.0/SftpServer/Util.c:130: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).
	ulen = MAX((int) strlen(user), 8);
data/mysecureshell-2.0/SftpServer/Util.c:131: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).
	glen = MAX((int) strlen(group), 8);
data/mysecureshell-2.0/SftpServer/Util.c:310: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).
		len = strlen(dataInput);
data/mysecureshell-2.0/SftpServer/Util.c:326:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((ret = read(fdsO[0], buffer, sizeof(buffer))) > 0)
data/mysecureshell-2.0/SftpServer/Util.c:331:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(str, buffer, ret);
data/mysecureshell-2.0/SftpState/Main.c:56:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		i = read(0, buf, sizeof(buf));

ANALYSIS SUMMARY:

Hits = 154
Lines analyzed = 9283 in approximately 0.25 seconds (36916 lines/second)
Physical Source Lines of Code (SLOC) = 7421
Hits@level = [0] 133 [1]  71 [2]  58 [3]   5 [4]  16 [5]   4
Hits@level+ = [0+] 287 [1+] 154 [2+]  83 [3+]  25 [4+]  20 [5+]   4
Hits/KSLOC@level+ = [0+] 38.674 [1+] 20.7519 [2+] 11.1845 [3+] 3.36882 [4+] 2.69505 [5+] 0.539011
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.