]> source.dussan.org Git - tigervnc.git/commitdiff
fixed protocol version < 3.7 secType bug
authorBrian Hinz <bphinz@users.sourceforge.net>
Sun, 4 Sep 2011 12:40:15 +0000 (12:40 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Sun, 4 Sep 2011 12:40:15 +0000 (12:40 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4667 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tigervnc/rfb/CConnection.java

index da4ac6fd3c5768aebbc461cd3bce08eb3c4da5e8..15e198961b56799e51e829b8ce238d05aced2dd7 100644 (file)
@@ -100,6 +100,7 @@ abstract public class CConnection extends CMsgHandler {
     vlog.info("processing security types message");
 
     int secType = Security.secTypeInvalid;
+
     List<Integer> secTypes = new ArrayList<Integer>();
     secTypes = security.GetEnabledSecTypes();
     //for (Iterator i = secTypes.iterator(); i.hasNext(); )
@@ -121,10 +122,10 @@ abstract public class CConnection extends CMsgHandler {
             secType = refType;
             break;
           }
+          if (!i.hasNext())
+            secType = Security.secTypeInvalid;
         }
       
-        if (!i.hasNext())
-          secType = Security.secTypeInvalid;
       } else {
         vlog.error("Unknown 3.3 security type "+secType);
         throw new Exception("Unknown 3.3 security type");