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/vtun-3.0.4/lfd_legacy_encrypt.c
Examining data/vtun-3.0.4/tunnel.c
Examining data/vtun-3.0.4/llist.h
Examining data/vtun-3.0.4/driver.h
Examining data/vtun-3.0.4/generic/tap_dev.c
Examining data/vtun-3.0.4/generic/pipe_dev.c
Examining data/vtun-3.0.4/generic/tcp_proto.c
Examining data/vtun-3.0.4/generic/tun_dev.c
Examining data/vtun-3.0.4/generic/udp_proto.c
Examining data/vtun-3.0.4/generic/pty_dev.c
Examining data/vtun-3.0.4/linkfd.h
Examining data/vtun-3.0.4/vtun_socks.h
Examining data/vtun-3.0.4/linux/tap_dev.c
Examining data/vtun-3.0.4/linux/tun_dev.c
Examining data/vtun-3.0.4/freebsd/tun_dev.c
Examining data/vtun-3.0.4/openbsd/tun_dev.c
Examining data/vtun-3.0.4/lock.h
Examining data/vtun-3.0.4/lfd_zlib.c
Examining data/vtun-3.0.4/llist.c
Examining data/vtun-3.0.4/auth.h
Examining data/vtun-3.0.4/compat.h
Examining data/vtun-3.0.4/svr4/tap_dev.c
Examining data/vtun-3.0.4/svr4/tun_dev.c
Examining data/vtun-3.0.4/linkfd.c
Examining data/vtun-3.0.4/auth.c
Examining data/vtun-3.0.4/lfd_lzo.c
Examining data/vtun-3.0.4/lfd_shaper.c
Examining data/vtun-3.0.4/lib.c
Examining data/vtun-3.0.4/lib.h
Examining data/vtun-3.0.4/lock.c
Examining data/vtun-3.0.4/vtun.h
Examining data/vtun-3.0.4/main.c
Examining data/vtun-3.0.4/netlib.h
Examining data/vtun-3.0.4/netlib.c
Examining data/vtun-3.0.4/server.c
Examining data/vtun-3.0.4/cfg_kwords.h
Examining data/vtun-3.0.4/client.c
Examining data/vtun-3.0.4/lfd_encrypt.c

FINAL RESULTS:

data/vtun-3.0.4/freebsd/tun_dev.c:48:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
       sprintf(tunname, "/dev/%s", dev);
