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/httptunnel-3.3+dfsg/base64.c
Examining data/httptunnel-3.3+dfsg/port/getopt.c
Examining data/httptunnel-3.3+dfsg/port/vsyslog.c
Examining data/httptunnel-3.3+dfsg/port/syslog_.h
Examining data/httptunnel-3.3+dfsg/port/getopt.h
Examining data/httptunnel-3.3+dfsg/port/unistd_.h
Examining data/httptunnel-3.3+dfsg/port/daemon.c
Examining data/httptunnel-3.3+dfsg/port/poll.c
Examining data/httptunnel-3.3+dfsg/port/endprotoent.c
Examining data/httptunnel-3.3+dfsg/port/sys/poll_.h
Examining data/httptunnel-3.3+dfsg/port/netdb_.h
Examining data/httptunnel-3.3+dfsg/port/stdio_.h
Examining data/httptunnel-3.3+dfsg/port/vsnprintf.c
Examining data/httptunnel-3.3+dfsg/port/getopt1.c
Examining data/httptunnel-3.3+dfsg/http.h
Examining data/httptunnel-3.3+dfsg/base64.h
Examining data/httptunnel-3.3+dfsg/common.h
Examining data/httptunnel-3.3+dfsg/http.c
Examining data/httptunnel-3.3+dfsg/htc.c
Examining data/httptunnel-3.3+dfsg/tunnel.c
Examining data/httptunnel-3.3+dfsg/common.c
Examining data/httptunnel-3.3+dfsg/tunnel.h
Examining data/httptunnel-3.3+dfsg/hts.c

FINAL RESULTS:

