Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)
Date: 2025-06-16 19:48:16
Message-ID: CAEudQArgiALbV1akQpeZOgim7XP05n=bDP1=TcOYLA43nRX_vA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

In the function *estimate_path_cost_size* the parameter
fpextra can be NULL.

It is necessary to always check its validity,
as is already done in other parts of the source.

patch attached.

Best regards,
Ranier Vilela

Attachment Content-Type Size
fix-possible-dereference-null-pointer-postgres_fdw.patch application/octet-stream 586 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-06-16 19:59:53 Re: Amcheck verification of GiST and GIN
Previous Message Tom Lane 2025-06-16 19:46:54 Re: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf