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

Generate up to 8 random padding bytes at a time instead of 4 #100

Merged
merged 1 commit into from Nov 22, 2021
Merged

Generate up to 8 random padding bytes at a time instead of 4 #100

merged 1 commit into from Nov 22, 2021

Conversation

gwynne
Copy link
Contributor

@gwynne gwynne commented Nov 18, 2021

Fixes a (presumably copy-pasta) typo in ByteBuffer.writeSSHPaddingBytes(count:) where only 4 random bytes would be requested from the CSPRNG at a time even when 8 or more were needed. The only impact of this issue is a very small performance penalty (so small that it's likely unmeasurable outside of microbenchmarks in practice, in fact), but might as well fix it anyhow.

@swift-server-bot
Copy link

Can one of the admins verify this patch?

5 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@Lukasa
Copy link
Collaborator

Lukasa commented Nov 22, 2021

@swift-server-bot add to allowlist

@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Nov 22, 2021
@Lukasa Lukasa merged commit d96ee8a into apple:main Nov 22, 2021
@gwynne gwynne deleted the patch-1 branch November 22, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants