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/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c
Examining data/libvncserver-0.9.13+dfsg/client_examples/backchannel.c
Examining data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c
Examining data/libvncserver-0.9.13+dfsg/client_examples/ppmtest.c
Examining data/libvncserver-0.9.13+dfsg/client_examples/vnc2mpg.c
Examining data/libvncserver-0.9.13+dfsg/common/base64.c
Examining data/libvncserver-0.9.13+dfsg/common/base64.h
Examining data/libvncserver-0.9.13+dfsg/common/crypto.h
Examining data/libvncserver-0.9.13+dfsg/common/crypto_included.c
Examining data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c
Examining data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c
Examining data/libvncserver-0.9.13+dfsg/common/d3des.c
Examining data/libvncserver-0.9.13+dfsg/common/d3des.h
Examining data/libvncserver-0.9.13+dfsg/common/lzoconf.h
Examining data/libvncserver-0.9.13+dfsg/common/lzodefs.h
Examining data/libvncserver-0.9.13+dfsg/common/minilzo.c
Examining data/libvncserver-0.9.13+dfsg/common/minilzo.h
Examining data/libvncserver-0.9.13+dfsg/common/sha-private.h
Examining data/libvncserver-0.9.13+dfsg/common/sha.h
Examining data/libvncserver-0.9.13+dfsg/common/sha1.c
Examining data/libvncserver-0.9.13+dfsg/common/sockets.h
Examining data/libvncserver-0.9.13+dfsg/common/turbojpeg.c
Examining data/libvncserver-0.9.13+dfsg/common/turbojpeg.h
Examining data/libvncserver-0.9.13+dfsg/common/vncauth.c
Examining data/libvncserver-0.9.13+dfsg/common/zywrletemplate.c
Examining data/libvncserver-0.9.13+dfsg/examples/1instance.c
Examining data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c
Examining data/libvncserver-0.9.13+dfsg/examples/backchannel.c
Examining data/libvncserver-0.9.13+dfsg/examples/blooptest.c
Examining data/libvncserver-0.9.13+dfsg/examples/camera.c
Examining data/libvncserver-0.9.13+dfsg/examples/colourmaptest.c
Examining data/libvncserver-0.9.13+dfsg/examples/cursors.c
Examining data/libvncserver-0.9.13+dfsg/examples/example.c
Examining data/libvncserver-0.9.13+dfsg/examples/filetransfer.c
Examining data/libvncserver-0.9.13+dfsg/examples/fontsel.c
Examining data/libvncserver-0.9.13+dfsg/examples/mac.c
Examining data/libvncserver-0.9.13+dfsg/examples/pnmshow.c
Examining data/libvncserver-0.9.13+dfsg/examples/pnmshow24.c
Examining data/libvncserver-0.9.13+dfsg/examples/radon.h
Examining data/libvncserver-0.9.13+dfsg/examples/regiontest.c
Examining data/libvncserver-0.9.13+dfsg/examples/repeater.c
Examining data/libvncserver-0.9.13+dfsg/examples/rotate.c
Examining data/libvncserver-0.9.13+dfsg/examples/rotatetemplate.c
Examining data/libvncserver-0.9.13+dfsg/examples/simple.c
Examining data/libvncserver-0.9.13+dfsg/examples/simple15.c
Examining data/libvncserver-0.9.13+dfsg/examples/storepasswd.c
Examining data/libvncserver-0.9.13+dfsg/examples/vncev.c
Examining data/libvncserver-0.9.13+dfsg/examples/zippy.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/corre.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/cursor.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/hextile.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/listen.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/rre.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/sasl.h
Examining data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/tight.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/tls.h
Examining data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/tls_none.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/trle.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/zlib.c
Examining data/libvncserver-0.9.13+dfsg/libvncclient/zrle.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/auth.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/corre.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/cutpaste.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/draw.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/font.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/hextile.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/main.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/private.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbregion.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_gnutls.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_none.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_openssl.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/rre.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/scale.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/scale.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/selbox.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/stats.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tableinit24.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tableinitcmtemplate.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tableinittctemplate.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tabletrans24template.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tabletranstemplate.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tight.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightproto.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightserver.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/translate.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/ultra.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zlib.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrle.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrleencodetemplate.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrleoutstream.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrleoutstream.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrlepalettehelper.c
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrlepalettehelper.h
Examining data/libvncserver-0.9.13+dfsg/libvncserver/zrletypes.h
Examining data/libvncserver-0.9.13+dfsg/rfb/default8x16.h
Examining data/libvncserver-0.9.13+dfsg/rfb/keysym.h
Examining data/libvncserver-0.9.13+dfsg/rfb/rfb.h
Examining data/libvncserver-0.9.13+dfsg/rfb/rfbclient.h
Examining data/libvncserver-0.9.13+dfsg/rfb/rfbproto.h
Examining data/libvncserver-0.9.13+dfsg/rfb/rfbregion.h
Examining data/libvncserver-0.9.13+dfsg/rfb/threading.h
Examining data/libvncserver-0.9.13+dfsg/test/blooptest.c
Examining data/libvncserver-0.9.13+dfsg/test/bmp.c
Examining data/libvncserver-0.9.13+dfsg/test/bmp.h
Examining data/libvncserver-0.9.13+dfsg/test/cargstest.c
Examining data/libvncserver-0.9.13+dfsg/test/copyrecttest.c
Examining data/libvncserver-0.9.13+dfsg/test/encodingstest.c
Examining data/libvncserver-0.9.13+dfsg/test/tjbench.c
Examining data/libvncserver-0.9.13+dfsg/test/tjunittest.c
Examining data/libvncserver-0.9.13+dfsg/test/tjutil.c
Examining data/libvncserver-0.9.13+dfsg/test/tjutil.h
Examining data/libvncserver-0.9.13+dfsg/test/wstest.c

FINAL RESULTS:

data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:269:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(logfile,buf);
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:271:5:  [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(logfile, format, args);
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:520: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, 255, format, args);
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:577:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf (stdout, format, args);
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:81:33:  [4] (crypto) EVP_des_ecb:
  DES only supports a 56-bit keysize, which is too small given today's
  computers (CWE-327). Use a different patent-free encryption algorithm with
  a larger keysize, such as 3DES or AES.
    if(!EVP_EncryptInit_ex(des, EVP_des_ecb(), NULL, mungedkey, NULL))
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:105:33:  [4] (crypto) EVP_des_ecb:
  DES only supports a 56-bit keysize, which is too small given today's
  computers (CWE-327). Use a different patent-free encryption algorithm with
  a larger keysize, such as 3DES or AES.
    if(!EVP_DecryptInit_ex(des, EVP_des_ecb(), NULL, mungedkey, NULL))
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:483:7:  [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(KBD_DEVICE, argv[i]);
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:487:7:  [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(TOUCH_DEVICE, argv[i]);
data/libvncserver-0.9.13+dfsg/examples/fontsel.c:31: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(buffer,FONTDIR);
data/libvncserver-0.9.13+dfsg/examples/fontsel.c:32:3:  [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(buffer,fontlist[index]);
data/libvncserver-0.9.13+dfsg/examples/vncev.c:64:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(x,keys[j&0x3ff]);
data/libvncserver-0.9.13+dfsg/examples/vncev.c:66:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	    strcat(x,buffer+strlen("#define "));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:89:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   sprintf(buffer,"%s: %s (0x%x)",
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:92:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, format, args);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:391:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
  if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2 || major != 0 || minor != 0) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:544:13:  [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(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:918:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
  if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:962:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(pv,rfbProtocolVersionFormat,client->major,client->minor);
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:48: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.
#  define snprintf _snprintf /* MSVC went straight to the underscored syntax */
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:48:20:  [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.
#  define snprintf _snprintf /* MSVC went straight to the underscored syntax */
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:58:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%s;%hu", host, (unsigned short)port);
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:129:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   strcpy((char *)lsec->data, password);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:515: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(addr.sun_path, sockFile);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:364:13:  [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(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:33:9:  [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.
#define snprintf _snprintf
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:33:18:  [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.
#define snprintf _snprintf
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:493:13:  [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(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:288: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(fullFname, rfbScreen->httpDir);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:375:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (sscanf(buf, "GET %s HTTP/1.", fname) != 1) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:520:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		    sprintf(str, "%s:%d", rfbScreen->thisHost, rfbScreen->port-5900);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:599:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(param_request, tail);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:625:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(param_formatted,
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:631: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(result, param_formatted);
data/libvncserver-0.9.13+dfsg/libvncserver/main.c:256:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, format, args);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbregion.c:91:5:  [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(text); 
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:482:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(pv,rfbProtocolVersionFormat,rfbScreen->protocolMajorVersion, 
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:689:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) {
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1082:5:  [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(buffer, sizeof(buffer)-1, fmt, ap);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1299:7:  [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(unixPath, &path[2]);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1309:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(unixPath, home);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1311:9:  [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(unixPath, path);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1314:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(unixPath, path);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1327:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path,"C:%s", unixPath);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1413:13:  [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((char *)win32filename.cFileName, winFindData.cFileName);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1414:13:  [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((char *)win32filename.cAlternateFileName, winFindData.cAlternateFileName);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1432:13:  [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((char *)win32filename.cFileName, direntp->d_name);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1730:15:  [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(buffer, timespec);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.c:67: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(fileListItemInfoPtr[fileListInfoPtr->numEntries].name, name);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:183:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s%s", GetFtpRoot(), "/");
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:266:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s%s", GetFtpRoot(), "/");
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:285:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(fullpath, path);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:288:4:  [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(fullpath, pDirent->d_name);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:390: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(pFileNames, GetFileNameAt(fileListInfo, i));
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:243:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s%s", ftproot, p);
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:313:15:  [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.
        len = snprintf(response, WEBSOCKETS_MAX_HANDSHAKE_LEN,
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:316:15:  [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.
        len = snprintf(response, WEBSOCKETS_MAX_HANDSHAKE_LEN,
data/libvncserver-0.9.13+dfsg/test/bmp.c:121:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if(sscanf(temps, "%s", temps2)==1 && temps2[1]=='#') continue;
data/libvncserver-0.9.13+dfsg/test/cargstest.c:16:39:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define CHECK(a,b) if(screen->a!=b) { fprintf(stderr,#a " is %d (should be " #b ")\n",screen->a); ret=1; }
data/libvncserver-0.9.13+dfsg/test/encodingstest.c:276:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/libvncserver-0.9.13+dfsg/test/tjbench.c:72:2:  [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(buf, len, format, val);
data/libvncserver-0.9.13+dfsg/test/tjutil.h:32: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.
		#define snprintf(str, n, format, ...)  \
data/libvncserver-0.9.13+dfsg/test/wstest.c:84:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  size_t off = vsnprintf(el_pos, left, fmt, args);
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:258:14:  [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.
	logfile_str=getenv("VNCLOG");
data/libvncserver-0.9.13+dfsg/common/vncauth.c:50:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define srandom srand
data/libvncserver-0.9.13+dfsg/common/vncauth.c:50:17:  [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.
#define srandom srand
data/libvncserver-0.9.13+dfsg/common/vncauth.c:51:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define random rand
data/libvncserver-0.9.13+dfsg/common/vncauth.c:168:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom((unsigned int)time(NULL) ^ (unsigned int)getpid());
data/libvncserver-0.9.13+dfsg/common/vncauth.c:173:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	bytes[i] = (unsigned char)(random() & 255);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:717:3:  [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(time(NULL));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:278:16:  [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* user=getenv("USER");
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1302:14:  [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.
      home = getenv("HOME");
data/libvncserver-0.9.13+dfsg/rfb/threading.h:64:39:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define LOCK(mutex)                   EnterCriticalSection(&(mutex))
data/libvncserver-0.9.13+dfsg/rfb/threading.h:68:39:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#define INIT_MUTEX(mutex)             InitializeCriticalSection(&(mutex))
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:41:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
 #define random() rand()
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:404:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
					if(random()<RAND_MAX/2) srcBuf[i]=0;
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:422:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
					if(random()<RAND_MAX/2) srcBuf[i]=0;
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:445:2:  [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((unsigned int)time(NULL));
data/libvncserver-0.9.13+dfsg/test/wstest.c:175:3:  [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(RND_SEED);
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:187:43:  [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 rfbKeySym utf8char2rfbKeySym(const char chr[4]) {
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:251: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[256];
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:263:13:  [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).
    logfile=fopen(logfile_str,"a");
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:195: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[256];
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:512: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[256];
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:568: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[256];
data/libvncserver-0.9.13+dfsg/client_examples/ppmtest.c:37:4:  [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("framebuffer.ppm","wb");
data/libvncserver-0.9.13+dfsg/client_examples/vnc2mpg.c:429:30:  [2] (integer) atol:
  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).
                    max_time=atol(argv[i+1]);
data/libvncserver-0.9.13+dfsg/common/crypto.h:23:60:  [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.
int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len);
data/libvncserver-0.9.13+dfsg/common/crypto.h:29:60:  [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.
int decrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len);
data/libvncserver-0.9.13+dfsg/common/crypto.h:32:63:  [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.
int encrypt_aes128ecb(void *out, int *out_len, const unsigned char key[16], const void *in, const size_t in_len);
data/libvncserver-0.9.13+dfsg/common/crypto_included.c:54:60:  [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.
int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_included.c:67:60:  [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.
int decrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_included.c:80:63:  [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.
int encrypt_aes128ecb(void *out, int *out_len, const unsigned char key[16], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:68: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(out, digest, gcry_md_get_algo_dlen(GCRY_MD_MD5));
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:93: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(out, digest, gcry_md_get_algo_dlen(GCRY_MD_SHA1));
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:107:60:  [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.
int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:112:14:  [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 mungedkey[8];
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:139:60:  [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.
int decrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:144:14:  [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 mungedkey[8];
data/libvncserver-0.9.13+dfsg/common/crypto_libgcrypt.c:172:63:  [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.
int encrypt_aes128ecb(void *out, int *out_len, const unsigned char key[16], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:69:60:  [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.
int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:73:14:  [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 mungedkey[8];
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:93:60:  [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.
int decrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:97:14:  [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 mungedkey[8];
data/libvncserver-0.9.13+dfsg/common/crypto_openssl.c:117:63:  [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.
int encrypt_aes128ecb(void *out, int *out_len, const unsigned char key[16], const void *in, const size_t in_len)
data/libvncserver-0.9.13+dfsg/common/d3des.c:67:23:  [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 const unsigned char pc1[56] = {
data/libvncserver-0.9.13+dfsg/common/d3des.c:73:23:  [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 const unsigned char totrot[16] = {
data/libvncserver-0.9.13+dfsg/common/d3des.c:76:23:  [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 const unsigned char pc2[48] = {
data/libvncserver-0.9.13+dfsg/common/d3des.c:86:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char pc1m[56], pcr[56];
data/libvncserver-0.9.13+dfsg/common/lzodefs.h:1682:73:  [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.
#  define __lzo_byte_struct(s,n)        __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
data/libvncserver-0.9.13+dfsg/common/lzodefs.h:1683:76:  [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.
#  define __lzo_byte_struct_ma(s,n)     __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
data/libvncserver-0.9.13+dfsg/common/lzodefs.h:1685:61:  [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.
#  define __lzo_byte_struct(s,n)        struct s { unsigned char a[n]; } __attribute__((__packed__));
data/libvncserver-0.9.13+dfsg/common/lzodefs.h:1686:61:  [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.
#  define __lzo_byte_struct_ma(s,n)     struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
data/libvncserver-0.9.13+dfsg/common/minilzo.c:1702:73:  [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.
#  define __lzo_byte_struct(s,n)        __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
data/libvncserver-0.9.13+dfsg/common/minilzo.c:1703:76:  [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.
#  define __lzo_byte_struct_ma(s,n)     __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
data/libvncserver-0.9.13+dfsg/common/minilzo.c:1705:61:  [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.
#  define __lzo_byte_struct(s,n)        struct s { unsigned char a[n]; } __attribute__((__packed__));
data/libvncserver-0.9.13+dfsg/common/minilzo.c:1706:61:  [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.
#  define __lzo_byte_struct_ma(s,n)     struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3141: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.
#  undef memcpy
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3142: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.
#  define memcpy(a,b,c)         lzo_memcpy(a,b,c)
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3145:33:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define lzo_memcpy(a,b,c)     memcpy(a,b,c)
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3376:41:  [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.
struct lzo_memops_TU2_struct { unsigned char a[2]; } __lzo_may_alias;
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3391:41:  [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.
struct lzo_memops_TU4_struct { unsigned char a[4]; } __lzo_may_alias;
data/libvncserver-0.9.13+dfsg/common/minilzo.c:3406:41:  [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.
struct lzo_memops_TU8_struct { unsigned char a[8]; } __lzo_may_alias;
data/libvncserver-0.9.13+dfsg/common/minilzo.c:4054:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return memcpy(dest, src, len);
data/libvncserver-0.9.13+dfsg/common/minilzo.c:4119:14:  [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 b[2*LZO_MAX(8,sizeof(lzo_uint))];
data/libvncserver-0.9.13+dfsg/common/sha.h:218:14:  [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 k_opad[USHA_Max_Message_Block_Size];
data/libvncserver-0.9.13+dfsg/common/sha.h:233:14:  [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 prk[USHAMaxHashSize];
data/libvncserver-0.9.13+dfsg/common/sha.h:331:53:  [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 int hkdf(SHAversion whichSha, const unsigned char *salt,
data/libvncserver-0.9.13+dfsg/common/sha.h:332:46:  [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.
                int salt_len, const unsigned char *ikm, int ikm_len,
data/libvncserver-0.9.13+dfsg/common/sha.h:333:32:  [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.
                const unsigned char *info, int info_len,
data/libvncserver-0.9.13+dfsg/common/sha.h:335:60:  [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 int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
data/libvncserver-0.9.13+dfsg/common/sha.h:336:53:  [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.
                       int salt_len, const unsigned char *ikm,
data/libvncserver-0.9.13+dfsg/common/sha.h:339:51:  [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.
                      int prk_len, const unsigned char *info,
data/libvncserver-0.9.13+dfsg/common/sha.h:355:38:  [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.
                      const unsigned char *info, int info_len,
data/libvncserver-0.9.13+dfsg/common/turbojpeg.c:59:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char errStr[JMSG_LENGTH_MAX]="No error";
data/libvncserver-0.9.13+dfsg/common/vncauth.c:70:17:  [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 unsigned char fixedkey[8] = {23,82,107,6,35,78,88,7};
data/libvncserver-0.9.13+dfsg/common/vncauth.c:83:14:  [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 encryptedPasswd[8];
data/libvncserver-0.9.13+dfsg/common/vncauth.c:86:15:  [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(fname,"w")) == NULL) return 1;
data/libvncserver-0.9.13+dfsg/common/vncauth.c:130: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 (!passwd || (fp = fopen(fname,"r")) == NULL) {
data/libvncserver-0.9.13+dfsg/common/vncauth.c:186:14:  [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 key[8];
data/libvncserver-0.9.13+dfsg/common/zywrletemplate.c:167:21:  [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 const signed char zywrleConv[4][256]={
data/libvncserver-0.9.13+dfsg/examples/1instance.c:23: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).
    str->fd=open(str->filename,O_NONBLOCK|O_RDONLY);
data/libvncserver-0.9.13+dfsg/examples/1instance.c:25: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).
    str->fd=open(str->filename,O_NONBLOCK|O_WRONLY);
data/libvncserver-0.9.13+dfsg/examples/1instance.c:28: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).
      str->fd=open(str->filename,O_NONBLOCK|O_RDONLY);
data/libvncserver-0.9.13+dfsg/examples/1instance.c:66: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).
      str->fd=open(str->filename,O_NONBLOCK|O_RDONLY);
data/libvncserver-0.9.13+dfsg/examples/1instance.c:80: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[1024];
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:49:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char KBD_DEVICE[256] = "/dev/input/event3";
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:50:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char TOUCH_DEVICE[256] = "/dev/input/event1";
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:93:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fbfd = open(FB_DEVICE, O_RDONLY)) == -1)
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:133:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if((kbdfd = open(KBD_DEVICE, O_RDWR)) == -1)
data/libvncserver-0.9.13+dfsg/examples/androidvncserver.c:151:23:  [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((touchfd = open(TOUCH_DEVICE, O_RDWR)) == -1)
data/libvncserver-0.9.13+dfsg/examples/camera.c:85: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((char *)&then, (char *)&now, sizeof(struct timeval));
data/libvncserver-0.9.13+dfsg/examples/fontsel.c:13:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *fontlist[50]={
data/libvncserver-0.9.13+dfsg/examples/fontsel.c:24: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[1024];
data/libvncserver-0.9.13+dfsg/examples/mac.c:597:15:  [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(backBuffer,
data/libvncserver-0.9.13+dfsg/examples/mac.c:675: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).
      maxSecsToConnect = atoi(argv[i+1])/1000;
data/libvncserver-0.9.13+dfsg/examples/mac.c:684:18:  [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).
	displayNumber = atoi(argv[i+1]);
data/libvncserver-0.9.13+dfsg/examples/pnmshow.c:20: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[1024];
data/libvncserver-0.9.13+dfsg/examples/pnmshow.c:26:8:  [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).
    in=fopen(argv[1],"rb");
data/libvncserver-0.9.13+dfsg/examples/pnmshow24.c:30: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[1024];
data/libvncserver-0.9.13+dfsg/examples/pnmshow24.c:34:8:  [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).
    in=fopen(argv[1],"rb");
data/libvncserver-0.9.13+dfsg/examples/radon.h:1:17:  [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 unsigned char radonFontData[2280]={
data/libvncserver-0.9.13+dfsg/examples/repeater.c:14: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 id[250];
data/libvncserver-0.9.13+dfsg/examples/repeater.c:33: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).
  repeaterPort = argc < 4 ? 5500 : atoi(argv[3]);
data/libvncserver-0.9.13+dfsg/examples/rotatetemplate.c:15:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer, newBuffer, w * h * sizeof(OUT_T));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:20:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char f[width*height];
data/libvncserver-0.9.13+dfsg/examples/vncev.c:37:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/libvncserver-0.9.13+dfsg/examples/vncev.c:38: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).
   FILE* keysyms=fopen("keysym.h","r");
data/libvncserver-0.9.13+dfsg/examples/vncev.c:87:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024+32];
data/libvncserver-0.9.13+dfsg/examples/vncev.c:96:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/libvncserver-0.9.13+dfsg/examples/vncev.c:98: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(buffer,"Ptr: mouse button mask 0x%x at %d,%d",buttonMask,x,y);
data/libvncserver-0.9.13+dfsg/examples/vncev.c:106:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[1024];
data/libvncserver-0.9.13+dfsg/examples/vncev.c:113:4:  [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(buffer,"Client connected from ip %d.%d.%d.%d",
data/libvncserver-0.9.13+dfsg/examples/zippy.c:107: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(i,j+y1),ADDR(x1,y1),bpp);
data/libvncserver-0.9.13+dfsg/examples/zippy.c:108: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(i,j+y3),ADDR(x1,y3),bpp);
data/libvncserver-0.9.13+dfsg/examples/zippy.c:109: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(i,j+y4),ADDR(x1,y4),bpp);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:80: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[256];
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:299:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[10];
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:307: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).
    rec->file = fopen(client->serverHost,"rb");
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:367: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 tmphost[250];
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:471: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 buf1[500],buf2[10];
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:826: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(userpass, cred->userCredential.username, usernameLen);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:827: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(userpass+sizeof(userpass)/2, cred->userCredential.password, passwordLen);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:1161: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 bytes[sz_rfbSetEncodingsMsg + MAX_ENCODINGS*4];
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:2253:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[256];
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:187: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[INET6_ADDRSTRLEN];
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:552: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(out,
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:116: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(out, client->bufoutptr, n);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:125: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(out, client->bufoutptr, client->buffered);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:181: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(out, client->bufoutptr, n);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:426: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 port_s[10];
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:628: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 port_str[8];
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:863: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 c, str[17];
data/libvncserver-0.9.13+dfsg/libvncclient/tight.c:300:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(client->buffer, &client->buffer[numRows * rowSize], extraBytes);
data/libvncserver-0.9.13+dfsg/libvncclient/tight.c:363: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 (&dst[y*client->width],
data/libvncserver-0.9.13+dfsg/libvncclient/tight.c:419: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(client->tightPrevRow, thisRow, client->rectWidth * 3);
data/libvncserver-0.9.13+dfsg/libvncclient/tight.c:477: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(thatRow, thisRow, client->rectWidth * 3 * sizeof(uint16_t));
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:319: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 buf1[500],buf2[10];
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:448: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 buf1[500],buf2[10];
data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c:192: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((char *)&sx, ptr, 2); ptr += 2;
data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c:193: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((char *)&sy, ptr, 2); ptr += 2;
data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c:194: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((char *)&sw, ptr, 2); ptr += 2;
data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c:195: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((char *)&sh, ptr, 2); ptr += 2;
data/libvncserver-0.9.13+dfsg/libvncclient/ultra.c:196: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((char *)&se, ptr, 4); ptr += 4;
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:156: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(client->frameBuffer + j, buffer, rs); \
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:445:34:  [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).
	client->appData.compressLevel = atoi(argv[i+1]);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:448:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	client->appData.qualityLevel = atoi(argv[i+1]);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:451:40:  [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).
        client->appData.scaleSetting = atoi(argv[i+1]);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:454: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).
        client->QoS_DSCP = atoi(argv[i+1]);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:466: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).
	  client->destPort = atoi(colon+1);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:479: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).
	    client->serverPort = atoi(colon+1);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:96: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).
	    rfbScreen->port = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:103: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).
	    rfbScreen->ipv6port = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:110:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    rfbScreen->maxClientWait = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:142: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).
            rfbScreen->deferUpdateTime = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:148:45:  [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).
            rfbScreen->deferPtrUpdateTime = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:172: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).
            rfbScreen->httpPort = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:179: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).
            rfbScreen->http6Port = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:188:49:  [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).
            rfbScreen->progressiveSliceHeight = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:251: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).
               *bpp = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:253: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).
               *width = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/cargs.c:255: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).
               *height = atoi(argv[++i]);
data/libvncserver-0.9.13+dfsg/libvncserver/corre.c:172: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/corre.c:178: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(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbRREHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/corre.c:189:9:  [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(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
data/libvncserver-0.9.13+dfsg/libvncserver/corre.c:289: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(&client->afterEncBuf[client->afterEncBufLen],&subrect,sz_rfbCoRRERectangle); \
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:77:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:117: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(&cl->updateBuf[cl->ublen], (char *)&rect,sz_rfbFramebufferUpdateRectHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:131:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cl->updateBuf[cl->ublen], (char *)&colors, sz_rfbXCursorColors);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:196: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:209:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char rfbReverseByte[0x100] = {
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:497:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       if(cursor->source[j*w+i/8]&bit) memcpy(cp,fore,bpp);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:498: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.
       else memcpy(cp,back,bpp);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:535: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(s->frameBuffer+(y1+j)*rowstride+x1*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:593:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       memcpy(dest,src,count);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:687: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(dest, &val, bpp);
data/libvncserver-0.9.13+dfsg/libvncserver/cursor.c:695: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(s->frameBuffer+(j+y1)*rowstride+(i+x1)*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/draw.c:13: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(s->frameBuffer+j*rowstride+i*bpp,colour,bpp);
data/libvncserver-0.9.13+dfsg/libvncserver/draw.c:18: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(s->frameBuffer+(y)*rowstride+(x)*bpp,colour,bpp)
data/libvncserver-0.9.13+dfsg/libvncserver/font.c:29:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rfbScreen->frameBuffer+(y+j)*rowstride+(x+i)*bpp,colour,bpp);
data/libvncserver-0.9.13+dfsg/libvncserver/font.c:89: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(rfbScreen->frameBuffer+(y+j)*rowstride+(x+i)*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/font.c:92: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(rfbScreen->frameBuffer+(y+j)*rowstride+(x+i)*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/font.c:166: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).
  FILE *f=fopen(filename,"rb");
data/libvncserver-0.9.13+dfsg/libvncserver/hextile.c:59: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/hextile.c:181: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(&cl->updateBuf[cl->ublen], (char *)clientPixelData,      \
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:85:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char buf[BUF_SIZE];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:218:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:269: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 fullFname[512];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:270: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 params[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:276: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 str[256+32];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:337:9:  [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).
	    if(atoi(strchr(buf, ':')+1)!=rfbScreen->port) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:392: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 host[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:427:2:  [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(fname, "/index.vnc");
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:439:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = fopen(fullFname, "r")) == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:491: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", rfbScreen->width);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:496: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", rfbScreen->height);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:501: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", rfbScreen->width);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:506: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", rfbScreen->height + 32);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:511: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", rfbScreen->port);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:581: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 param_request[128];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:582: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 param_formatted[196];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:605: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(param_request, tail, len);
data/libvncserver-0.9.13+dfsg/libvncserver/main.c:238: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[256];
data/libvncserver-0.9.13+dfsg/libvncserver/main.c:793: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((char *)auth_tmp, (char *)cl->authChallenge, CHALLENGESIZE);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:336: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 host[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:733:9:  [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(buf + 4, reason, len);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:761:9:  [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(buf + 8, reason, len);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:782: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 buf[256];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:917: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:954: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:986: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(&cl->updateBuf[cl->ublen], (char *)&msgs, sz_rfbSupportedMessages);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1054: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1060:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cl->updateBuf[cl->ublen], (char *)&encoding, sizeof(encoding));
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1078:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[256];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1097:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[512];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1116: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1120: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(&cl->updateBuf[cl->ublen], buffer, strlen(buffer)+1);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1187: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(&cl->updateBuf[cl->ublen], (char *)&tc, sz_rfbTextChatMsg);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1190:9:  [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(&cl->updateBuf[cl->ublen], buffer, bytesToSend);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1335: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 retfilename[MAX_PATH];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1336: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 path[MAX_PATH];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1363: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(basePath, path, pathLen);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1519: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 readBuf[sz_rfbBlockSize];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1526:14:  [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 compBuf[sz_rfbBlockSize + 1024];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1619: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 filename1[MAX_PATH];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1620: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 filename2[MAX_PATH];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1621: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 szFileTime[MAX_PATH];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1625: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 timespec[64];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1627:14:  [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 compBuff[sz_rfbBlockSize];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1709:29:  [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).
        cl->fileTransfer.fd=open(filename1, O_RDONLY, 0744);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1832:29:  [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).
        cl->fileTransfer.fd=open(filename1, O_CREAT|O_WRONLY|O_TRUNC, 0744);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:2028: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 encBuf[64];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:2029: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 encBuf2[64];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3350: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3357: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(&cl->updateBuf[cl->ublen], (char *)&cr, sz_rfbCopyRect);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3400: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(&cl->updateBuf[cl->ublen], (char *)&rect,sz_rfbFramebufferUpdateRectHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3466: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(&cl->updateBuf[cl->ublen], (char *)&rect,sz_rfbFramebufferUpdateRectHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3504: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3575: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3581: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(&cl->updateBuf[cl->ublen], (char *)&edsHdr,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3597:9:  [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(&cl->updateBuf[cl->ublen], (char *)&eds,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3640: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[sz_rfbSetColourMapEntriesMsg + 256 * 3 * 2];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_gnutls.c:29: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 peekbuf[2048];
data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_gnutls.c:216:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (buf, ctx->peekbuf + ctx->peekstart, ret);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_gnutls.c:234: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(ctx->peekbuf + ctx->peekstart + ctx->peeklen, buf + ret, n);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbssl_openssl.c:35: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[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/rre.c:139: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/rre.c:145: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(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbRREHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/rre.c:156:9:  [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(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
data/libvncserver-0.9.13+dfsg/libvncserver/rre.c:256: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(&client->afterEncBuf[client->afterEncBufLen],&subrect,sz_rfbRectangle);      \
data/libvncserver-0.9.13+dfsg/libvncserver/scale.c:252: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 (&ptr->frameBuffer[(y *ptr->paddedWidthInBytes) + (x * bytesPerPixel)],
data/libvncserver-0.9.13+dfsg/libvncserver/scale.c:288:9:  [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(ptr, cl->screen, sizeof(rfbScreenInfo));
data/libvncserver-0.9.13+dfsg/libvncserver/selbox.c:272: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(frameBufferBackup+j*(x2-x1)*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/selbox.c:287: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(rfbScreen->frameBuffer+j*rfbScreen->paddedWidthInBytes+x1*bpp,
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:139: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 host[1024];
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:351: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[6];
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:362:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((char *)&fds, (char *)&(rfbScreen->allFds), sizeof(fd_set));
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:425: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(&rfbScreen->udpRemoteAddr, &addr, addrlen);
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:954: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 port_str[8];
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:1027: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 port_str[8];
data/libvncserver-0.9.13+dfsg/libvncserver/stats.c:380: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 encBuf[64];
data/libvncserver-0.9.13+dfsg/libvncserver/tabletrans24template.c:113: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(op,&outValue,3);
data/libvncserver-0.9.13+dfsg/libvncserver/tabletrans24template.c:227: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(op,&t[3*(*(ip++))],3);
data/libvncserver-0.9.13+dfsg/libvncserver/tabletrans24template.c:265: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(op,&outValue,3);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:807: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:840: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 (&cl->updateBuf[cl->ublen], tightBeforeBuf, len);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:899:9:  [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(&cl->updateBuf[cl->ublen], tightAfterBuf, paletteLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:910:9:  [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(&cl->updateBuf[cl->ublen], tightAfterBuf, 4);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:977:9:  [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(&cl->updateBuf[cl->ublen], tightAfterBuf,
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:992:9:  [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(&cl->updateBuf[cl->ublen], tightAfterBuf, paletteNumColors * 2);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:1057:9:  [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(&cl->updateBuf[cl->ublen], tightBeforeBuf, dataLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:1134:9:  [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(&cl->updateBuf[cl->ublen], &buf[i], portionLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:1795: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(vs->tight.png.buffer + vs->tight.png.offset, data, length);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:1797: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(tightAfterBuf + pngDstDataLen, data, length);
data/libvncserver-0.9.13+dfsg/libvncserver/tight.c:1899: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(buf, vs->tight.tight.buffer + (dy * w), w);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.c:63: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(fileListItemInfoPtr, fileListInfoPtr->pEntries, 
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.h:40: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 name[NAME_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:47:9:  [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).
#define open _open
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:190:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(basePath, path, pathLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:213: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 fullpath[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:281: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 fullpath[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:453: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 pBuf[SZ_RFBBLOCKSIZE];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:459:36:  [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((rtcp->rcft.rcfd.downloadFD = open(path, O_RDONLY)) == -1) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:536:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(pFollow, reason, reasonLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:569:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(pFollow, &mTime, sizeof(unsigned long));
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:603:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(pFollow, pFile, sizeFile);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:723:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(pFollow, reason, reasonLen);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:60:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char ftproot[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:154: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(ftproot, path, strlen(path)-1);	
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:157: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(ftproot, path, strlen(path));	
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:229:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char p[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:241:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p, path, strlen(path));
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:288:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX]; /* PATH_MAX has the value 4096 and is defined in limits.h */
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:375:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX]; /* PATH_MAX has the value 4096 and is defined in limits.h */
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:642:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX]; /* PATH_MAX has the value 4096 and is defined in limits.h */
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:977: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 dirName[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightproto.h:147: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 fName[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightproto.h:155: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 fName[PATH_MAX];
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightproto.h:197: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(pcap->vendorSignature, (vendor),		\
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/rfbtightproto.h:199: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(pcap->nameSignature, sig_##code_sym,		\
data/libvncserver-0.9.13+dfsg/libvncserver/translate.c:232:9:  [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(optr, iptr, bytesPerOutputLine);
data/libvncserver-0.9.13+dfsg/libvncserver/translate.c:364: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 bytes[sz_rfbSetColourMapEntriesMsg + 256 * 3 * 2];
data/libvncserver-0.9.13+dfsg/libvncserver/ultra.c:140: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/ultra.c:146: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(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbZlibHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/ultra.c:158:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:109:14:  [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 hash[SHA1_HASH_SIZE];
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:110:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[strlen(key) + sizeof(GUID) - 1];
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:111: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(tmp, key, strlen(key));
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:112: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(tmp + strlen(key), GUID, sizeof(GUID) - 1);
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:125: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 bbuf[4], *scheme;
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:308: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 accept[B64LEN(SHA1_HASH_SIZE) + 1];
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:413:9:  [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(wsctx->codeBufEncode + sz, src, len);
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c:89: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(dst, wsctx->readPos, len);
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c:96: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(dst, wsctx->readPos, wsctx->readlen);
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c:356: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(wsctx->writePos, wsctx->carryBuf, wsctx->carrylen);
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c:414: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(data + i * sizeof(tmp), &tmp, sizeof(tmp));
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.c:436: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(wsctx->carryBuf, data + (i * 4), wsctx->carrylen);
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.h:60: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 c[4];
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.h:114: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 codeBufDecode[2048 + WSHLENMAX]; /* base64 + maximum frame header length */
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.h:115: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 codeBufEncode[B64LEN(UPDATE_BUF_SIZE) + WSHLENMAX]; /* base64 + maximum frame header length */
data/libvncserver-0.9.13+dfsg/libvncserver/ws_decode.h:120: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 carryBuf[3];                      /* For base64 carry-over */
data/libvncserver-0.9.13+dfsg/libvncserver/zlib.c:235: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(&cl->updateBuf[cl->ublen], (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/zlib.c:241: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(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbZlibHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/zlib.c:252:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cl->updateBuf[cl->ublen], &zlibAfterBuf[i], bytesToCopy);
data/libvncserver-0.9.13+dfsg/libvncserver/zrle.c:206: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(cl->updateBuf+cl->ublen, (char *)&rect,
data/libvncserver-0.9.13+dfsg/libvncserver/zrle.c:212: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(cl->updateBuf+cl->ublen, (char *)&hdr, sz_rfbZRLEHeader);
data/libvncserver-0.9.13+dfsg/libvncserver/zrle.c:225: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(cl->updateBuf+cl->ublen, (uint8_t*)zos->out.start + i, bytesToCopy);
data/libvncserver-0.9.13+dfsg/libvncserver/zrleoutstream.c:230: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(os->in.ptr, data, n);
data/libvncserver-0.9.13+dfsg/rfb/default8x16.h:4:17:  [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 unsigned char default8x16FontData[4096+1]={
data/libvncserver-0.9.13+dfsg/rfb/rfb.h:226: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 thisHost[255];
data/libvncserver-0.9.13+dfsg/rfb/rfb.h:560: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 updateBuf[UPDATE_BUF_SIZE];
data/libvncserver-0.9.13+dfsg/rfb/rfb.h:908:17:  [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 unsigned char rfbReverseByte[0x100];
data/libvncserver-0.9.13+dfsg/rfb/rfbclient.h:265:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[RFB_BUFFER_SIZE];
data/libvncserver-0.9.13+dfsg/rfb/rfbclient.h:278: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[RFB_BUF_SIZE];
data/libvncserver-0.9.13+dfsg/rfb/rfbclient.h:309: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 zlib_buffer[ZLIB_BUFFER_SIZE];
data/libvncserver-0.9.13+dfsg/rfb/rfbclient.h:318: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 tightPalette[256*4];
data/libvncserver-0.9.13+dfsg/rfb/rfbproto.h:252: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.
typedef char rfbProtocolVersionMsg[13];	/* allow extra byte for null */
data/libvncserver-0.9.13+dfsg/test/bmp.c:112:32:  [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 *tempbuf=NULL;  char temps[255], temps2[255];
data/libvncserver-0.9.13+dfsg/test/bmp.c:191: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).
	_unix(fd=open(filename, flags));
data/libvncserver-0.9.13+dfsg/test/bmp.c:279:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if((fs=fopen(filename, "wb"))==NULL) _throw(strerror(errno));
data/libvncserver-0.9.13+dfsg/test/bmp.c:322: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).
	_unix(fd=open(filename, flags, mode));
data/libvncserver-0.9.13+dfsg/test/encodingstest.c:207:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(cd->display,":%d",server->port-5900);
data/libvncserver-0.9.13+dfsg/test/encodingstest.c:264:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/libvncserver-0.9.13+dfsg/test/tjbench.c:49: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.
const char *pixFormatStr[TJ_NUMPF]=
data/libvncserver-0.9.13+dfsg/test/tjbench.c:57: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.
const char *subNameLong[TJ_NUMSAMP]=
data/libvncserver-0.9.13+dfsg/test/tjbench.c:61: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.
const char *subName[NUMSUBOPT]={"444", "422", "420", "GRAY", "440"};
data/libvncserver-0.9.13+dfsg/test/tjbench.c:68: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 format[80];
data/libvncserver-0.9.13+dfsg/test/tjbench.c:82: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 tempstr[1024], sizestr[20]="\0", qualstr[6]="\0", *ptr;
data/libvncserver-0.9.13+dfsg/test/tjbench.c:212: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 tempstr[1024], tempstr2[80];
data/libvncserver-0.9.13+dfsg/test/tjbench.c:255: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(&tmpbuf[pitch*i], &srcbuf[w*ps*i], w*ps);
data/libvncserver-0.9.13+dfsg/test/tjbench.c:313:13:  [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((file=fopen(tempstr, "wb"))==NULL)
data/libvncserver-0.9.13+dfsg/test/tjbench.c:362: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).
	if((file=fopen(filename, "rb"))==NULL)
data/libvncserver-0.9.13+dfsg/test/tjbench.c:436: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(jpegbuf[0], srcbuf, srcsize);
data/libvncserver-0.9.13+dfsg/test/tjbench.c:535: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).
		if((minqual=atoi(argv[2]))<1 || minqual>100)
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:50: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.
const char *subNameLong[TJ_NUMSAMP]=
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:54: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.
const char *subName[TJ_NUMSAMP]={"444", "422", "420", "GRAY", "440"};
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:56: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.
const char *pixFormatStr[TJ_NUMPF]=
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:226:13:  [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).
	FILE *file=fopen(filename, "wb");
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:242: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 tempStr[1024];  unsigned char *srcBuf=NULL;
data/libvncserver-0.9.13+dfsg/test/tjunittest.c:249:23:  [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.
	if((srcBuf=(unsigned char *)malloc(w*h*tjPixelSize[pf]))==NULL)
data/libvncserver-0.9.13+dfsg/test/wstest.c:58: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 frame[TEST_BUF_SIZE];
data/libvncserver-0.9.13+dfsg/test/wstest.c:60: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 expectedDecodeBuf[TEST_BUF_SIZE];
data/libvncserver-0.9.13+dfsg/test/wstest.c:76: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 el_log[1000000];
data/libvncserver-0.9.13+dfsg/test/wstest.c:113: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(dst, ft->pos, nret);
data/libvncserver-0.9.13+dfsg/test/wstest.c:122: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 dstbuf[ft->raw_payload_len];
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:188:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int bytes = strlen(chr);
data/libvncserver-0.9.13+dfsg/client_examples/SDLvncviewer.c:307:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    SendClientCutText(cl, text, strlen(text));
data/libvncserver-0.9.13+dfsg/client_examples/backchannel.c:32: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).
	uint32_t length = strlen(text)+1;
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:142: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).
		SendClientCutText (cl, (char *) text, strlen (text));
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:165: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).
	                        strlen (server_cut_text));
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:523: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).
	if (g_utf8_validate (buf, strlen (buf), NULL)) {
data/libvncserver-0.9.13+dfsg/client_examples/gtkvncviewer.c:530:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		utf8 = g_convert_with_fallback (buf, strlen (buf), "UTF-8",
data/libvncserver-0.9.13+dfsg/common/sockets.h:51:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read(sock,buf,len) recv(sock,buf,len,0)
data/libvncserver-0.9.13+dfsg/common/vncauth.c:96: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 (i < strlen(passwd)) {
data/libvncserver-0.9.13+dfsg/common/vncauth.c:136:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ch = getc(fp);
data/libvncserver-0.9.13+dfsg/common/vncauth.c:193: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 (i < strlen(passwd)) {
data/libvncserver-0.9.13+dfsg/examples/1instance.c:63:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    reallen=read(str->fd,buffer,len);
data/libvncserver-0.9.13+dfsg/examples/1instance.c:105: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).
  write(str->fd,message,strlen(message));
data/libvncserver-0.9.13+dfsg/examples/1instance.c:107:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  rfbLog("send: %s => %d(%d)\n",message,i,strlen(message));
data/libvncserver-0.9.13+dfsg/examples/backchannel.c:42: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).
		uint32_t length = strlen(text)+1;
data/libvncserver-0.9.13+dfsg/examples/vncev.c:47:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if(!strncmp(buffer,"#define XK_",strlen("#define XK_"))) {
data/libvncserver-0.9.13+dfsg/examples/vncev.c:48:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	 for(i=strlen("#define XK_");buffer[i] && buffer[i]!=' '
data/libvncserver-0.9.13+dfsg/examples/vncev.c:58: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).
	    char* x=(char*)malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define ")));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:58:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    char* x=(char*)malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define ")));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:58:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    char* x=(char*)malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define ")));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:65: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(x,",");
data/libvncserver-0.9.13+dfsg/examples/vncev.c:66:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strcat(x,buffer+strlen("#define "));
data/libvncserver-0.9.13+dfsg/examples/vncev.c:70:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   keys[j&0x3ff] = strdup(buffer+strlen("#define "));
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:318: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).
    if (fread(buffer,1,strlen(magic),rec->file) != strlen(magic) || strncmp(buffer,magic,strlen(magic))) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:318: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).
    if (fread(buffer,1,strlen(magic),rec->file) != strlen(magic) || strncmp(buffer,magic,strlen(magic))) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:318:90:  [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 (fread(buffer,1,strlen(magic),rec->file) != strlen(magic) || strncmp(buffer,magic,strlen(magic))) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:543: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).
            if (strlen(buf1)>=sizeof(buf1)-1) break;
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:545:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:545:46:  [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).
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:568: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).
      if ((!passwd) || (strlen(passwd) == 0)) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:572: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).
      if (strlen(passwd) > 8) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:579: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).
      for (i = strlen(passwd); i >= 0; i--) {
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:620:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ulen = (cred->userCredential.username ? strlen(cred->userCredential.username) : 0);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:622:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  plen = (cred->userCredential.password ? strlen(cred->userCredential.password) : 0);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:712:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *)username, cred->userCredential.username, sizeof(username)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:714:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *)password, cred->userCredential.password, sizeof(password)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:819: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).
  passwordLen = strlen(cred->userCredential.password)+1;
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:820: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).
  usernameLen = strlen(cred->userCredential.username)+1;
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:1202:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	encStrLen = strlen(encStr);
data/libvncserver-0.9.13+dfsg/libvncclient/rfbproto.c:1446: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).
    int count = strlen(text);
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:56: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).
    char * buf = (char *)malloc(strlen(host) + 7);
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:123:74:  [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).
   sasl_secret_t *lsec = (sasl_secret_t *)malloc(sizeof(sasl_secret_t) + strlen(password));
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:130: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).
   lsec->len = strlen(password);
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:334:48:  [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).
    uint32_t mechnamelen = rfbClientSwap32IfLE(strlen(mechname));
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:336:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!WriteToRFBServer(client, (char *)mechname, strlen(mechname))) goto error;
data/libvncserver-0.9.13+dfsg/libvncclient/sasl.c:526:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(client->sock, encoded, encodedLen);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:103:9:  [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 (diff.tv_usec);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:145:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:197:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        i = read(client->sock, out, n);
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:511: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(sockFile) + 1 > sizeof(addr.sun_path)) {
data/libvncserver-0.9.13+dfsg/libvncclient/sockets.c:526:73:  [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 (connect(sock, (struct sockaddr *)&addr, sizeof(addr.sun_family) + strlen(addr.sun_path)) < 0 &&
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:218:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(client->sock, data, len);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:363: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).
            if (strlen(buf1)>=sizeof(buf1)-1) break;
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:365:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_gnutls.c:365:46:  [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).
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:322:64:  [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(!X509_VERIFY_PARAM_set1_host(param, client->serverHost, strlen(client->serverHost)))
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:492: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).
            if (strlen(buf1)>=sizeof(buf1)-1) break;
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:494:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/tls_openssl.c:494:46:  [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).
            strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1);
data/libvncserver-0.9.13+dfsg/libvncclient/vncviewer.c:69:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int c=fgetc(stdin);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:54:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read _read /* Prevent POSIX deprecation warnings */
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:283:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(rfbScreen->httpDir) > 255) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:289: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).
    fname = &fullFname[strlen(fullFname)];
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:290: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).
    maxFnameLen = 511 - strlen(fullFname);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:304:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	got = read (rfbScreen->httpSock, buf + buf_filled,
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:339: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).
		rfbWriteExact(&cl,INVALID_REQUEST_STR, strlen(INVALID_REQUEST_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:345:37:  [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).
	    rfbWriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:353:37:  [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).
	    rfbWriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:369:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) > maxFnameLen) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:383:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rfbWriteExact(&cl, NOT_FOUND_STR, strlen(NOT_FOUND_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:419:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rfbWriteExact(&cl, NOT_FOUND_STR, strlen(NOT_FOUND_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:433:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(fname) >= 4 && strcmp(&fname[strlen(fname)-4], ".vnc") == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:433: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).
    if (strlen(fname) >= 4 && strcmp(&fname[strlen(fname)-4], ".vnc") == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:441:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rfbWriteExact(&cl, NOT_FOUND_STR, strlen(NOT_FOUND_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:446:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    rfbWriteExact(&cl, OK_STR, strlen(OK_STR));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:457:37:  [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).
    rfbWriteExact(&cl, contentType, strlen(contentType));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:492: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:497: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:502: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:507: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:512: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:516: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).
		    rfbWriteExact(&cl, rfbScreen->desktopName, strlen(rfbScreen->desktopName));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:521: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).
		    rfbWriteExact(&cl, str, strlen(str));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:527:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				   strlen(user));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:533: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).
			rfbWriteExact(&cl, params, strlen(params));
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:565: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).
    if (strncmp(*ptr, str, strlen(str)) == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:566: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).
	*ptr += strlen(str);
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:596: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(tail) >= sizeof(param_request)) {
data/libvncserver-0.9.13+dfsg/libvncserver/httpd.c:615: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(value_str) == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/main.c:584:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while (read(cl->pipe_notify_client_thread[0], &buf, sizeof(buf)) == sizeof(buf));
data/libvncserver-0.9.13+dfsg/libvncserver/main.c:769: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).
  for (i = strlen(passwd); i >= 0; i--) {
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:726: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).
    int len = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:753: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).
    int len = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:817:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(u.buf + sz_rfbServerInitMsg, cl->screen->desktopName, 127);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:818:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(u.buf + sz_rfbServerInitMsg);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1105:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                  + (strlen(buffer)+1) > UPDATE_BUF_SIZE) {
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1113:27:  [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).
    rect.r.w = Swap16IfLE(strlen(buffer)+1);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1120:47:  [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).
    memcpy(&cl->updateBuf[cl->ublen], buffer, strlen(buffer)+1);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1121: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).
    cl->ublen += strlen(buffer)+1;
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1124:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sz_rfbFramebufferUpdateRectHeader+strlen(buffer)+1,
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1125:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sz_rfbFramebufferUpdateRectHeader+strlen(buffer)+1);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1294:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(path) >= unixPathMaxLen)
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1306:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if ((strlen(path) + strlen(home) + 1) >= unixPathMaxLen)
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1306: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 ((strlen(path) + strlen(home) + 1) >= unixPathMaxLen)
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1310:9:  [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(unixPath,"/");
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1316: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).
    for (x=0;x<strlen(unixPath);x++)
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1328: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).
    for (x=2;x<strlen(path);x++)
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1361: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).
    pathLen = strlen(path);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1438:67:  [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).
                nOptLen = sizeof(RFB_FIND_DATA) - MAX_PATH - 14 + strlen((char *)win32filename.cFileName);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1562:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            bytesRead = read(cl->fileTransfer.fd, readBuf, sz_rfbBlockSize);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1724:47:  [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).
              buffer=realloc(buffer, length + strlen(timespec) + 2); /* comma, and Null term */
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1726:115:  [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).
                  rfbLog("rfbProcessFileTransfer() rfbFileTransferRequest: Failed to malloc %d bytes\n", length + strlen(timespec) + 2);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1729:15:  [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(buffer,",");
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1731: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).
              length = strlen(buffer);
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:1808:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(szFileTime, p+1, sizeof(szFileTime));
data/libvncserver-0.9.13+dfsg/libvncserver/rfbserver.c:3790:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((n = read(rfbScreen->udpSock, (char *)&msg, sizeof(msg))) <= 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:638:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = read(sock, buf, len);
data/libvncserver-0.9.13+dfsg/libvncserver/sockets.c:641:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(sock, buf, len);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filelistinfo.c:119:13:  [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).
		sumLen += strlen(fileListInfo.pEntries[i].name);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:48:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read _read
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:181:5:  [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(path) == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:188: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).
	pathLen = strlen(path);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:217:95:  [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).
		strncpy_s(fullpath + basePathLength, PATH_MAX - basePathLength, winFindData.cFileName, (int)strlen(winFindData.cFileName));
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:264:5:  [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(path) == 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:286: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).
			if(path[strlen(path)-1] != '/')
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:287:5:  [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(fullpath, "/");
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:393: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).
			pFileNames += strlen(pFileNames) + 1;
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:417: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).
	int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:431: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).
	int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:442: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).
	int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:467:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if( (numOfBytesRead = read(rtcp->rcft.rcfd.downloadFD, pBuf, SZ_RFBBLOCKSIZE)) <= 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:492: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).
	if( (path == NULL) || (strlen(path) == 0) ||
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:496: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).
			int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:623: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).
	int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:635: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(rtcp->rcft.rcfu.fName) == 0) ||
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:640: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).
			int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:654: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).
	int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/filetransfermsg.c:672: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).
		int reasonLen = strlen(reason);
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:98: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).
	if((userHome != NULL) && (strlen(userHome) != 0)) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:123: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).
	if((path == NULL) || (strlen(path) == 0) || (strlen(path) > (PATH_MAX - 1))) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:123:47:  [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((path == NULL) || (strlen(path) == 0) || (strlen(path) > (PATH_MAX - 1))) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:153: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(path[strlen(path)-1] == '/') {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:154: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).
		memcpy(ftproot, path, strlen(path)-1);	
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:157: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).
		memcpy(ftproot, path, strlen(path));	
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:233:4:  [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(path) == 0) ||
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:234:4:  [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(path)+strlen(ftproot) > PATH_MAX - 1) ) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:234: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).
		(strlen(path)+strlen(ftproot) > PATH_MAX - 1) ) {
data/libvncserver-0.9.13+dfsg/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c:241: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).
	memcpy(p, path, strlen(path));
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:110:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char tmp[strlen(key) + sizeof(GUID) - 1];
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:111:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memcpy(tmp, key, strlen(key));
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:112: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).
    memcpy(tmp + strlen(key), GUID, sizeof(GUID) - 1);
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:312:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(strlen(protocol) > 0) {
data/libvncserver-0.9.13+dfsg/libvncserver/websockets.c:352:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(cl->sock, buf, len);
data/libvncserver-0.9.13+dfsg/rfb/threading.h:58:39:  [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.
#define THREAD_SLEEP_MS(ms)           usleep(ms*1000)
data/libvncserver-0.9.13+dfsg/test/bmp.c:84:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if((bytesread=read(fd, addr, (size)))==-1) _throw(strerror(errno)); \
data/libvncserver-0.9.13+dfsg/test/bmp.c:120: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(temps)==0 || temps[0]=='\n') continue;
data/libvncserver-0.9.13+dfsg/test/bmp.c:257:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	_unix(bytesread=read(fd, tempbuf, srcpitch*(*h)));
data/libvncserver-0.9.13+dfsg/test/tjbench.c:540:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if((temp=strchr(argv[2], '-'))!=NULL && strlen(temp)>1

ANALYSIS SUMMARY:

Hits = 582
Lines analyzed = 57660 in approximately 1.55 seconds (37160 lines/second)
Physical Source Lines of Code (SLOC) = 42427
Hits@level = [0] 376 [1] 158 [2] 346 [3]  16 [4]  62 [5]   0
Hits@level+ = [0+] 958 [1+] 582 [2+] 424 [3+]  78 [4+]  62 [5+]   0
Hits/KSLOC@level+ = [0+] 22.58 [1+] 13.7177 [2+] 9.99364 [3+] 1.83845 [4+] 1.46133 [5+]   0
Dot directories skipped = 2 (--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.