From a645790176946a2a97a7cea9c415e474483ed380 Mon Sep 17 00:00:00 2001 From: Vlad Khorsun Date: Fri, 8 Nov 2024 11:47:20 +0200 Subject: [PATCH] Put isc_info_end into response buffer despite of its presence in info items. --- src/remote/remote.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/remote/remote.cpp b/src/remote/remote.cpp index 053a29fa2f..afbd7d450a 100644 --- a/src/remote/remote.cpp +++ b/src/remote/remote.cpp @@ -870,6 +870,9 @@ bool RBlobInfo::getLocalInfo(unsigned int itemsLength, const unsigned char* item for (auto item = items; p && (item < items + itemsLength); item++) { + if (*item == isc_info_end) + break; + switch (*item) { case isc_info_blob_num_segments: @@ -888,17 +891,15 @@ bool RBlobInfo::getLocalInfo(unsigned int itemsLength, const unsigned char* item p = fb_utils::putInfoItemInt(*item, blob_type, p, end); break; - case isc_info_end: - if (p < end) - *p++ = isc_info_end; - break; - default: // unknown info item, let remote server handle it return false; } } + if (p < end) + *p++ = isc_info_end; + return true; }