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

Limit sdp lines (Credit to OSS-Fuzz) #3414

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Limit sdp lines (Credit to OSS-Fuzz) #3414

merged 2 commits into from
Sep 4, 2024

Conversation

atoppi
Copy link
Member

@atoppi atoppi commented Aug 5, 2024

This PR is a workaround for an issue discovered by OSS-Fuzz when trying to parse a SDP with a large number of lines.
Long story short, the g_strsplit function is not efficient when dealing with string with a lot of delimiter (\n) occurrences.

As a consequence we limit the number of SDP lines to 10000 in order to avoid the timeout on OSS-Fuzz and work around the issue in Janus.
Of course this is not the optimal solution since we do not want to hardcode a number of lines. In the long term we plan to rewrite the splitting algorithm to avoid such inefficiencies.

@atoppi atoppi changed the title Limit sdp lines Limit sdp lines (Credit to OSS-Fuzz) Aug 5, 2024
@atoppi atoppi merged commit 5ba57e4 into master Sep 4, 2024
8 checks passed
atoppi added a commit that referenced this pull request Sep 4, 2024
@atoppi atoppi mentioned this pull request Sep 9, 2024
@atoppi
Copy link
Member Author

atoppi commented Sep 9, 2024

See #3424 for a proper fix.

@atoppi atoppi deleted the limit-sdp-lines branch September 13, 2024 13:23
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.

1 participant