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

crypto: fixup randomFill size and offset handling #38138

Closed
wants to merge 3 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Apr 7, 2021

Fixes: #38137

Signed-off-by: James M Snell [email protected]

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Apr 7, 2021
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@jasnell jasnell force-pushed the fixup-randomfill-size branch from 023bb27 to b394ef2 Compare April 7, 2021 18:31
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

I guess this LGTM in the sense that it makes the code work correctly now, but I’m not really eager to click “approve” given how hard to understand this code is (Functions whose names start with assert that silently use different units for input and output? I think we can do better…)

@jasnell
Copy link
Member Author

jasnell commented Apr 7, 2021

that silently use different units for input and output? I think we can do better…)

Agreed. I left these as is during the refactor and didn't like the way these were implemented then and still don't. It'll be good to refactor these next but let's address the immediate bug first.

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Let’s at least leave a comment about why this is so confusing

lib/internal/crypto/random.js Show resolved Hide resolved
Co-authored-by: Anna Henningsen <[email protected]>
@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 8, 2021
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Apr 8, 2021

Co-authored-by: Darshan Sen <[email protected]>
@jasnell jasnell added the fast-track PRs that do not need to wait for 48 hours to land. label Apr 8, 2021
@jasnell
Copy link
Member Author

jasnell commented Apr 8, 2021

CI is green on this and it fixes a bug. There's no reason to make it wait the full 48 hours. Please 👍🏻 to fast track

@nodejs-github-bot
Copy link
Collaborator

jasnell added a commit that referenced this pull request Apr 9, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: #38138
Fixes: #38137
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@jasnell
Copy link
Member Author

jasnell commented Apr 9, 2021

Landed in d2f116c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem. fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crypto.randomFill : error with TypedArray
8 participants