| From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tristan Partin <tristan(at)partin(dot)io> |
| Subject: | Re: Grab bag of smaller OpenSSL fixups |
| Date: | 2026-07-14 12:57:34 |
| Message-ID: | 9744c026-0c69-4317-b453-85b7b4b83110@proxel.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 7/14/26 10:35, Daniel Gustafsson wrote:
>> The comment should maybe also add that entry and peer_cn_asn1 too are OpenSSL owned pointers. Just saying it for peer_cn_internal seems a bit odd to me.
>
> The other pointers are of OpenSSL data types and those are rarely freed unless
> a matching _new or _dup method has been called, whereas peer_cn_internal is a
> char pointer extracted with _get0_data. To me the latter seemed more
> reasonable to believe it was caller owned, but I can remove the comment
> altogether if it's deemed useless.
I don't have a strong opinion here so do whatever you feel like, but at
least to me the current comment does not add much value.
> The attached also contains the non-null guards from Tristans review upthread.
My compiler did not like the mix of both assert and nonnull attribute.
In file included from ../postgresql/src/include/postgres.h:48,
from
../postgresql/src/backend/libpq/be-secure-openssl.c:17:
../postgresql/src/backend/libpq/be-secure-openssl.c: In function
‘init_host_context’:
../postgresql/src/include/c.h:1018:20: warning: ‘nonnull’ argument
‘hasWarned’ compared to NULL [-Wnonnull-compare]
1018 | if (!(condition)) \
| ^
../postgresql/src/backend/libpq/be-secure-openssl.c:613:9: note: in
expansion of macro ‘Assert’
613 | Assert(hasWarned);
| ^~~~~~
--
Andreas Karlsson
Percona
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2026-07-14 13:05:00 | Re: walsummarizer can get stuck when switching timelines |
| Previous Message | Amit Kapila | 2026-07-14 12:49:35 | Re: walsummarizer can get stuck when switching timelines |