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

os: NewFile(-1) crashes after CL 497075 #60406

Closed
prattmic opened this issue May 24, 2023 · 1 comment
Closed

os: NewFile(-1) crashes after CL 497075 #60406

prattmic opened this issue May 24, 2023 · 1 comment
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@prattmic
Copy link
Member

NewFile states "The returned value will be nil if fd is not a valid file descriptor." However, after CL 497075, NewFile crashes when passed a negative file descriptor (because newFile returns nil, which NewFile doesn't check).

I'll send out a fix shortly.

cc @tklauser

@prattmic prattmic added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels May 24, 2023
@prattmic prattmic added this to the Go1.21 milestone May 24, 2023
@prattmic prattmic self-assigned this May 24, 2023
@gopherbot
Copy link

Change https://go.dev/cl/497877 mentions this issue: os: explicitly check for invalid FD in NewFile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants