public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tristan Partin <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Unchecked strdup leading to segfault in pg_dump
Date: Wed, 20 Dec 2023 09:39:55 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

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.

-- 
Tristan Partin
Neon (https://neon.tech)






view thread (3+ messages)  latest in thread

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]
  Subject: Re: Unchecked strdup leading to segfault in pg_dump
  In-Reply-To: <[email protected]>

* 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