Re: Potential null pointer dereference in postgres.c

2025-01-10 Thread Maxim Orlov
I have to admit I was wrong with previous v2 patch. Sorry. Apparently, the chances of committing this very low, but here is the correct one. -- Best regards, Maxim Orlov. v3-0001-Use-pstrdup-for-remote_host-and-remote_port-save-.patch Description: Binary data

Re: Potential null pointer dereference in postgres.c

2024-12-06 Thread Maxim Orlov
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. v2-0001-Use-

Re: Potential null pointer dereference in postgres.c

2024-12-05 Thread Tom Lane
Karina Litskevich writes: > When backporting 66e94448 to older versions it was forgotten to check > malloc() result. In 16+ versions guc_malloc() is used to allocate > memory and it checks if the result pointer is NULL, so there is no > need to check it after guc_malloc(). Versions before 16 have