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

Allow getpwuid_r to return missing entry. #350

Merged
merged 1 commit into from
Oct 31, 2019

Conversation

TheModMaker
Copy link
Member

If the getpwuid_r method doesn't find an entry with the given ID, it will still return success (0), but the *result will be set to NULL. This checks the result value so it won't crash if it doesn't find the entry.

This normally shouldn't ever happen (since it just got the value from geteuid()), but it can somehow happen on iOS simulators.

If the getpwuid_r method doesn't find an entry with the given ID, it
will still return success (0), but the *result will be set to NULL.
This checks the |result| value so it won't crash if it doesn't find
the entry.

This normally shouldn't ever happen, but it can somehow happen on
iOS simulators.
@sergiud sergiud merged commit 242130d into google:master Oct 31, 2019
@sergiud sergiud added this to the 0.5 milestone Apr 13, 2021
@sergiud sergiud mentioned this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants