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

Use prepend with reverse list in the sdp parsing (Credit to OSS-Fuzz) #2776

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

atoppi
Copy link
Member

@atoppi atoppi commented Sep 24, 2021

This PR comes after an oss-fuzz timeout report.
When parsing the SDP janus makes large use of g_list_append. Unfortunately this specific implementation needs to traverse the entire list for every append (ref. glib sources).
As suggested by glib docs, we replaced the append with prepend + reverse operation in tail (so the list gets traversed only once).
The timeout is due to SDPs containing a lot of m-lines or attributes.

@lminiero
Copy link
Member

LGTM 👍

@lminiero lminiero merged commit 63cbedd into master Sep 27, 2021
@lminiero lminiero deleted the reverse-sdp-parse-lists branch September 27, 2021 08:50
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.

None yet

2 participants