directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1784265 - /directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
Date Fri, 24 Feb 2017 11:23:30 GMT
Author: elecharny
Date: Fri Feb 24 11:23:30 2017
New Revision: 1784265

URL: http://svn.apache.org/viewvc?rev=1784265&view=rev
Log:
Fix for DIRKRB-620

Modified:
    directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java

Modified: directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java?rev=1784265&r1=1784264&r2=1784265&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
(original)
+++ directory/apacheds/trunk/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
Fri Feb 24 11:23:30 2017
@@ -105,12 +105,10 @@ public class KerberosChannel
             repData = ByteBuffer.allocate( len + 4 );
             repData.putInt( len );
             
-            byte[] tmp = new byte[ 1024 * 8 ];
-            while ( in.available() > 0 )
-            {
-                int read = in.read( tmp );
-                repData.put( tmp, 0, read );
-            }
+            byte[] tmp = new byte[ len ];
+            
+            in.readFully( tmp ); 
+            repData.put( tmp );
         }
         
         repData.flip();



Mime
View raw message