public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Tristan Partin <[email protected]>
Cc: Daniel Gustafsson <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Unchecked strdup leading to segfault in pg_dump
Date: Wed, 20 Dec 2023 10:20:26 -0600
Message-ID: <20231220162026.GD833819@nathanxps13> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Wed, Dec 20, 2023 at 09:39:55AM -0600, Tristan Partin wrote:
> On Wed Dec 20, 2023 at 8:52 AM CST, Daniel Gustafsson wrote:
>> While looking at something else I noticed that pg_dump performs strdup without
>> checking the returned pointer, which will segfault in hasSuffix() in case of
>> OOM. The attached, which should be backpatched to 16, changes to using
>> pg_strdup instead which handles it.
>
> Looks good to me.
+1
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Unchecked strdup leading to segfault in pg_dump
In-Reply-To: <20231220162026.GD833819@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox