Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50646
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 26 Jan 2011 18:28:31 +0000 (18:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 26 Jan 2011 18:28:31 +0000 (18:28 +0000)
Ensure larger Tribes messages are fully read.
Patch provided by Olivier Costet.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1063816 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/tribes/ByteMessage.java
webapps/docs/changelog.xml

index b082854..02ca876 100644 (file)
@@ -86,7 +86,7 @@ public class ByteMessage implements Externalizable {
     public void readExternal(ObjectInput in ) throws IOException {
         int length = in.readInt();
         message = new byte[length];
-        in.read(message,0,length);
+        in.readFully(message);
     }
 
     /**
index 1652a6f..f21e2f4 100644 (file)
         <code>RpcChannel</code> is interrupted waiting for a message reply.
         Based on a patch by Olivier Costet. (markt)
       </fix>
+      <fix>
+        <bug>50646</bug>: Ensure larger Tribes messages are fully read. Patch
+        provided by Olivier Costet. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">