Skip to content
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

Fix packet length validation #278

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

sirzooro
Copy link
Contributor

@sirzooro sirzooro commented Jul 6, 2024

Missing packet length validations could cause crash.

@sirzooro sirzooro requested review from adamroach and at-wat July 6, 2024 10:46
Copy link

codecov bot commented Jul 6, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.77%. Comparing base (19b0fa0) to head (1acbef0).

Files Patch % Lines
srtp.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
+ Coverage   78.64%   78.77%   +0.13%     
==========================================
  Files          17       17              
  Lines         974      980       +6     
==========================================
+ Hits          766      772       +6     
  Misses        116      116              
  Partials       92       92              
Flag Coverage Δ
go 78.77% <77.77%> (+0.13%) ⬆️
wasm 78.26% <77.77%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sirzooro sirzooro requested review from paulwe, edaniels and boks1971 July 6, 2024 10:47
Copy link
Member

@at-wat at-wat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks nice!
Could you add test cases which feed short packet and confirm it doesn't crash?

@sirzooro
Copy link
Contributor Author

sirzooro commented Jul 6, 2024

Yes, I can add it.

Missing packet length validations could cause crash.
@sirzooro sirzooro force-pushed the fix_packet_length_validation branch from 2314a34 to 1acbef0 Compare July 6, 2024 20:08
@sirzooro
Copy link
Contributor Author

sirzooro commented Jul 6, 2024

Added tests.

@sirzooro sirzooro requested a review from at-wat July 7, 2024 08:43
Copy link
Member

@at-wat at-wat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sirzooro sirzooro merged commit 180f6ef into pion:master Jul 7, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants