pgsql: Avoid core dump after getpwuid_r failure.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid core dump after getpwuid_r failure.
Date: 2024-09-08 23:15:08
Message-ID: E1snR7b-000CFD-PE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e62fa62d6745ba3bcb0a517d002aff1f3cdefb7

Modified Files
--------------
src/interfaces/libpq/fe-auth.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-09-09 02:14:45 pgsql: Add callbacks to control flush of fixed-numbered stats
Previous Message Michael Paquier 2024-09-07 11:21:03 pgsql: Update extension lookup routines to use the syscache