Check data length it RTP ExtHdr handlers#363
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #363 +/- ##
==========================================
- Coverage 82.68% 81.75% -0.94%
==========================================
Files 28 28
Lines 3448 3491 +43
==========================================
+ Hits 2851 2854 +3
- Misses 427 447 +20
- Partials 170 190 +20
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:
|
|
@JoTurk do we still need |
JoTurk
left a comment
There was a problem hiding this comment.
I see many issues with these extensions but they are all pre existing sorry for taking time with the review.
I think we shouldn't remove them either since we're making this library a genetic rtp library
| if len(e.payload) < 4 { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
It's a shame that we can't return an error.
There was a problem hiding this comment.
Yeah. We could change this in RTP/v3. I will add comment there.
Added data length checks to OneByteHeaderExtension, TwoByteHeaderExtension and RawExtension to prevent panics. They are probably not used by pion itself, so fix is just in case someone else still uses them.
668ac70 to
15610c9
Compare
Added data length checks to OneByteHeaderExtension, TwoByteHeaderExtension and RawExtension to prevent panics. They are probably not used by pion itself (did not check all packages here), so fix is just in case someone else still uses them.