Re: Potential null pointer dereference in postgres.c

Maxim Orlov <orlovmg@gmail.com>

From: Maxim Orlov <orlovmg@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Karina Litskevich <litskevichkarina@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-06T15:52:20Z
Lists: pgsql-hackers

Attachments

I'm glad you are bringing up this issue. By the way, there are two more
annoying places in postmaster.c for pg16 and older. See, strdup() also may
fail if insufficient memory available.

PFA patch for a REL_16_STABLE. It also applies to older versions.

-- 
Best regards,
Maxim Orlov.

Commits

  1. Avoid low-probability crash on out-of-memory.