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
- v2-0001-Use-pstrdup-for-remote_host-and-remote_port-save-.patch (application/octet-stream) patch v2-0001
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
-
Avoid low-probability crash on out-of-memory.
- d24eb0e91f3f 14.16 landed
- cd1c8b992e9f 13.19 landed
- 4398507dfafc 15.11 landed