mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-498 - check max frame size before umarshalling commands
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1133980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a82119dd5
commit
a4b8c8ee1a
|
@ -202,6 +202,10 @@ public final class OpenWireFormat implements WireFormat {
|
||||||
// throw new IOException("Packet size does not match marshaled
|
// throw new IOException("Packet size does not match marshaled
|
||||||
// size");
|
// 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);
|
Object command = doUnmarshal(bytesIn);
|
||||||
|
|
Loading…
Reference in New Issue