On Fri, Aug 14, 2026 at 9:10 AM Michael Paquier <[email protected]> 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