Re: Unchecked strdup leading to segfault in pg_dump

2023-12-20 Thread Nathan Bossart
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

Re: Unchecked strdup leading to segfault in pg_dump

2023-12-20 Thread Tristan Partin
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_strdu

Unchecked strdup leading to segfault in pg_dump

2023-12-20 Thread Daniel Gustafsson
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. -- Daniel Gustafsson pg_dump_st