Browse Source

HPCC-25531 Roxie decryption should be moved off socket reader thread

Fix regression in metadata length calculation

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 years ago
parent
commit
baa277e144
1 changed files with 1 additions and 1 deletions
  1. 1 1
      roxie/udplib/udptrs.cpp

+ 1 - 1
roxie/udplib/udptrs.cpp

@@ -1146,7 +1146,7 @@ private:
                 part_buffer = bufferManager->allocate();
             const char *metaData = metaInfo.toByteArray();
             unsigned metaLength = metaInfo.length();
-            unsigned maxMetaLength = data_buffer_size + data_used;
+            unsigned maxMetaLength = data_buffer_size - data_used;
             while (metaLength > maxMetaLength)
             {
                 memcpy(&part_buffer->data[sizeof(UdpPacketHeader)+data_used], metaData, maxMetaLength);