From f7d23ef7616266fe9c0945912d9c4c47952207ed Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Fri, 10 Nov 2023 14:28:06 +0000 Subject: [PATCH] HPCC-30798 Fix potential internal error when large rows serialised in roxie Signed-off-by: Gavin Halliday --- roxie/udplib/udptrs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roxie/udplib/udptrs.cpp b/roxie/udplib/udptrs.cpp index b75da03e201..f249c8c00e2 100644 --- a/roxie/udplib/udptrs.cpp +++ b/roxie/udplib/udptrs.cpp @@ -1338,6 +1338,11 @@ class CMessagePacker : implements IMessagePacker, public CInterface } else { + //Edge case - ensure that the length of a variable length record does not span a packet + //this can occur when large rows > data_buffer_size are being appended to the buffer. + if (variable && ((data_buffer_size - data_used) < sizeof(RecordLengthType))) + flush(false); + while (len) { if (!part_buffer)