-
Notifications
You must be signed in to change notification settings - Fork 396
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
FD 0 is a valid file descriptor #199
Labels
hidraw
Related to Linux/hidraw backend
Comments
Relevant part from
|
so I guess 0 is a nonnegative integer, looks valid @mzyngier would you care to submit a PR? |
mzyngier
pushed a commit
to mzyngier/hidapi
that referenced
this issue
Oct 16, 2020
The open systcall is allowed to return 0 as a valid file descriptor, and considering it an error breaks environments where unnecessary fds are closed before executing untrusted processes. Fixes: libusb#199 Signed-off-by: Marc Zyngier <maz@kernel.org>
Youw
pushed a commit
that referenced
this issue
Oct 20, 2020
The open systcall is allowed to return 0 as a valid file descriptor, and considering it an error breaks environments where unnecessary fds are closed before executing untrusted processes. Fixes: #199 Signed-off-by: Marc Zyngier <maz@kernel.org>
Dids
pushed a commit
to Didstopia/SDL
that referenced
this issue
Nov 21, 2020
spurious
pushed a commit
to spurious/SDL-mirror
that referenced
this issue
Nov 21, 2020
berenm
pushed a commit
to bminor/SDL
that referenced
this issue
Nov 22, 2020
SDL-mirror-bot
pushed a commit
to SDL-mirror/SDL
that referenced
this issue
Nov 22, 2020
Youw
pushed a commit
that referenced
this issue
Nov 23, 2020
The open systcall is allowed to return 0 as a valid file descriptor, and considering it an error breaks environments where unnecessary fds are closed before executing untrusted processes. Fixes: #199 Signed-off-by: Marc Zyngier <maz@kernel.org>
Sibras
pushed a commit
to ShiftMediaProject/SDL
that referenced
this issue
Jan 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I may have reported this issue against a stale repository, so here it is again:
signal11/hidapi#462
Short story: File descriptor 0 is perfectly valid, and shouldn't be considered as an error.
hidapi/linux/hid.c
Lines 668 to 671 in d2c3a98
The text was updated successfully, but these errors were encountered: