-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p2p: fix data corruption on longer packets #1393
Conversation
The code handling chunking of data frames longer than the configured maximum was faulty.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1393 +/- ##
=======================================
+ Coverage 58.6% 60.2% +1.5%
=======================================
Files 273 270 -3
Lines 27936 26080 -1856
=======================================
- Hits 16397 15709 -688
+ Misses 11539 10371 -1168 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth a shot at least, although I think ideally the buffer management would be changed so this library allocates the buffer and DATA_MAX_SIZE
is just a sanity limit
The protocol always sends full AEAD frames, and long messages are split between successive frames, with the last frame padded. So, regardless of what the doc comment says, |
* p2p: fix data corruption on longer packets The code handling chunking of data frames longer than the configured maximum was faulty. * Regression test for p2p data corruption
The code handling chunking of data frames longer than the configured
maximum was faulty.
May fix #1392 and possibly other occurrences of data corruption.
.changelog/