From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>,
glibc <libc-alpha@sourceware.org>
Cc: "tech@openbsd.org" <tech@openbsd.org>,
Christoph Hellwig <hch@lst.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
drepper@gmail.com
Subject: Re: [RFC] strcpys(): New function for copying strings safely
Date: Mon, 28 Jun 2021 14:10:39 +0200 [thread overview]
Message-ID: <6ea2efaf-7898-9723-54e7-2cd59702f854@gmail.com> (raw)
In-Reply-To: <d27912e6-f090-68af-295d-d40b00c1b0a7@gmail.com>
On 6/28/21 2:00 PM, Alejandro Colomar (man-pages) wrote:
> l = strscat(n - l, dest + l, src2);
Hmm, that's a bug; I wrote it too fast.
Either
l += strscpy(n - l, dest + l, src2);
or
l = strscat(n - l, dest, src2);
should be used instead.
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
prev parent reply other threads:[~2021-06-28 12:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 19:26 [RFC] strcpys(): New function for copying strings safely Alejandro Colomar (man-pages)
2021-06-27 19:46 ` Alejandro Colomar (man-pages)
2021-06-28 8:15 ` David Laight
2021-06-28 11:32 ` Alejandro Colomar (man-pages)
2021-06-28 12:00 ` Alejandro Colomar (man-pages)
2021-06-28 12:10 ` Alejandro Colomar (man-pages) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ea2efaf-7898-9723-54e7-2cd59702f854@gmail.com \
--to=alx.manpages@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=drepper@gmail.com \
--cc=hch@lst.de \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tech@openbsd.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).