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

Only buffer up to 512 KiB of pending CRYPTO frames [#501]. #505

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

rthalley
Copy link
Contributor

Address #501 by limiting the size required to buffer pending CRYPTO frames to 512 KiB. I picked this size based on it being big enough for post-quantum crypto, but still not very big. The limit applies to the amount of storage we need to allocate, not the size of inbound fragments, so e.g. a bunch of small fragment around the 512 KiB offset would still trigger as we use a contiguous buffer and the required size would exceed the limit.

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b507364) to head (c5aef28).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #505   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         4987      4993    +6     
=========================================
+ Hits          4987      4993    +6     

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

@rthalley
Copy link
Contributor Author

Note that the codespell check seems confused; it's complaining about a test function name "assertIn" in code I didn't change, and is just confused. When I run codespell locally, I don't see it. I see there is some issue with the openssl vendoring too, though again not related to this PR.

@@ -93,6 +93,7 @@
STREAM_COUNT_MAX = 0x1000000000000000
UDP_HEADER_SIZE = 8
MAX_PENDING_RETIRES = 100
MAX_PENDING_CRYPTO = 524288
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment stating this is a number of bytes?

@jlaine
Copy link
Contributor

jlaine commented Jun 18, 2024

If you rebase on top of main the CI errors should be fixed. Once CI is green feel free to merge, thanks!

@rthalley rthalley merged commit 174a2eb into aiortc:main Jun 18, 2024
29 checks passed
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.

2 participants