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

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

    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/XATransactionIdMarshaller.java
    +@@ -67,8 +67,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));
    +
    + }
    +
    +@@ -116,8 +116,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-client/src/main/java/org/apache/activemq/openwire/v9/BaseDataStreamMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v9/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/v9/ConnectionControlMarshaller.java
    ++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v9/ConnectionControlMarshaller.java
    +@@ -1 +1 @@

    [continued in next message]

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