Uh oh!
There was an error while loading. Please reload this page.
fs: fix file descriptor validator - #49752
Merged
Merged
Conversation
bnoordhuis
approved these changes
Sep 22, 2023
bnoordhuis
left a comment
Member
There was a problem hiding this comment.
One additional step you could take is this (pseudo-ish code):
if(isFd(fd))validateInteger(fd,'options.fd',0,kMaxInt32);While passing ex. -1 or -42 to libuv is Mostly Harmless (should fail with UV_EBADF) it's probably best to turn what is currently a runtime error into a validation error. That might make it semver-major though.
(And I vote to rename kMaxInt to kMaxUint32 because I find the former highly misleading.)
lpinca
approved these changes
Sep 22, 2023
anonrig
commented
Sep 22, 2023
MemberAuthor
@bnoordhuis I'll follow up with a different pull request |
anonrigforce-pushed
the
fix-file-descriptors
branch
from
September 22, 2023 17:25
394e7e0 to
fa56769Compareanonrig
commented
Sep 22, 2023
MemberAuthor
@lpinca@bnoordhuis I had to force-push to rebase. Can you re-review? |
bnoordhuis
approved these changes
Sep 22, 2023
nodejs-github-bot
commented
Sep 22, 2023
Collaborator
nodejs-github-bot
commented
Sep 23, 2023
Collaborator
20 tasks
nodejs-github-bot
commented
Sep 24, 2023
Collaborator
nodejs-github-bot
commented
Sep 24, 2023
Collaborator
Landed in 5d6aa85 |
21 tasks
ruyadorno pushed a commit
that referenced
this pull request
Sep 28, 2023
PR-URL: #49752 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #49691 (comment) by @bnoordhuis