Bug#1104933: activemq: diff for NMU version 5.17.6+dfsg-1.1 (23/48)
From
Emmanuel Arias@1:229/2 to
All on Sun Jun 1 01:20:01 2025
[continued from previous message]
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
+ info.setType(looseUnmarshalString(dataIn));
+- info.setContent(looseUnmarshalByteSequence(dataIn));
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setContent(looseUnmarshalByteSequence(wireFormat, dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+ info.setDataStructure((org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setCompressed(dataIn.readBoolean());
+--- a/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java
++++ b/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java
+@@ -68,7 +68,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(tightUnmarshalByteArray(dataIn, bs));
++ info.setData(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -114,7 +114,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(looseUnmarshalByteArray(dataIn));
++ info.setData(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java
++++ b/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java
+@@ -72,7 +72,7 @@
+
+ info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+
+ info.afterUnmarshall(wireFormat);
+
+@@ -130,7 +130,7 @@
+
+ info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+
+ info.afterUnmarshall(wireFormat);
+
+--- a/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java
++++ b/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java
+@@ -68,8 +68,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
+- info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
++ info.setGlobalTransactionId(tightUnmarshalByteArray(wireFormat, dataIn, bs));
++ info.setBranchQualifier(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -117,8 +117,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
+- info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
++ info.setGlobalTransactionId(looseUnmarshalByteArray(wireFormat, dataIn));
++ info.setBranchQualifier(looseUnmarshalByteArray(wireFormat, dataIn)); +
+ }
+
+--- a/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
++++ b/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
+@@ -410,10 +410,11 @@
+ }
+ }
+
+- protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected byte[] tightUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ byte rc[] = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -437,10 +438,11 @@
+ }
+ }
+
+- protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected ByteSequence tightUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ ByteSequence rc = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ return new ByteSequence(t, 0, size);
+@@ -617,10 +619,11 @@
+ }
+ }
+
+- protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
++ protected byte[] looseUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ byte rc[] = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -636,10 +639,11 @@
+ }
+ }
+
+- protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
++ protected ByteSequence looseUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ ByteSequence rc = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ rc = new ByteSequence(t, 0, size);
+--- a/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java
++++ b/activemq-openwire-legacy/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java
+@@ -65,8 +65,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setType(tightUnmarshalString(dataIn, bs));
+- info.setContent(tightUnmarshalByteSequence(dataIn, bs));
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setContent(tightUnmarshalByteSequence(wireFormat, dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+ info.setDataStructure((org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setCompressed(bs.readBoolean());
+@@ -218,8 +218,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)