data/httptunnel-3.3+dfsg/common.c:46:7:  [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 (debug_file, fmt0, ap);
data/httptunnel-3.3+dfsg/htc.c:566: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 (str, auth);
data/httptunnel-3.3+dfsg/http.c:33:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    n = sprintf (str, "http://%s:%d", dest->host_name, dest->host_port);
data/httptunnel-3.3+dfsg/http.c:40:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (str, "%s:%d", dest->host_name, dest->host_port);
data/httptunnel-3.3+dfsg/http.c:754:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  m = sprintf (str, "%s %s HTTP/%d.%d\r\n",
data/httptunnel-3.3+dfsg/port/stdio_.h:18:12:  [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.
extern int vsnprintf (char *str, size_t n, const char *format, va_list ap);
data/httptunnel-3.3+dfsg/port/stdio_.h:19:12:  [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.
extern int snprintf (char *str, size_t n, const char *format, ...);
data/httptunnel-3.3+dfsg/port/syslog_.h:17:6:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
void syslog (int level, char *fmt0, ...);
data/httptunnel-3.3+dfsg/port/vsnprintf.c:28:7:  [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.
  n = vfprintf (f, format, ap);
data/httptunnel-3.3+dfsg/port/vsnprintf.c:35:10:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  return vsprintf (*s, format, ap);
data/httptunnel-3.3+dfsg/port/vsnprintf.c:40:1:  [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 (char *str, size_t n, const char *format, va_list ap)
data/httptunnel-3.3+dfsg/port/vsnprintf.c:66:1:  [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 (char *s, size_t n, const char *format, ...)
data/httptunnel-3.3+dfsg/port/vsnprintf.c:72:7:  [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.
  m = vsnprintf (s, n, format, ap);
data/httptunnel-3.3+dfsg/port/vsyslog.c:15:1:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
syslog (int level, const char *fmt0, ...)
data/httptunnel-3.3+dfsg/port/vsyslog.c:35:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  if (vsnprintf (buffer, sizeof buffer, fmt0, ap) > 0)
data/httptunnel-3.3+dfsg/port/vsyslog.c:36:5:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
    syslog (level, buffer);
data/httptunnel-3.3+dfsg/tunnel.c:1167:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf (str,
data/httptunnel-3.3+dfsg/htc.c:169:11:  [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.
      c = getopt_long (argc, argv, short_options,
data/httptunnel-3.3+dfsg/hts.c:138:11:  [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.
      c = getopt_long (argc, argv, short_options,
data/httptunnel-3.3+dfsg/hts.c:412:11:  [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 (arg.root) < 0)
data/httptunnel-3.3+dfsg/port/getopt.c:216:7:  [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.
char *getenv ();
data/httptunnel-3.3+dfsg/port/getopt.c:407:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/httptunnel-3.3+dfsg/port/getopt.c:975:1:  [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.
getopt (argc, argv, optstring)
data/httptunnel-3.3+dfsg/port/getopt.c:1005:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/httptunnel-3.3+dfsg/port/getopt.h:108:12:  [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.
extern int getopt (int argc, char *const *argv, const char *shortopts);
data/httptunnel-3.3+dfsg/port/getopt.h:110:12:  [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.
extern int getopt ();
data/httptunnel-3.3+dfsg/port/getopt.h:112:12:  [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.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/httptunnel-3.3+dfsg/port/getopt.h:124:12:  [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.
extern int getopt ();
data/httptunnel-3.3+dfsg/port/getopt.h:125:12:  [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.
extern int getopt_long ();
data/httptunnel-3.3+dfsg/port/getopt1.c:70:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/httptunnel-3.3+dfsg/port/getopt1.c:126:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/httptunnel-3.3+dfsg/common.c:34:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char s[40];
data/httptunnel-3.3+dfsg/common.c:182:7:  [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(&address->sin_addr.s_addr, ent->h_addr, (unsigned)ent->h_length);
data/httptunnel-3.3+dfsg/common.c:200: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 (device, O_RDWR | O_NONBLOCK);
data/httptunnel-3.3+dfsg/common.c:254: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.
  unsigned char buf[10240];
data/httptunnel-3.3+dfsg/common.c:297: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.
  unsigned char buf[10240];
data/httptunnel-3.3+dfsg/common.c:352:15:  [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 (p + 1);
data/httptunnel-3.3+dfsg/common.c:394:16:  [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).
  x = factor * atoi (s);
data/httptunnel-3.3+dfsg/htc.c:202:20:  [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).
	    debug_level = atoi (optarg);
data/httptunnel-3.3+dfsg/htc.c:208:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  debug_file = fopen (optarg, "w");
data/httptunnel-3.3+dfsg/htc.c:219: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).
	  arg->forward_port = atoi (optarg);
data/httptunnel-3.3+dfsg/htc.c:223: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).
	  arg->keep_alive = atoi (optarg);
data/httptunnel-3.3+dfsg/htc.c:227: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).
	  arg->max_connection_age = atoi (optarg);
data/httptunnel-3.3+dfsg/htc.c:252: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).
	  arg->proxy_buffer_timeout = atoi (optarg);
data/httptunnel-3.3+dfsg/htc.c:273:10:  [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).
	    f = open (optarg, O_RDONLY);
data/httptunnel-3.3+dfsg/htc.c:565:8:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	      strcpy (str, "Basic ");
data/httptunnel-3.3+dfsg/hts.c:163:20:  [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).
	    debug_level = atoi (optarg);
data/httptunnel-3.3+dfsg/hts.c:169:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  debug_file = fopen (optarg, "w");
data/httptunnel-3.3+dfsg/hts.c:195: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).
	  arg->keep_alive = atoi (optarg);
data/httptunnel-3.3+dfsg/hts.c:199: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).
	  arg->max_connection_age = atoi (optarg);
data/httptunnel-3.3+dfsg/hts.c:247:16:  [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).
	  arg->port = atoi (colon + 1);
data/httptunnel-3.3+dfsg/hts.c:250: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).
	arg->port = atoi (argv[optind]);
data/httptunnel-3.3+dfsg/hts.c:363: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).
      pid_file = fopen (arg.pid_filename, "w+");
data/httptunnel-3.3+dfsg/http.c:21: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 str[1024]; /* FIXME: possible buffer overflow */
data/httptunnel-3.3+dfsg/http.c:34:3:  [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 (str + n, "/index.html?crap=%ld", time (NULL));
data/httptunnel-3.3+dfsg/http.c:45:7:  [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 (str, "%d", length);
data/httptunnel-3.3+dfsg/http.c:292: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.
  unsigned char buf[2];
data/httptunnel-3.3+dfsg/http.c:326:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (data, buf, 2);
data/httptunnel-3.3+dfsg/http.c:506: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).
  response->major_version = atoi (data);
data/httptunnel-3.3+dfsg/http.c:519: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).
  response->minor_version = atoi (data);
data/httptunnel-3.3+dfsg/http.c:532:27:  [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).
  response->status_code = atoi (data);
data/httptunnel-3.3+dfsg/http.c:701: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).
  request->major_version = atoi (data);
data/httptunnel-3.3+dfsg/http.c:714: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).
  request->minor_version = atoi (data);
data/httptunnel-3.3+dfsg/http.c:750: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 str[1024]; /* FIXME: buffer overflow */
data/httptunnel-3.3+dfsg/http.c:823:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (v, value, n + 1);
data/httptunnel-3.3+dfsg/http.c:838:7:  [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 (h2->name, name, n + 1);
data/httptunnel-3.3+dfsg/port/daemon.c:31: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).
      open ("/dev/null", O_RDONLY);
data/httptunnel-3.3+dfsg/port/daemon.c:32: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).
      open ("/dev/null", O_WRONLY);
data/httptunnel-3.3+dfsg/port/daemon.c:33: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).
      open ("/dev/null", O_WRONLY);
data/httptunnel-3.3+dfsg/port/getopt.c:335:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
data/httptunnel-3.3+dfsg/port/getopt.c:447: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 (__getopt_nonoption_flags, orig_str, len);
data/httptunnel-3.3+dfsg/port/vsnprintf.c:24:7:  [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).
  f = fopen ("/dev/null", "w");
data/httptunnel-3.3+dfsg/port/vsnprintf.c:59:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (str, s, m);
data/httptunnel-3.3+dfsg/port/vsyslog.c:33:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[512];
data/httptunnel-3.3+dfsg/tunnel.c:81:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[65536];
data/httptunnel-3.3+dfsg/tunnel.c:651: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 auth_data[1] = { 42 }; /* dummy data, not used by server */
data/httptunnel-3.3+dfsg/tunnel.c:676:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char padding[65536];
data/httptunnel-3.3+dfsg/tunnel.c:741:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[10240];
data/httptunnel-3.3+dfsg/tunnel.c:890:7:  [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, tunnel->buf_ptr, n);
data/httptunnel-3.3+dfsg/tunnel.c:1161:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	      char str[1024];
data/httptunnel-3.3+dfsg/tunnel.c:1252:7:  [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 (&addr, hp->h_addr, hp->h_length);
data/httptunnel-3.3+dfsg/common.c:259:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      n = read (fd, buf, sizeof buf);
data/httptunnel-3.3+dfsg/common.c:361:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int n = strlen (s);
data/httptunnel-3.3+dfsg/common.h:82:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      m = read (fd, rbuf + n, len - n);
data/httptunnel-3.3+dfsg/htc.c:548:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			       strlen (arg.proxy_authorization),
data/httptunnel-3.3+dfsg/http.c:368:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m = write_all (fd, (void *)header->name, strlen (header->name));
data/httptunnel-3.3+dfsg/http.c:382:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m = write_all (fd, (void *)header->value, strlen (header->value));
data/httptunnel-3.3+dfsg/http.c:819: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).
  n = strlen (value);
data/httptunnel-3.3+dfsg/http.c:834:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      n = strlen (name);
data/httptunnel-3.3+dfsg/http.c:835:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      h2->name = malloc (strlen (name) + 1);
data/httptunnel-3.3+dfsg/port/getopt.c:240:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
extern int strlen (const char *);
data/httptunnel-3.3+dfsg/port/getopt.c:438:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/httptunnel-3.3+dfsg/port/getopt.c:662: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).
		== (unsigned int) strlen (p->name))
data/httptunnel-3.3+dfsg/port/getopt.c:686: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).
	  nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:718: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).
		  nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:734: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).
		  nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:739: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).
	  nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:850:51:  [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 ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/httptunnel-3.3+dfsg/port/getopt.c:873: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).
	    nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:893: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).
		    nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:907: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).
		    nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/port/getopt.c:911: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).
	    nextchar += strlen (nextchar);
data/httptunnel-3.3+dfsg/tunnel.c:763:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  n = read (tunnel->in_fd, buf, sizeof buf);
data/httptunnel-3.3+dfsg/tunnel.c:806:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  n = read (tunnel->in_fd, &req, 1);
data/httptunnel-3.3+dfsg/tunnel.c:1183:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if (write_all (tunnel->out_fd, str, strlen (str)) <= 0)
data/httptunnel-3.3+dfsg/tunnel.c:1196: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).
		  tunnel->out_total_raw += strlen (str);

ANALYSIS SUMMARY:

Hits = 106
Lines analyzed = 6181 in approximately 0.18 seconds (34235 lines/second)
Physical Source Lines of Code (SLOC) = 4707
Hits@level = [0]  72 [1]  25 [2]  50 [3]  14 [4]  17 [5]   0
Hits@level+ = [0+] 178 [1+] 106 [2+]  81 [3+]  31 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 37.816 [1+] 22.5197 [2+] 17.2084 [3+] 6.58594 [4+] 3.61164 [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.