data/vtun-3.0.4/generic/pty_dev.c:57:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(sl_name, ptyname);
data/vtun-3.0.4/generic/pty_dev.c:78:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if( (access(ptyname, R_OK | W_OK)) < 0 ){
data/vtun-3.0.4/generic/pty_dev.c:82: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(sl_name,ptyname);
data/vtun-3.0.4/generic/tap_dev.c:45:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
       sprintf(tapname, "/dev/%s", dev);
data/vtun-3.0.4/generic/tun_dev.c:45:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
       sprintf(tunname, "/dev/%s", dev);
data/vtun-3.0.4/lfd_encrypt.c:290:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(tmpstr,"%s encryption initialized", cipher_name);
data/vtun-3.0.4/lfd_encrypt.c:449:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(tmpstr,"%s encryption initialized", cipher_name);
data/vtun-3.0.4/lfd_encrypt.c:539:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(tmpstr,"%s decryption initialized", cipher_name);
data/vtun-3.0.4/lib.c:88:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(title_start, name);
data/vtun-3.0.4/lib.c:102:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(buf, fmt, ap);
data/vtun-3.0.4/lib.c:108:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(title_start, buf);
data/vtun-3.0.4/lib.c:126:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(buf,sizeof(buf)-1, fmt, ap);
data/vtun-3.0.4/lib.c:327:6:  [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(cmd->prog, argv);
data/vtun-3.0.4/lib.c:362: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.
      vsnprintf(buf, sizeof(buf)-1, format, ap);
data/vtun-3.0.4/linkfd.c:418:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(file,"%s/%.20s.dump", VTUN_STAT_DIR, host->host);
data/vtun-3.0.4/linux/tun_dev.c:50:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
       sprintf(tunname, "/dev/%s", dev);
data/vtun-3.0.4/linux/tun_dev.c:54:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tunname, "/dev/%s", istun ? "tun" : "tap");
data/vtun-3.0.4/linux/tun_dev.c:60:11:  [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(dev, tunname + 5);
data/vtun-3.0.4/linux/tun_dev.c:107: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(dev, ifr.ifr_name);
data/vtun-3.0.4/lock.c:51:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(tmp_file, "%s_%d_tmp\n", file, pid);
data/vtun-3.0.4/lock.c:119:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(lock_file, "%s/%s", VTUN_LOCK_DIR, host->host);
data/vtun-3.0.4/lock.c:160:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(lock_file, "%s/%s", VTUN_LOCK_DIR, host->host);
data/vtun-3.0.4/main.c:165:15:  [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.
     if (vtun.syslog != LOG_DAEMON) {
data/vtun-3.0.4/main.c:168:56:  [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.
 	openlog("vtund", LOG_PID|LOG_NDELAY|LOG_PERROR, vtun.syslog);
data/vtun-3.0.4/openbsd/tun_dev.c:51:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
       sprintf(tunname, "/dev/%s", dev);
data/vtun-3.0.4/svr4/tun_dev.c:121: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(ifr.ifr_name, dev);
data/vtun-3.0.4/svr4/tun_dev.c:141: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(ifr.ifr_name, dev);
data/vtun-3.0.4/vtun.h:228:9:  [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.
   int  syslog; 	 /* Facility to log messages to syslog under */
data/vtun-3.0.4/auth.c:145:4:  [3] (random) srand:
  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.
   srand(seed);
data/vtun-3.0.4/main.c:116:18:  [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( (opt=getopt(argc,argv,"misf:P:L:t:npq46")) != EOF ){
data/vtun-3.0.4/auth.c:134:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if((fd=open("/dev/random",O_RDONLY))!=-1) {
data/vtun-3.0.4/auth.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 str[20], *ptr = str;
data/vtun-3.0.4/auth.c:206:9:  [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.
	ptr += sprintf(ptr,"S%d",host->spd_in);
data/vtun-3.0.4/auth.c:209:9:  [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.
	ptr += sprintf(ptr,"C%d", host->zlevel);
data/vtun-3.0.4/auth.c:212:9:  [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.
	ptr += sprintf(ptr,"L%d", host->zlevel);
data/vtun-3.0.4/auth.c:221:12:  [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.
	   ptr += sprintf(ptr,"E%d", host->cipher);
data/vtun-3.0.4/auth.c:327: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 str[VTUN_CHAL_SIZE*2+3], *chr="abcdefghijklmnop";
data/vtun-3.0.4/auth.c:365: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 chal_req[VTUN_CHAL_SIZE], chal_res[VTUN_CHAL_SIZE];	
data/vtun-3.0.4/auth.c:366: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[VTUN_MESG_SIZE], *str1, *str2;
data/vtun-3.0.4/auth.c:442: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[VTUN_MESG_SIZE], chal[VTUN_CHAL_SIZE];
data/vtun-3.0.4/freebsd/tun_dev.c:44: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 tunname[14];
data/vtun-3.0.4/freebsd/tun_dev.c:49:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       fd = open(tunname, O_RDWR);
data/vtun-3.0.4/freebsd/tun_dev.c:52:11:  [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(tunname, "/dev/tun%d", i);
data/vtun-3.0.4/freebsd/tun_dev.c:54:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          if( (fd=open(tunname, O_RDWR)) > 0 ){
data/vtun-3.0.4/freebsd/tun_dev.c:55:14:  [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(dev, "tun%d", i);
data/vtun-3.0.4/generic/pty_dev.c:62: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 ptyname[1024];
data/vtun-3.0.4/generic/tap_dev.c:41: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 tapname[14];
data/vtun-3.0.4/generic/tap_dev.c:46: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).
       return open(tapname, O_RDWR);
data/vtun-3.0.4/generic/tap_dev.c:50:8:  [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(tapname, "/dev/tap%d", i);
data/vtun-3.0.4/generic/tap_dev.c:52:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       if( (fd=open(tapname, O_RDWR)) > 0 ) {
data/vtun-3.0.4/generic/tap_dev.c:53:11:  [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(dev, "tap%d",i);
data/vtun-3.0.4/generic/tun_dev.c:41: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 tunname[14];
data/vtun-3.0.4/generic/tun_dev.c:46: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).
       return open(tunname, O_RDWR);
data/vtun-3.0.4/generic/tun_dev.c:50:8:  [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(tunname, "/dev/tun%d", i);
data/vtun-3.0.4/generic/tun_dev.c:52:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       if( (fd=open(tunname, O_RDWR)) > 0 ){
data/vtun-3.0.4/generic/tun_dev.c:53:11:  [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(dev, "tun%d", i);
data/vtun-3.0.4/lfd_encrypt.c:155: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 tmpstr[64];
data/vtun-3.0.4/lfd_encrypt.c:156: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 cipher_name[32];
data/vtun-3.0.4/lfd_encrypt.c:201:10:  [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(cipher_name,"AES-256-ECB");
data/vtun-3.0.4/lfd_encrypt.c:219:10:  [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(cipher_name,"AES-128-ECB");
data/vtun-3.0.4/lfd_encrypt.c:241:10:  [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(cipher_name,"Blowfish-256-ECB");
data/vtun-3.0.4/lfd_encrypt.c:263:10:  [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(cipher_name,"Blowfish-128-ECB");
data/vtun-3.0.4/lfd_encrypt.c:320: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(out_ptr,in,msg_len);
data/vtun-3.0.4/lfd_encrypt.c:369: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 tmpstr[64];
data/vtun-3.0.4/lfd_encrypt.c:370: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 cipher_name[32];
data/vtun-3.0.4/lfd_encrypt.c:376:10:  [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(cipher_name, "AES-256-OFB");
data/vtun-3.0.4/lfd_encrypt.c:381:10:  [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(cipher_name, "AES-256-CFB");
data/vtun-3.0.4/lfd_encrypt.c:386:10:  [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(cipher_name, "AES-256-CBC");
data/vtun-3.0.4/lfd_encrypt.c:391:10:  [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(cipher_name, "AES-128-OFB");
data/vtun-3.0.4/lfd_encrypt.c:395:10:  [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(cipher_name, "AES-128-CFB");
data/vtun-3.0.4/lfd_encrypt.c:399:10:  [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(cipher_name, "AES-128-CBC");
data/vtun-3.0.4/lfd_encrypt.c:405:10:  [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(cipher_name, "Blowfish-256-OFB");
data/vtun-3.0.4/lfd_encrypt.c:410:10:  [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(cipher_name, "Blowfish-256-CFB");
data/vtun-3.0.4/lfd_encrypt.c:416:10:  [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(cipher_name, "Blowfish-256-CBC");
data/vtun-3.0.4/lfd_encrypt.c:422:10:  [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(cipher_name, "Blowfish-128-OFB");
data/vtun-3.0.4/lfd_encrypt.c:427:10:  [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(cipher_name, "Blowfish-128-CFB");
data/vtun-3.0.4/lfd_encrypt.c:432:10:  [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(cipher_name, "Blowfish-128-CBC");
data/vtun-3.0.4/lfd_encrypt.c:460: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 tmpstr[64];
data/vtun-3.0.4/lfd_encrypt.c:461: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 cipher_name[32];
data/vtun-3.0.4/lfd_encrypt.c:467:10:  [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(cipher_name, "AES-256-OFB");
data/vtun-3.0.4/lfd_encrypt.c:472:10:  [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(cipher_name, "AES-256-CFB");
data/vtun-3.0.4/lfd_encrypt.c:477:10:  [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(cipher_name, "AES-256-CBC");
data/vtun-3.0.4/lfd_encrypt.c:482:10:  [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(cipher_name, "AES-128-OFB");
data/vtun-3.0.4/lfd_encrypt.c:486:10:  [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(cipher_name, "AES-128-CFB");
data/vtun-3.0.4/lfd_encrypt.c:490:10:  [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(cipher_name, "AES-128-CBC");
data/vtun-3.0.4/lfd_encrypt.c:496:10:  [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(cipher_name, "Blowfish-256-OFB");
data/vtun-3.0.4/lfd_encrypt.c:501:10:  [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(cipher_name, "Blowfish-256-CFB");
data/vtun-3.0.4/lfd_encrypt.c:506:10:  [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(cipher_name, "Blowfish-256-CBC");
data/vtun-3.0.4/lfd_encrypt.c:512:10:  [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(cipher_name, "Blowfish-128-OFB");
data/vtun-3.0.4/lfd_encrypt.c:517:10:  [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(cipher_name, "Blowfish-128-CFB");
data/vtun-3.0.4/lfd_encrypt.c:522:10:  [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(cipher_name, "Blowfish-128-CBC");
data/vtun-3.0.4/lfd_encrypt.c:559:10:  [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(in_ptr,iv,blocksize);
data/vtun-3.0.4/lfd_encrypt.c:599:13:  [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(iv, in_ptr+4, blocksize);
data/vtun-3.0.4/lfd_legacy_encrypt.c:96: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(out_ptr + pad, in_ptr, p);  
data/vtun-3.0.4/lib.c:95: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[255];
data/vtun-3.0.4/lib.c:119: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[VTUN_MESG_SIZE];
data/vtun-3.0.4/lib.c:156:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[10];
data/vtun-3.0.4/lib.c:179:6:  [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(buf,"%d",opt->lport);
data/vtun-3.0.4/lib.c:186:6:  [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(buf,"%d",opt->rport);
data/vtun-3.0.4/lib.c:205:17:  [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(nstr + np, optr, olen);
data/vtun-3.0.4/lib.c:287: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 *argv[50], *args;
data/vtun-3.0.4/lib.c:355: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[255];
data/vtun-3.0.4/linkfd.c:185: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 stm[20];
data/vtun-3.0.4/linkfd.c:411: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 file[40];
data/vtun-3.0.4/linkfd.c:419:23:  [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( (host->stat.file=fopen(file, "a")) ){
data/vtun-3.0.4/linux/tun_dev.c:46: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 tunname[14];
data/vtun-3.0.4/linux/tun_dev.c:51: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).
       return open(tunname, O_RDWR);
data/vtun-3.0.4/linux/tun_dev.c:57:8:  [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(tunname + 8, "%d", i);
data/vtun-3.0.4/linux/tun_dev.c:59:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       if( (fd=open(tunname, O_RDWR)) > 0 ) {
data/vtun-3.0.4/linux/tun_dev.c:90: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).
    if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
data/vtun-3.0.4/lock.c:44: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 tmp_file[255], str[20];
data/vtun-3.0.4/lock.c:52:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if( (fd = open(tmp_file, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0 ){
data/vtun-3.0.4/lock.c:57:9:  [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.
  pid = sprintf(str, "%d\n", pid);
data/vtun-3.0.4/lock.c:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char str[20];
data/vtun-3.0.4/lock.c:82:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if( (fd = open(file, O_RDONLY)) < 0)
data/vtun-3.0.4/lock.c:112: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 lock_file[255];
data/vtun-3.0.4/lock.c:155: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 lock_file[255];
data/vtun-3.0.4/main.c:135:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		vtun.bind_addr.port = atoi(optarg);
data/vtun-3.0.4/main.c:147:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	        vtun.timeout = atoi(optarg);	
data/vtun-3.0.4/main.c:226:16:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	if( dofork && vfork() )
data/vtun-3.0.4/main.c:231:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open("/dev/null", O_RDWR);
data/vtun-3.0.4/main.c:278: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 fn[1024];
data/vtun-3.0.4/main.c:292: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( !(f = fopen(fn, "w")) ) {
data/vtun-3.0.4/netlib.c:186: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(addr, ifa->ifa_addr, sizeof(*addr));
data/vtun-3.0.4/netlib.c:304: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 *ip, portstr[12];
data/vtun-3.0.4/netlib.c:325: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(addr, aiptr->ai_addr, aiptr->ai_addrlen);
data/vtun-3.0.4/netlib.c:360: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(addr, aiptr->ai_addr, aiptr->ai_addrlen);
data/vtun-3.0.4/openbsd/tun_dev.c:47: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 tunname[14];
data/vtun-3.0.4/openbsd/tun_dev.c:52:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       fd = open(tunname, O_RDWR);
data/vtun-3.0.4/openbsd/tun_dev.c:55:11:  [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(tunname, "/dev/tun%d", i);
data/vtun-3.0.4/openbsd/tun_dev.c:57:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          if( (fd=open(tunname, O_RDWR)) > 0 ){
data/vtun-3.0.4/openbsd/tun_dev.c:58:14:  [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(dev, "tun%d", i);
data/vtun-3.0.4/svr4/tap_dev.c:77: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).
       ppa = atoi(ptr);
data/vtun-3.0.4/svr4/tap_dev.c:84:18:  [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( (ip_fd = open("/dev/ip", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tap_dev.c:89:19:  [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( (tap_fd = open("/dev/tap", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tap_dev.c:100:18:  [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( (if_fd = open("/dev/tap", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tap_dev.c:119:5:  [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(dev, "tap%d", ppa);
data/vtun-3.0.4/svr4/tun_dev.c:79: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).
       ppa = atoi(ptr);
data/vtun-3.0.4/svr4/tun_dev.c:82:18:  [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( (ip_fd = open("/dev/udp", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tun_dev.c:87:19:  [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( (tun_fd = open("/dev/tun", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tun_dev.c:98:18:  [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( (if_fd = open("/dev/tun", O_RDWR, 0)) < 0){
data/vtun-3.0.4/svr4/tun_dev.c:118:5:  [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(dev, "tun%d", ppa);
data/vtun-3.0.4/tunnel.c:75: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 dev[VTUN_DEV_LEN]="";
data/vtun-3.0.4/tunnel.c:164:20:  [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[1] = open(dev, O_RDWR)) < 0){
data/vtun-3.0.4/tunnel.c:170: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).
		    null_fd = open("/dev/null", O_RDWR);
data/vtun-3.0.4/auth.c:74: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).
   register int i, xor_len = strlen(xor_msk);
data/vtun-3.0.4/auth.c:103:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   BF_set_key(&key, 16, MD5((unsigned char *)pwd,strlen(pwd),NULL));
data/vtun-3.0.4/auth.c:116:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   BF_set_key(&key, 16, MD5((unsigned char *)pwd,strlen(pwd),NULL));
data/vtun-3.0.4/auth.c:138:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         cnt=read(fd,pseed,len);
data/vtun-3.0.4/auth.c:219:12:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	   ptr += sprintf(ptr,"E");
data/vtun-3.0.4/auth.c:225:6:  [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(ptr,">");
data/vtun-3.0.4/auth.c:351:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if( !strtok(ptr,">") || strlen(ptr) != VTUN_CHAL_SIZE*2 )
data/vtun-3.0.4/freebsd/tun_dev.c:82:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, buf, len);
data/vtun-3.0.4/generic/pipe_dev.c:53:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, buf, len);
data/vtun-3.0.4/generic/pty_dev.c:97:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, buf, len);
data/vtun-3.0.4/generic/tap_dev.c:74:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, buf, len);
data/vtun-3.0.4/generic/tun_dev.c:73:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, buf, len);
data/vtun-3.0.4/lfd_encrypt.c:124: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).
      tmplen = strlen(host->passwd);
data/vtun-3.0.4/lfd_encrypt.c:132: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).
      MD5((unsigned char *)host->passwd,strlen(host->passwd), (unsigned char *)hashkey);
data/vtun-3.0.4/lfd_encrypt.c:557:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
         strncpy(in_ptr,"ivec",4);
data/vtun-3.0.4/lfd_encrypt.c:669:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
      strncpy(in_ptr,"seq#",4);
data/vtun-3.0.4/lfd_encrypt.c:681:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
      strncpy(in_ptr,"rsyn",4);
data/vtun-3.0.4/lfd_legacy_encrypt.c:74:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   BF_set_key(&key, ENC_KEY_SIZE, MD5(host->passwd,strlen(host->passwd),NULL));
data/vtun-3.0.4/lib.c:82: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).
	       title_end = argv[i] + strlen(argv[i]) + 1;
data/vtun-3.0.4/lib.c:86: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).
	       title_end = envp[i] + strlen(envp[i]) + 1;
data/vtun-3.0.4/lib.c:89: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).
	title_start += strlen(name);
data/vtun-3.0.4/lib.c:105:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if( strlen(buf) > title_size - 1)
data/vtun-3.0.4/lib.c:160: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).
    slen = strlen(str) + 1;
data/vtun-3.0.4/lib.c:198: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).
                olen = strlen(optr);
data/vtun-3.0.4/lib.h:77:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  if( (w = read(fd, buf, len)) < 0 ){
data/vtun-3.0.4/linux/tun_dev.c:96:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
       strncpy(ifr.ifr_name, dev, IFNAMSIZ);
data/vtun-3.0.4/linux/tun_dev.c:131:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int tun_read(int fd, char *buf, int len) { return read(fd, buf, len); }
data/vtun-3.0.4/linux/tun_dev.c:132:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int tap_read(int fd, char *buf, int len) { return read(fd, buf, len); }
data/vtun-3.0.4/lock.c:85:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  pid = read(fd,str,sizeof(str));
data/vtun-3.0.4/tunnel.c:84:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dev, host->dev, VTUN_DEV_LEN);

ANALYSIS SUMMARY:

Hits = 176
Lines analyzed = 6361 in approximately 0.18 seconds (34783 lines/second)
Physical Source Lines of Code (SLOC) = 4180
Hits@level = [0]  42 [1]  30 [2] 115 [3]   2 [4]  29 [5]   0
Hits@level+ = [0+] 218 [1+] 176 [2+] 146 [3+]  31 [4+]  29 [5+]   0
Hits/KSLOC@level+ = [0+] 52.1531 [1+] 42.1053 [2+] 34.9282 [3+] 7.41627 [4+] 6.9378 [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.