Re: Grab bag of smaller OpenSSL fixups - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Grab bag of smaller OpenSSL fixups
Date
Msg-id 9AFE0980-BE95-446F-8F58-2FEFE405A4F2@yesql.se
Whole thread
Responses Re: Grab bag of smaller OpenSSL fixups
List pgsql-hackers
> On 13 Jul 2026, at 22:38, Tristan Partin <tristan@partin.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




pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: on_error table, saving error info to a table
Next
From: Michael Paquier
Date:
Subject: Re: [Proposal] Adding callback support for custom statistics kinds