Avoid core dump after getpwuid_r failure.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Sep 2024 23:14:40 +0000 (19:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Sep 2024 23:14:40 +0000 (19:14 -0400)
commit2e62fa62d6745ba3bcb0a517d002aff1f3cdefb7
tree89e611fd20a4e87b7002cde29544a0bc3285a368
parentd8df7ac5c04cd17bf13bd3123dcfcaf8007c6280
Avoid core dump after getpwuid_r failure.

Looking up a nonexistent user ID would lead to a null pointer
dereference.  That's unlikely to happen here, but perhaps
not impossible.

Thinko in commit 4d5111b3f, noticed by Coverity.
src/interfaces/libpq/fe-auth.c