Skip to content

Commit

Permalink
Use return value of getpwuid_r(), not errno (#13969)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-lb authored Apr 16, 2024
1 parent c3acfb1 commit 32efc76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/posix/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ PHP_FUNCTION(posix_getpwuid)
try_again:
err = getpwuid_r(uid, &_pw, pwbuf, pwbuflen, &retpwptr);
if (err || retpwptr == NULL) {
if (errno == ERANGE) {
if (err == ERANGE) {
pwbuflen *= 2;
pwbuf = erealloc(pwbuf, pwbuflen);
goto try_again;
Expand Down

0 comments on commit 32efc76

Please sign in to comment.