Skip to content

Commit

Permalink
[ntcore] Increase client meta-topic decoding limit
Browse files Browse the repository at this point in the history
It's not uncommon to have more than 1000 publishers or subscribers on a
particular client, so bump that limit to 10000.
  • Loading branch information
PeterJohnson committed Nov 16, 2023
1 parent cfbff32 commit 0447f10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ntcore/src/main/native/cpp/ntcore_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ std::optional<std::vector<ClientPublisher>> nt::meta::DecodeClientPublishers(
std::span<const uint8_t> data) {
mpack_reader_t r;
mpack_reader_init_data(&r, data);
uint32_t numPub = mpack_expect_array_max(&r, 1000);
uint32_t numPub = mpack_expect_array_max(&r, 10000);
std::vector<ClientPublisher> publishers;
publishers.reserve(numPub);
for (uint32_t i = 0; i < numPub; ++i) {
Expand Down Expand Up @@ -71,7 +71,7 @@ std::optional<std::vector<ClientSubscriber>> nt::meta::DecodeClientSubscribers(
std::span<const uint8_t> data) {
mpack_reader_t r;
mpack_reader_init_data(&r, data);
uint32_t numSub = mpack_expect_array_max(&r, 1000);
uint32_t numSub = mpack_expect_array_max(&r, 10000);
std::vector<ClientSubscriber> subscribers;
subscribers.reserve(numSub);
for (uint32_t i = 0; i < numSub; ++i) {
Expand Down

0 comments on commit 0447f10

Please sign in to comment.