| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Mark Atwood <mark(at)reviewcommit(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later |
| Date: | 2026-08-14 00:23:28 |
| Message-ID: | CAHGQGwGPjENxX1SmkPrv9Rb-Fnij8jN4ginObmSTnWXqROS2+g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Aug 14, 2026 at 9:10 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, Aug 13, 2026 at 10:06:19AM +0900, Michael Paquier wrote:
> > As this part was itching me, I have taken a shot at simplifying the
> > patch, and it looks much better once adapted among these lines. The
> > EVP_MD_free() feel slightly annoying, but they're isolated enough that
> > they don't matter to me. A second thing is the const marker for
> > EVP_MD, which avoids some casts or some unconstify(). At the end that
> > feels like the best thing to do.
>
> And applied this one as 28995f051e72, which should be the last piece..
Thanks for working on this!
+ algo_name = OBJ_nid2sn(algo_nid);
+ if (algo_name == NULL)
+ elog(ERROR, "could not find digest for NID %s",
+ OBJ_nid2sn(algo_nid));
+ algo_name = OBJ_nid2sn(algo_nid);
+ if (algo_name == NULL)
+ {
+ libpq_append_conn_error(conn, "could not find digest for NID %s",
+ OBJ_nid2sn(algo_nid));
In these cases, algo_name is NULL, so OBJ_nid2sn(algo_nid) is also
NULL. That means NULL would be passed to %s in both elog() and
libpq_append_conn_error().
Isn't it better to use %d and pass algo_nid instead?
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-08-14 00:37:34 | Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later |
| Previous Message | Richard Guo | 2026-08-14 00:17:31 | Re: Tracking per-RelOptInfo uniqueness during planning |