Skip to content

Fix[ntcd_machine]: data corruption and out-of-bounds write - #417

Merged
mattrm456 merged 2 commits into
bloomberg:mainfrom
678098:patch-2
Oct 1, 2026
Merged

mattrm456 merged 2 commits into
bloomberg:mainfrom
678098:patch-2

Conversation

@678098

@678098 678098 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
  • Fix data corruption and out-of-bounds write when receiving into a bsl::string in ntcd::Packet::dequeueData
  • Added a test function to verify receiving data into a string with spare capacity.

Added a test function to verify receiving data into a string with spare capacity.
Comment thread groups/ntc/ntcd/ntcd_machine.t.cpp
Avoid data corruption by resizing a buffer before writing to it.
Changed 'position' to a constant for clarity and safety. Removed redundant resize call on 'data'.
@678098 678098 changed the title UT[ntcd_machine]: add verifyReceiveIntoString test function Fix[ntcd_machine]: data corruption and out-of-bounds write Sep 18, 2026
Comment thread groups/ntc/ntcd/ntcd_machine.cpp
Comment thread groups/ntc/ntcd/ntcd_machine.cpp
@mattrm456
mattrm456 merged commit 95536c7 into bloomberg:main Oct 1, 2026
1 check passed
@678098
678098 deleted the patch-2 branch October 1, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants