• Bug#1104933: activemq: diff for NMU version 5.17.6+dfsg-1.1 (7/48)

    From Emmanuel Arias@1:229/2 to All on Sun Jun 1 01:20:01 2025
    [continued from previous message]

    +- info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
    +- info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
    ++ info.setGlobalTransactionId(looseUnmarshalByteArray(wireFormat, dataIn));
    ++ info.setBranchQualifier(looseUnmarshalByteArray(wireFormat, dataIn)); +
    + }
    +
    +--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/BaseDataStreamMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/BaseDataStreamMarshaller.java
    +@@ -409,10 +409,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);
    + }
    +@@ -436,10 +437,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);
    +@@ -616,10 +618,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);
    + }
    +@@ -635,10 +638,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-client/src/main/java/org/apache/activemq/openwire/v12/ConnectionControlMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/ConnectionControlMarshaller.java
    +@@ -74,7 +74,7 @@
    + info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
    + info.setReconnectTo(tightUnmarshalString(dataIn, bs));
    + info.setRebalanceConnection(bs.readBoolean());
    +- info.setToken(tightUnmarshalByteArray(dataIn, bs));
    ++ info.setToken(tightUnmarshalByteArray(wireFormat, dataIn, bs));
    +
    + }
    +
    +@@ -142,7 +142,7 @@
    + info.setConnectedBrokers(looseUnmarshalString(dataIn));
    + info.setReconnectTo(looseUnmarshalString(dataIn));
    + info.setRebalanceConnection(dataIn.readBoolean());
    +- info.setToken(looseUnmarshalByteArray(dataIn));
    ++ info.setToken(looseUnmarshalByteArray(wireFormat, dataIn));
    +
    + }
    +
    +--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/MessageMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/MessageMarshaller.java
    +@@ -69,8 +69,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());
    +@@ -228,8 +228,8 @@
    + 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-client/src/main/java/org/apache/activemq/openwire/v12/PartialCommandMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/PartialCommandMarshaller.java
    +@@ -67,7 +67,7 @@
    +
    + PartialCommand info = (PartialCommand)o;
    + info.setCommandId(dataIn.readInt());
    +- info.setData(tightUnmarshalByteArray(dataIn, bs));
    ++ info.setData(tightUnmarshalByteArray(wireFormat, dataIn, bs));
    +
    + }
    +
    +@@ -113,7 +113,7 @@
    +
    + PartialCommand info = (PartialCommand)o;
    + info.setCommandId(dataIn.readInt());
    +- info.setData(looseUnmarshalByteArray(dataIn));
    ++ info.setData(looseUnmarshalByteArray(wireFormat, dataIn));
    +
    + }
    +
    +--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/WireFormatInfoMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/WireFormatInfoMarshaller.java
    +@@ -71,7 +71,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);
    +
    +@@ -129,7 +129,7 @@
    +
    + info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
    + info.setVersion(dataIn.readInt());
    +- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
    ++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
    +
    + info.afterUnmarshall(wireFormat);
    +
    +--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/XATransactionIdMarshaller.java

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)