Re: Unchecked strdup leading to segfault in pg_dump

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Unchecked strdup leading to segfault in pg_dump
Дата
Msg-id 20231220162026.GD833819@nathanxps13
обсуждение исходный текст
Ответ на Re: Unchecked strdup leading to segfault in pg_dump  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: introduce dynamic shared memory registry
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Remove MSVC scripts from the tree