public inbox for [email protected]
help / color / mirror / Atom feedFrom: Mario González Troncoso <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Possible replace of strncpy on xactdesc.c
Date: Mon, 6 Jul 2026 18:26:57 -0400
Message-ID: <CAFsReFWd5dmy16S5Umsn=peurgpiph0fd4H1BmLtbrMzC_OvPA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAFsReFVjinOs0tqbb1C_LgSrpemDNgA3zQembNytOfJyaktHFw@mail.gmail.com>
<[email protected]>
On Mon, 6 Jul 2026 at 10:38, Daniel Gustafsson <[email protected]> wrote:
>
>
> As a general rule it's a good idea to replace strncpy with strlcpy.
>
> > The other functions that are inside the file already use strlcpy() so
> > maybe the use of current strncpy() on xactdesc.c is just code that
> > comes from the refactor itself.
>
> It was introduced in 1eb6d6527aae in twophase.c and then moved to xaxtdesc.c in
> the above mentioned commit.
>
> > I'll send a proper patch once some feedback is received but at least
> > it's compiling and passing local tests.
>
> Sounds good, please send a patch.
>
Great. Sending it now after rebasing from master and passing local
tests (long live cirrus CI).
I added this to the commitfest as well
https://commitfest.postgresql.org/patch/6989/
>
--
Mario Gonzalez
EDB: https://www.enterprisedb.com
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Possible replace of strncpy on xactdesc.c
In-Reply-To: <CAFsReFWd5dmy16S5Umsn=peurgpiph0fd4H1BmLtbrMzC_OvPA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox