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/linux-ftpd-ssl-0.17.36+0.3/ftpd/pathnames.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/extern.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logutmp.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/popen.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ssl_port.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/sslapp.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/ftpd/sslapp.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/version.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/daemon.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/daemon.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/isexpired.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/isexpired.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/vis.h
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c
Examining data/linux-ftpd-ssl-0.17.36+0.3/support/vis.c

FINAL RESULTS:

data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:381:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, ap);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:478: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(tbuf, pkg);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:479: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(version, versionpre);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:484:8:  [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(version, tmp);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:653:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ssl_file_path,DEFAULT_SSL_FILE);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:735:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(ssl_file_path,"%s/%s",X509_get_default_cert_dir(),
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:739:6:  [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(ssl_file_path,DEFAULT_SSL_FILE);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:764:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(ssl_file_path,"%s/private/%s",X509_get_default_cert_area(),
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:768:6:  [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(ssl_file_path,DEFAULT_SSL_FILE);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1057:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(new, s);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1496:13:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	    strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd))
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1640:4:  [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(rootdir, pw->pw_dir);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1751:10:  [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.
		(void) snprintf(line, sizeof(line), cmd, name);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2078:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			    sprintf(errbuf, "ftpd: Verify %s",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2082:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(errbuf,"ftpd: SSL_accept DATA %s",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2228:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		    sprintf(errbuf, "ftpd: Verify %s",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2232:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(errbuf,"ftpd: SSL_accept DATA %s",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2559:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(msgbuf, "     %s\r\n", version);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2580:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len = sprintf(msgbuf, " (%s)", ipaddr);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2617:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(msgbuf, "     TYPE: %s", typenames[type]);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2626:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len = sprintf(msgbuf, ", FORM: %s", formnames[form]);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2635:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		len = sprintf(msgbuf,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2752:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        vsnprintf(outputbuf+strlen(outputbuf),2048-(strlen(outputbuf) + 3),fmt,ap); 
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2770:8:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	(void)vprintf(fmt, ap);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2811:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(outputbuf+strlen(outputbuf),fmt,ap);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2827:8:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	(void)vprintf(fmt, ap);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3376:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf,"%s%s\n", dirname,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3425:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				        sprintf(buf, "%s%s\n", &nbuf[2],
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3428:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				        sprintf(buf, "%s%s\n", nbuf,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3571:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(errstr,"ftpd: SSL_use_RSAPrivateKey %s",ERR_error_string(ERR_get_error(),NULL));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3577:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(errstr,"ftpd: SSL_use_certificate %s",ERR_error_string(ERR_get_error(),NULL));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3590:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(errstr,"ftpd: SSL_accept %s",ERR_error_string(ERR_get_error(),NULL));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/popen.c:193:3:  [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.
		execv(gargv[0], gargv);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:123:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(p, Argv0);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:129:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	(void) vsnprintf(p, sizeof(buf) - (p - buf), fmt, ap);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:139:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(Argv[0], buf);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:469:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(time(NULL)^(getpid()<<8));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:494:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, argstr)) != -1) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1479:8:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		us = random() % 3000000;
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1648:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(rootdir) < 0 || chdir("/") < 0) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1655:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(rootdir) < 0 || chdir("/") < 0) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3496:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if (realpath(path, rpath) == NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/sslapp.c:145:9:  [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.
      p=getenv("SSL_CIPHER");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:179:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char ssl_file_path[1024];    /* don't look at that nasty value to the left */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:232: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 version[sizeof(versionpre)+sizeof(pkg)];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:285:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	tmpline[7];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:286:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	hostname[MAXHOSTNAMELEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:287:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	remotehost[MAXHOSTNAMELEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:288:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	dhostname[MAXHOSTNAMELEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:290: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 ttyline[20];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:319:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	proctitle[BUFSIZ];	/* initial part of title */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:390:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char path[MAXPATHLEN+1];	/* path + '/' */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:462: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 *cp, line[LINE_MAX];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:477:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	   char *tmp, *tmp2, tbuf[sizeof(pkg)+1];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:533:14:  [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).
			timeout = atoi(optarg);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:539:17:  [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).
			maxtimeout = atoi(optarg);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:602:24:  [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).
			    ssl_verify_flag=atoi(optarg+strlen("verify="));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:695: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).
			SSL_LOG=fopen("ftpd.log","w");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:742:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    fp=fopen(filename,"r");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:771:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    fp=fopen(filename,"r");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:978: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 ((fd = fopen(_PATH_NOLOGIN,"r")) != NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:989: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 ((fd = fopen(_PATH_FTPWELCOME, "r")) != NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1097: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 curname[16];	/* current USER name */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1214: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 *p, line[BUFSIZ];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1216: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 ((fd = fopen(fname, "r")) != NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1507:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char homedir[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1508: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 rootdir[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1606: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(&utmp.ut_addr,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1611: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(&utmp.ut_addr,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1622: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 ((statfd = open(_PATH_FTPDSTATFILE, O_WRONLY|O_APPEND)) < 0)
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1690: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 ((fd = fopen(_PATH_FTPLOGINMESG, "r")) != NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1691: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 *cp, line[LINE_MAX];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1746:9:  [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).
		fin = fopen(name, "r"), closefunc = fclose;
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1749: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 line[BUFSIZ];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1838:10:  [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).
		fout = fopen(name, mode);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1979: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 sizebuf[32];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2072:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			static char errbuf[1024];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2134: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 ipaddr[INET6_ADDRSTRLEN], port[12];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2222:24:  [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 errbuf[1024];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2409: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[BUFSIZ];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2512: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 line[LINE_MAX];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2539: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 chbuf[1];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2554: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 ipaddr[INET6_ADDRSTRLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2555: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 *mesg, msgbuf[128];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2688:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			len = sprintf(msgbuf, " (|||%d|)\r\n",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2700:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			len = sprintf(msgbuf, " (%d,%d,%d,%d,%d,%d)\r\n",
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2741:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char outputbuf[2048];        /* allow for a 2k command string */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2751:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(outputbuf,"%d ",n);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2753:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(outputbuf,"\r\n");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2799:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char outputbuf[2048];        /* allow for a 2k command string */
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2810:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(outputbuf,"%d- ",n);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2812:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(outputbuf,"\r\n");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2900:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((message = fopen(_PATH_CWDMESG, "r")) != NULL) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2901: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 *cp, line[LINE_MAX];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2918: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 npath[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2956: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[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2988: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 host[NI_MAXHOST];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3176: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 delim, ipaddr[INET6_ADDRSTRLEN], portstr[12];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3224:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(portstr, "%d", port);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3234: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(&data_dest, aiptr->ai_addr, aiptr->ai_addrlen);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3256:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char new[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3279:8:  [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 = open(new, O_RDWR|O_CREAT|O_EXCL, 0666);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3315: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];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3393: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 nbuf[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3482: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[400 + MAXHOSTNAMELEN*4 + MAXPATHLEN*4];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3483: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 dir[MAXPATHLEN], path[MAXPATHLEN], rpath[MAXPATHLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3484: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 vremotehost[MAXHOSTNAMELEN*4], vpath[MAXPATHLEN*4];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3522: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 ipaddr[INET6_ADDRSTRLEN];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3523: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 host[NI_MAXHOST];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3556: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 errstr[1024];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3655: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 putc_buf[BUFSIZ];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3761: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[2048];
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3767:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   user_fp = fopen("/etc/ssl.users", "r");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logutmp.c:83:15:  [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 = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) < 0))
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:69:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0)
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:95:8:  [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(&ut.ut_addr,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:100:8:  [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(&ut.ut_addr,
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/popen.c:80: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 **pop, *argv[MAX_ARGV], *gargv[MAX_GARGV];
data/linux-ftpd-ssl-0.17.36+0.3/support/daemon.c:64:7:  [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 = open(_PATH_DEVNULL, O_RDWR, 0);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:74:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char Argv0[128];			/* program name */
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:116:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[2048];
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:124:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	(void) strcat(p, ": ");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:395: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/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:582:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		        if (strncmp(optarg, "debug=", strlen("debug=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:584: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).
			    my_ssl_log_file = optarg + strlen("debug=");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:601: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).
		        if (strncmp(optarg, "verify=", strlen("verify=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:602:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    ssl_verify_flag=atoi(optarg+strlen("verify="));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:605: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).
		        if (strncmp(optarg, "cacert=", strlen("cacert=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:606:38:  [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).
			    my_ssl_cacert_file = optarg + strlen("cacert=");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:608:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		        if (strncmp(optarg, "cert=", strlen("cert=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:609:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    my_ssl_cert_file=optarg+strlen("cert=");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:611: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).
		        if (strncmp(optarg, "key=", strlen("key=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:612:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    my_ssl_key_file=optarg+strlen("key=");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:614: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).
		        if (strncmp(optarg, "cipher=", strlen("cipher=")) == 0 ) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:615: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).
			    ssl_cipher_list = optarg + strlen("cipher=");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1008:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(hostname, aiptr->ai_canonname, sizeof(hostname));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1050:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *new = malloc((unsigned) strlen(s) + 1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1080: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).
		memset(save.pw_passwd, 0, strlen(save.pw_passwd));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1194:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(curname, name, sizeof(curname)-1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1323: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).
			sp = PAM_message + strlen(PAM_message);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1481:3:  [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.
		usleep(us);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1601:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(utmp.ut_name, pw->pw_name, sizeof(utmp.ut_name));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1602:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(utmp.ut_host, remotehost, sizeof(utmp.ut_host));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1603:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(utmp.ut_line, ttyline, sizeof(utmp.ut_line));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1652:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
		strcpy(pw->pw_dir, "/");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1659:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
		strcpy(pw->pw_dir, "/");
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1731:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	(void) umask(defumask);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1779:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((c=getc(fin)) == EOF) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:1855:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((c=getc(fout)) == EOF) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2285:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(instr)) != EOF) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2359:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    while ((cnt = read(filefd, buf, (u_int)blksize)) > 0 &&
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2364:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((cnt = read(filefd, buf, size)) > 0 &&
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2434:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			cnt = read(fileno(instr), buf, sizeof(buf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2485: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).
				SSL_write(ssl_con, mesg, strlen(mesg));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2517:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(fin)) != EOF) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2612:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		SSL_write(ssl_con, mesg, strlen(mesg));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2664: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).
			SSL_write(ssl_con, mesg, strlen(mesg));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2681: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).
			SSL_write(ssl_con, mesg, strlen(mesg));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2716: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).
			SSL_write(ssl_con, mesg, strlen(mesg));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2752: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).
        vsnprintf(outputbuf+strlen(outputbuf),2048-(strlen(outputbuf) + 3),fmt,ap); 
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2752:53:  [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).
        vsnprintf(outputbuf+strlen(outputbuf),2048-(strlen(outputbuf) + 3),fmt,ap); 
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2761:34:  [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).
	    SSL_write(ssl_con,outputbuf,strlen(outputbuf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2811: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).
	vsprintf(outputbuf+strlen(outputbuf),fmt,ap);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2818:34:  [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).
	    SSL_write(ssl_con,outputbuf,strlen(outputbuf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:2994:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(remotehost, host, sizeof(remotehost)-1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3182:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ( ! trans || strlen(trans) < 10 )
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3270:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(new, local, sizeof(new)-1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3272: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(new);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3380:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				SSL_write(ssl_data_con,buf,strlen(buf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3383: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).
				fwrite(buf,strlen(buf),1,dout);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3384: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).
			byte_count += strlen(dirname) + 1;
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3432:34:  [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).
				  SSL_write(ssl_data_con,buf,strlen(buf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3435: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).
				  fwrite(buf,strlen(buf),1,dout);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3436: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).
				byte_count += strlen(nbuf) + 1;
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3491: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).
		vpw = (char *)malloc(strlen((guest) ? guestpw : pw->pw_name)*4+1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3497:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(rpath, path, sizeof rpath-1);
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ftpd.c:3514: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).
		write(statfd, buf, strlen(buf));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logutmp.c:92:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, &ubuf, sizeof(UTMP)) == sizeof(UTMP)) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logutmp.c:123:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(fd, &ut, sizeof(UTMP)) == sizeof(UTMP)) {
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:89:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:90:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/logwtmp.c:91:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ssl_port.h:70:95:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define GETC(X)           (ssl_active_flag && (((X)==cin)||((X)==cout)) ? ssl_getc(ssl_con) : getc((X)) )
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ssl_port.h:72:119:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define DATAGETC(X)       (ssl_data_active_flag && ((fileno(X)==data)||(fileno(X)==pdata)) ? ssl_getc(ssl_data_con) : getc((X)) )
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ssl_port.h:78:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define GETC(X)           getc((X))
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/ssl_port.h:79:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define DATAGETC(X)       getc((X))
data/linux-ftpd-ssl-0.17.36+0.3/ftpd/sslapp.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).
				   strlen(id_ctx));
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:100:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		LastArgv = envp[i - 1] + strlen(envp[i - 1]);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:102:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:107:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(Argv0, tmp, sizeof(Argv0));
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:125:7:  [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).
	p += strlen(p);
data/linux-ftpd-ssl-0.17.36+0.3/support/setproctitle.c:132: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(buf);

ANALYSIS SUMMARY:

Hits = 192
Lines analyzed = 5415 in approximately 0.17 seconds (32672 lines/second)
Physical Source Lines of Code (SLOC) = 3877
Hits@level = [0]  97 [1]  70 [2]  79 [3]   7 [4]  36 [5]   0
Hits@level+ = [0+] 289 [1+] 192 [2+] 122 [3+]  43 [4+]  36 [5+]   0
Hits/KSLOC@level+ = [0+] 74.5422 [1+] 49.5228 [2+] 31.4676 [3+] 11.091 [4+] 9.28553 [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.