Re: Grab bag of smaller OpenSSL fixups

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tristan Partin <tristan(at)partin(dot)io>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Grab bag of smaller OpenSSL fixups
Date: 2026-07-14 07:49:11
Message-ID: 9AFE0980-BE95-446F-8F58-2FEFE405A4F2@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 13 Jul 2026, at 22:38, Tristan Partin <tristan(at)partin(dot)io> wrote:

> The patches look good.

Thanks for reviewing!

> I did have one comment in patch 0001. For the
> hasWarned argument to init_host_context, do we you think we should add
> an Assert(hasWarned) or add a pg_attribute_nonnull(3)? I see we
> dereference the pointer without first checking for its validity. I know
> it isn't common in Postgres source code to add such protections, but
> I figured I would point it out anyway.

Given that this is a very niche static function with very few callsites, I'm
not too worried about it being called with NULL. That being said, defensive
programming isn't just to defend against what we know but also what we don't
know about so I'm not against adding such protections. There are likely many
other functions in this file which could benefit more from pg_attribute_nonnull
but we also need to start somewhere.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-07-14 08:07:19 Re: [Proposal] Adding callback support for custom statistics kinds
Previous Message Daniel Gustafsson 2026-07-14 07:27:19 Re: blkreftable.c needs more sanity checks