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/atftp-0.7.git20120829/argz.c
Examining data/atftp-0.7.git20120829/argz.h
Examining data/atftp-0.7.git20120829/logger.c
Examining data/atftp-0.7.git20120829/logger.h
Examining data/atftp-0.7.git20120829/stats.c
Examining data/atftp-0.7.git20120829/stats.h
Examining data/atftp-0.7.git20120829/tftp.c
Examining data/atftp-0.7.git20120829/tftp.h
Examining data/atftp-0.7.git20120829/tftpd.h
Examining data/atftp-0.7.git20120829/tftpd_mcast.c
Examining data/atftp-0.7.git20120829/tftpd_mtftp.h
Examining data/atftp-0.7.git20120829/tftpd_pcre.h
Examining data/atftp-0.7.git20120829/options.c
Examining data/atftp-0.7.git20120829/options.h
Examining data/atftp-0.7.git20120829/tftp_def.c
Examining data/atftp-0.7.git20120829/tftp_def.h
Examining data/atftp-0.7.git20120829/tftp_file.c
Examining data/atftp-0.7.git20120829/tftp_io.c
Examining data/atftp-0.7.git20120829/tftp_io.h
Examining data/atftp-0.7.git20120829/tftp_mtftp.c
Examining data/atftp-0.7.git20120829/tftpd.c
Examining data/atftp-0.7.git20120829/tftpd_file.c
Examining data/atftp-0.7.git20120829/tftpd_list.c
Examining data/atftp-0.7.git20120829/tftpd_mtftp.c
Examining data/atftp-0.7.git20120829/tftpd_pcre.c

FINAL RESULTS:

data/atftp-0.7.git20120829/tftpd.c:321:20:  [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(pidfile, user->pw_uid, group->gr_gid) != OK) {
data/atftp-0.7.git20120829/logger.c:113:11:  [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(message, sizeof(message), fmt, args);
data/atftp-0.7.git20120829/tftp_def.c:127:11:  [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.
          snprintf(string, size, format, tmp, suffix[i]);
data/atftp-0.7.git20120829/tftp_def.c:129:11:  [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.
          printf(format, tmp, suffix[i]);
data/atftp-0.7.git20120829/tftp.c:221:10:  [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 (getenv("HOME") != NULL)
data/atftp-0.7.git20120829/tftp.c:222:55:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          snprintf(history, sizeof(history), "%s/%s", getenv("HOME"), HISTORY_FILE);
data/atftp-0.7.git20120829/tftp.c:1020:18:  [3] (buffer) getopt_long:
  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 ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smP:",
data/atftp-0.7.git20120829/tftpd.c:932:18:  [3] (buffer) getopt_long:
  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 ((c = getopt_long(argc, argv, "t:r:m:v::Vh",
data/atftp-0.7.git20120829/logger.c:77:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          if ((log_fd = open(log_filename, O_WRONLY | O_APPEND)) < 0)
data/atftp-0.7.git20120829/logger.c:96:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char message[MAXLEN];
data/atftp-0.7.git20120829/logger.c:97:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char time_buf[MAXLEN];
data/atftp-0.7.git20120829/logger.c:98:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char hostname[MAXLEN];
data/atftp-0.7.git20120829/options.c:195:19:  [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).
          tsize = atoi(options[OPT_TSIZE].value);
data/atftp-0.7.git20120829/options.c:206:21:  [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(options[OPT_TIMEOUT].value);
data/atftp-0.7.git20120829/options.c:217:21:  [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).
          blksize = atoi(options[OPT_BLKSIZE].value);
data/atftp-0.7.git20120829/options.c:248: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).
               *port = atoi(token);
data/atftp-0.7.git20120829/options.c:263:22:  [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).
               *mc = atoi(token);
data/atftp-0.7.git20120829/options.h:24:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char option[OPT_SIZE];
data/atftp-0.7.git20120829/options.h:25:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char value[VAL_SIZE];
data/atftp-0.7.git20120829/stats.c:117:16:  [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(&s_stats.min_time, &s_stats.diff_time,
data/atftp-0.7.git20120829/stats.c:121:16:  [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(&s_stats.max_time, &s_stats.diff_time,
data/atftp-0.7.git20120829/stats.c:123:11:  [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(&s_stats.prev_time, &s_stats.curr_time,
data/atftp-0.7.git20120829/tftp.c:150:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(data.tftp_options, tftp_default_options,
data/atftp-0.7.git20120829/tftp.c:161:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(data.tftp_options_reply, tftp_default_options,
data/atftp-0.7.git20120829/tftp.c:214:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp.c:219:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char history[MAXLEN];
data/atftp-0.7.git20120829/tftp.c:338:22:  [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.
     while ((name = (char *)cmdtab[list_index].name))
data/atftp-0.7.git20120829/tftp.c:522:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char value[VAL_SIZE];
data/atftp-0.7.git20120829/tftp.c:658:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp.c:707:26:  [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 ((fp = fopen(data.local_file, "r")) != NULL)
data/atftp-0.7.git20120829/tftp.c:779:41:  [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).
               data.mtftp_client_port = atoi(argv[2]);
data/atftp-0.7.git20120829/tftp.c:790:42:  [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).
               data.mtftp_listen_delay = atoi(argv[2]);
data/atftp-0.7.git20120829/tftp.c:796:43:  [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).
               data.mtftp_timeout_delay = atoi(argv[2]);
data/atftp-0.7.git20120829/tftp.c:855:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp.c:931:26:  [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).
          data.timeout = atoi(argv[1]);
data/atftp-0.7.git20120829/tftp.c:983:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp.c:984:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char local_file[MAXLEN] = "";
data/atftp-0.7.git20120829/tftp.c:985:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char remote_file[MAXLEN] = "";
data/atftp-0.7.git20120829/tftp.c:1130:29:  [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).
               data.delay = atoi(optarg);
data/atftp-0.7.git20120829/tftp.h:29:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char local_file[VAL_SIZE]; /* the file we are reading or writing is not
data/atftp-0.7.git20120829/tftp.h:39:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char hostname[MAXLEN];     /* peer's hostname */
data/atftp-0.7.git20120829/tftp.h:51:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char mtftp_mcast_ip[MAXLEN];
data/atftp-0.7.git20120829/tftp_def.c:47: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 *tftp_errmsg[9] = {
data/atftp-0.7.git20120829/tftp_def.c:311:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(ss, ai->ai_addr, ai->ai_addrlen);
data/atftp-0.7.git20120829/tftp_def.h: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.
extern char *tftp_errmsg[9];
data/atftp-0.7.git20120829/tftp_file.c:122:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char from_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftp_file.c:132:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char mc_addr[IPADDRLEN];   /* multicast address */
data/atftp-0.7.git20120829/tftp_file.c:141:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp_file.c:180:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fp = fopen(data->local_file, "w")) == NULL)
data/atftp-0.7.git20120829/tftp_file.c:405:21:  [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->tftp_options_reply, tftp_default_options,
data/atftp-0.7.git20120829/tftp_file.c:637:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char from_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftp_file.c:644:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp_file.c:680:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fp = fopen(data->local_file, "r")) == NULL)
data/atftp-0.7.git20120829/tftp_file.c:841:16:  [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->tftp_options_reply, tftp_default_options,
data/atftp-0.7.git20120829/tftp_io.c:223:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char cbuf[1024];
data/atftp-0.7.git20120829/tftp_io.c:320:16:  [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(sa_from, &from, sizeof(from));
data/atftp-0.7.git20120829/tftp_io.c:324:16:  [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(sa, &from, sizeof(from));
data/atftp-0.7.git20120829/tftp_mtftp.c:117:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char from_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftp_mtftp.c:133:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftp_mtftp.c:167:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fp = fopen(data->local_file, "w")) == NULL)
data/atftp-0.7.git20120829/tftpd.c:60: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 directory[MAXLEN] = "/srv/tftp/";
data/atftp-0.7.git20120829/tftpd.c:69: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 tftpd_addr[MAXLEN] = "";   /* IP address atftpd binds to */
data/atftp-0.7.git20120829/tftpd.c:83: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 mcast_addr[MAXLEN] = "239.255.0.0-255";
data/atftp-0.7.git20120829/tftpd.c:84: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 mcast_port[MAXLEN] = "1758";
data/atftp-0.7.git20120829/tftpd.c:100: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 user_name[MAXLEN] = "nobody";
data/atftp-0.7.git20120829/tftpd.c:101: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 group_name[MAXLEN] = "nogroup";
data/atftp-0.7.git20120829/tftpd.c:121: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 mtftp_file[MAXLEN] = "";
data/atftp-0.7.git20120829/tftpd.c:495:16:  [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->tftp_options, tftp_default_options,
data/atftp-0.7.git20120829/tftpd.c:611:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];       /* hold the string we pass to the logger */
data/atftp-0.7.git20120829/tftpd.c:618:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char addr_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftpd.c:887:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN], out[MAXLEN];
data/atftp-0.7.git20120829/tftpd.c:938:32:  [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).
               tftpd_timeout = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:941:32:  [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).
               retry_timeout = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:944:35:  [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).
               tftpd_max_thread = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:948:23:  [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).
               rate = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:953:37:  [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).
                    logging_level = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:1006:36:  [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).
               tftpd_port = (short)atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:1012:28:  [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).
               mcast_ttl = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:1067:30:  [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).
               mtftp_sport = atoi(optarg);
data/atftp-0.7.git20120829/tftpd.c:1172:21:  [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 ((fp = fopen(file, "r")) != NULL)
data/atftp-0.7.git20120829/tftpd.c:1178:21:  [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 ((fp = fopen(file, "w")) == NULL)
data/atftp-0.7.git20120829/tftpd_file.c:55: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.
extern char directory[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:71:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:115:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char addr_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftpd_file.c:118:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char filename[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:119:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:148:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fp = fopen(filename, "w")) == NULL)
data/atftp-0.7.git20120829/tftpd_file.c:414:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char addr_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftpd_file.c:418:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char filename[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:419:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_file.c:457:11:  [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/atftp-0.7.git20120829/tftpd_file.c:488:26:  [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/atftp-0.7.git20120829/tftpd_list.c:146:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char options[MAXLEN];
data/atftp-0.7.git20120829/tftpd_list.c:147:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:134:28:  [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).
	       tmp->port = (short)atoi(port);
data/atftp-0.7.git20120829/tftpd_mcast.c:161:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char s[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:163:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char s2[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:173:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char out[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:269:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char s[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:271:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char s2[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mcast.c:281:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char out[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mtftp.c:72:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mtftp.c:80:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fp = fopen(filename, "r")) == NULL)
data/atftp-0.7.git20120829/tftpd_mtftp.c:115:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(data->tftp_options, tftp_default_options,
data/atftp-0.7.git20120829/tftpd_mtftp.c:185:29:  [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 ((thread->fp = fopen(thread->file_name, "r")) == NULL)
data/atftp-0.7.git20120829/tftpd_mtftp.c:202:32:  [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).
          thread->mcast_port = atoi(thread->client_port);
data/atftp-0.7.git20120829/tftpd_mtftp.c:352:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char addr_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftpd_mtftp.c:355:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char filename[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mtftp.c:356:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];       /* hold the string we pass to the logger */
data/atftp-0.7.git20120829/tftpd_mtftp.c:455:16:  [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(&thread->sa_in, &sa, sizeof(struct sockaddr_storage));
data/atftp-0.7.git20120829/tftpd_mtftp.c:518:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char addr_str[SOCKADDR_PRINT_ADDR_LEN];
data/atftp-0.7.git20120829/tftpd_mtftp.c:522:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char string[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mtftp.h:52:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char file_name[MAXLEN];
data/atftp-0.7.git20120829/tftpd_mtftp.h:53:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char mcast_ip[MAXLEN];     /* FIXME: could be less memory */
data/atftp-0.7.git20120829/tftpd_mtftp.h:54:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char client_port[MAXLEN];
data/atftp-0.7.git20120829/tftpd_pcre.c:57:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char line[MAXLEN];
data/atftp-0.7.git20120829/tftpd_pcre.c:68:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     if ((fh = fopen(filename, "r")) == NULL)
data/atftp-0.7.git20120829/tftpd_pcre.h:61:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char filename[MAXLEN];
data/atftp-0.7.git20120829/argz.c:62: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 nlen = strlen (string) + 1;
data/atftp-0.7.git20120829/argz.c:110:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t part_len = strlen(argz);
data/atftp-0.7.git20120829/argz.c:124:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t part_len = strlen (argz);
data/atftp-0.7.git20120829/options.c:307:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if ((index + (int)strlen(options[i].option) + 2) < len)
data/atftp-0.7.git20120829/options.c:310:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               index += strlen(options[i].option);
data/atftp-0.7.git20120829/options.c:314:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if ((index + (int)strlen(options[i].value) + 2) < len)
data/atftp-0.7.git20120829/options.c:317:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               index += strlen(options[i].value);
data/atftp-0.7.git20120829/options.c:336: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).
               if ((index + (int)strlen(options[i].option) + 2) < len)
data/atftp-0.7.git20120829/options.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).
                    index += strlen(options[i].option);
data/atftp-0.7.git20120829/options.c:343: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).
               if ((index + (int)strlen(options[i].value) + 2) < len)
data/atftp-0.7.git20120829/options.c:346: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).
                    index += strlen(options[i].value);
data/atftp-0.7.git20120829/tftp.c:256: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).
               string[strlen(string)-1] = 0;
data/atftp-0.7.git20120829/tftp.c:258: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).
               if (strlen(string) != 0)
data/atftp-0.7.git20120829/tftp.c:334: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).
          len = strlen (text);
data/atftp-0.7.git20120829/tftp.c:404: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).
     if (strlen((*argv)[*argc - 1]) == 0)
data/atftp-0.7.git20120829/tftp.c:715: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).
                    string[strlen(string) - 1] = 0;
data/atftp-0.7.git20120829/tftp.c:904: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).
     if (strlen(data.tftp_options[OPT_FILENAME].value) > 0)
data/atftp-0.7.git20120829/tftp.c:1170: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).
               if(strlen(remote_file) == 0)
data/atftp-0.7.git20120829/tftp.c:1172:20:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                   strncpy(remote_file, local_file, MAXLEN);
data/atftp-0.7.git20120829/tftp.c:1178: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).
               if(strlen(local_file) == 0)
data/atftp-0.7.git20120829/tftp.c:1180:20:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                   strncpy(local_file, remote_file, MAXLEN);
data/atftp-0.7.git20120829/tftp.c:1186: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).
               if(strlen(local_file) == 0)
data/atftp-0.7.git20120829/tftp.c:1188:20:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                   strncpy(local_file, remote_file, MAXLEN);
data/atftp-0.7.git20120829/tftp_def.c:138:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
     strncpy(to, from, size);
data/atftp-0.7.git20120829/tftp_file.c:191:16:  [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(data->delay*1000);
data/atftp-0.7.git20120829/tftp_file.c:697:16:  [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(data->delay*1000);
data/atftp-0.7.git20120829/tftp_io.c:61: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).
     buf_index += strlen(filename);
data/atftp-0.7.git20120829/tftp_io.c:64: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).
     buf_index += strlen(mode);
data/atftp-0.7.git20120829/tftp_io.c:69: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).
          if (strlen(tftp_options[i].option) == 0)
data/atftp-0.7.git20120829/tftp_io.c:77:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                   buf_index += strlen(tftp_options[i].option);
data/atftp-0.7.git20120829/tftp_io.c:82: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).
               buf_index += strlen(tftp_options[i].value);
data/atftp-0.7.git20120829/tftp_io.c:139:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               index += strlen(tftp_options[i].option);
data/atftp-0.7.git20120829/tftp_io.c:142:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               index += strlen(tftp_options[i].value);
data/atftp-0.7.git20120829/tftp_io.c:173: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 = 4 + strlen(tftp_errmsg[err_code]) + 1;
data/atftp-0.7.git20120829/tftp_io.c:418:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    c = fgetc(fp);
data/atftp-0.7.git20120829/tftp_mtftp.c:232:16:  [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(data->delay*1000);
data/atftp-0.7.git20120829/tftpd.c:240: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).
          if (strlen(tftpd_addr) > 0 || tftpd_port == 0)
data/atftp-0.7.git20120829/tftpd.c:249: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).
               err = getaddrinfo(strlen(tftpd_addr) ? tftpd_addr : NULL, tftpd_port ? NULL : "tftp",
data/atftp-0.7.git20120829/tftpd.c:272: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).
          if (strlen(tftpd_addr) == 0)
data/atftp-0.7.git20120829/tftpd.c:370: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).
     if (strlen(mtftp_file) > 0)
data/atftp-0.7.git20120829/tftpd.c:427:21:  [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((60L*1000000L / (long long)rate) - (current - previous));
data/atftp-0.7.git20120829/tftpd.c:1048: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).
                    string[strlen(string) - 1] = '\0';
data/atftp-0.7.git20120829/tftpd.c:1086: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).
     if (directory[strlen(directory)] != '/')
data/atftp-0.7.git20120829/tftpd.c:1087:11:  [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(directory, "/");
data/atftp-0.7.git20120829/tftpd.c:1105: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).
          if (strlen(tftpd_addr) > 0)
data/atftp-0.7.git20120829/tftpd_file.c:74: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(directory, filename, strlen(directory)) != 0)
data/atftp-0.7.git20120829/tftpd_pcre.c:117:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          matches = pcre_exec(file_re, file_pe, line, (int)(strlen(line)),
data/atftp-0.7.git20120829/tftpd_pcre.c:262: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).
                              str, (int)(strlen(str)),

ANALYSIS SUMMARY:

Hits = 166
Lines analyzed = 9131 in approximately 0.27 seconds (33447 lines/second)
Physical Source Lines of Code (SLOC) = 6757
Hits@level = [0] 226 [1]  48 [2] 110 [3]   4 [4]   3 [5]   1
Hits@level+ = [0+] 392 [1+] 166 [2+] 118 [3+]   8 [4+]   4 [5+]   1
Hits/KSLOC@level+ = [0+] 58.0139 [1+] 24.5671 [2+] 17.4634 [3+] 1.18396 [4+] 0.591979 [5+] 0.147995
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.