On Mon, Apr 13, 2026 at 05:20:06PM +0200, Willy Tarreau wrote:
> On Mon, Apr 13, 2026 at 02:36:17PM +0000, Egor Shestakov wrote:
> > > > > diff --git a/src/acme.c b/src/acme.c
> > > > > index eb7137b4c..437528c08 100644
> > > > > --- a/src/acme.c
> > > > > +++ b/src/acme.c
> > > > > @@ -800,8 +800,8 @@ static int cfg_postsection_acme()
> > > > >       /* tries to open the account key  */
> > > > >       if (stat(path, &st) == 0) {
> > > > >               if (ssl_sock_load_key_into_ckch(path, NULL, 
> > > > > store->data, &errmsg)) {
> > > > > -                     memprintf(&errmsg, "%s'%s' is present but 
> > > > > cannot be read or parsed.\n", errmsg && *errmsg ? errmsg : NULL, 
> > > > > path);
> > > > > -                     if (errmsg && *errmsg)
> > > > > +                     memprintf(&errmsg, "%s'%s' is present but 
> > > > > cannot be read or parsed.\n", errmsg, path);
> > > > > +                     if (errmsg)
> > > > >                               indent_msg(&errmsg, 8);
> > > > >                       err_code |= ERR_ALERT | ERR_FATAL | ERR_ABORT;
> > > > >                       ha_alert("acme: %s\n", errmsg);
> > > > 
> > > I can revert it and re-apply it as a separate fix if needed, though it's
> > > not really important as most of the time it will just print "(null)" for
> > > empty messages instead of nothing, though I'm not aware of any command
> > > not emitting empty error messages.
> > 
> > We get the "(null)" in the message in any case (with or without the patch).
> > There is not bug. My patch doesn't fix something, it just eliminate an
> > uneeded. This is reason why I didn't split it.
> 
> Oh you're totally right indeed, I read a bit too fast because I had
> found other occurrences doing a specific check. It's not clean to send
> a NULL into %s, as "(null)" is GNU and not standard. Here we should
> probably use: 'errmsg ? errmsg: ""' like at many other places.

I don't know that "(null)" is GNU. Would you like revert my patch to make a
backportable patch for this?

I can do that, if you want.

Maybe revert exactly this line will be easier? Although I think this may be
confusing.

-- 
Egor Shestakov
egor ascii(0x40) ved1 ascii(0x2E) me


Reply via email to