Repository navigation
fix: return error on packet length overflow in TransportLayerCC and CCFeedbackReport - #235
Merged
JoTurk merged 1 commit intoOct 21, 2026
Conversation
AdamMagued
force-pushed
the
fix/issue-234-marshal-overflow-packet-too-large
branch
from
October 17, 2026 03:56
b51175d to
767fa86
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #235 +/- ##
==========================================
+ Coverage 84.65% 84.67% +0.02%
==========================================
Files 22 22
Lines 1668 1671 +3
==========================================
+ Hits 1412 1415 +3
Misses 256 256
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Reported-by: sollniss <sollniss@web.de> Signed-off-by: Adam Magued <adamismailmageud@gmail.com>
JoTurk
force-pushed
the
fix/issue-234-marshal-overflow-packet-too-large
branch
from
October 21, 2026 01:48
767fa86 to
7471b36
Compare
JoTurk
approved these changes
Oct 21, 2026
Member
|
hello, we needed to change the API for the twcc change, but the CCFB fix is good, thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #234
Problem
In
TransportLayerCCandCCFeedbackReport,Marshalcalculates the packet length in 32-bit words and casts it to auint16. When a packet contains a large number of deltas or feedback metric blocks such that the payload exceedsmath.MaxUint16words, the integer wraps around. This causes the allocated buffer to be undersized, triggering apanic: runtime error: slice bounds out of rangeduring marshaling.Solution
TransportLayerCC.Marshal/MarshalToandCCFeedbackReport.Marshal/MarshalToreturningerrPacketTooLargewhen the packet size cannot fit within the RTCP length field.transport_layer_cc_test.goandrfc8888_test.goverifying that oversized packets return an error gracefully rather than panicking.Verified via container sandbox test suite.