Skip to content

Commit 43a1785

Browse files
committed
Put isc_info_end into response buffer despite of its presence in info items.
1 parent 98836d3 commit 43a1785

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/remote/remote.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,9 @@ bool RBlobInfo::getLocalInfo(unsigned int itemsLength, const unsigned char* item
870870

871871
for (auto item = items; p && (item < items + itemsLength); item++)
872872
{
873+
if (*item == isc_info_end)
874+
break;
875+
873876
switch (*item)
874877
{
875878
case isc_info_blob_num_segments:
@@ -888,17 +891,15 @@ bool RBlobInfo::getLocalInfo(unsigned int itemsLength, const unsigned char* item
888891
p = fb_utils::putInfoItemInt(*item, blob_type, p, end);
889892
break;
890893

891-
case isc_info_end:
892-
if (p < end)
893-
*p++ = isc_info_end;
894-
break;
895-
896894
default:
897895
// unknown info item, let remote server handle it
898896
return false;
899897
}
900898
}
901899

900+
if (p < end)
901+
*p++ = isc_info_end;
902+
902903
return true;
903904
}
904905

0 commit comments

Comments
 (0)