activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1133980 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
Date Thu, 09 Jun 2011 16:39:20 GMT
Author: dejanb
Date: Thu Jun  9 16:39:20 2011
New Revision: 1133980

URL: http://svn.apache.org/viewvc?rev=1133980&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-498 - check max frame size before umarshalling commands

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?rev=1133980&r1=1133979&r2=1133980&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
Thu Jun  9 16:39:20 2011
@@ -202,6 +202,10 @@ public final class OpenWireFormat implem
                 // throw new IOException("Packet size does not match marshaled
                 // size");
             }
+
+            if (size > maxFrameSize) {
+                throw new IOException("Frame size of " + (size / (1024 * 1024)) + " MB larger
than max allowed " + (maxFrameSize / (1024 * 1024)) + " MB");
+            }
         }
 
         Object command = doUnmarshal(bytesIn);



Mime
View raw message