-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uipc.c to never pass -1 to FD_ISSET.
The behavior of FD_ISSET when passed -1 is undefined. I checked all calls of FD_SET and FD_CLR in this file, and they all seem to be correctly guarded. None of the FD_ISSET calls were, so I added a SAFE_FD_ISSET macro to return false when passed -1, which is presumably what the callers intended. This allows Bluetooth to be enabled on a device where the C library aborts if passed any out of range fd. Bug: 11047121 Change-Id: I261404a5a80884d5e9edab8beb3c93969113dc76
- Loading branch information
1 parent
a3c389f
commit 2408d9e
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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