From: Willy Tarreau <w@1wt.eu>
To: Rodrigo Campos <rodrigo@sdfg.com.ar>
Cc: "Thomas Weißschuh" <linux@weissschuh.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/4] Misc fixes for strlcpy() and strlcat()
Date: Mon, 19 Feb 2024 21:48:21 +0100 [thread overview]
Message-ID: <20240219204821.GA9819@1wt.eu> (raw)
In-Reply-To: <20240218195110.1386840-1-rodrigo@sdfg.com.ar>
Hi Rodrigo,
On Sun, Feb 18, 2024 at 04:51:02PM -0300, Rodrigo Campos wrote:
> As requested by Willy and Thomas[1], here go some more fixes and tests for
> strlcpy() and strlcat().
>
> The first patch just fixes the compilation when the compiler might replace some
> code with its strlen() implementation, which will not be found. Therefore, we
> just export it as that can happen also on user-code, outside of nolibc.
>
> The rest of the commits:
> * Fix the return code of both functions
> * Make sure to always null-terminate the dst buffer
> * Honor the size parameter as documented
> * Add tests for both functions
>
> All has been checked against the corresponding libbsd implementation[2].
>
> Let me know what you think ?
This time everything looked good to me and I queued them into the fixes
branch since they address a real corner-case bug. I finally decided not
to change your comment for '/*' on a single line because it turns out
that the file in question almost exclusively uses the shorter, net-style
comments like you did, and you were probably inspired by the surrounding
ones.
Many thanks for your work and your patience ;-)
Willy
next prev parent reply other threads:[~2024-02-19 20:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-18 19:51 Rodrigo Campos
2024-02-18 19:51 ` [PATCH v3 1/4] tools/nolibc/string: export strlen() Rodrigo Campos
2024-02-18 19:51 ` [PATCH v3 2/4] tools/nolibc: Fix strlcat() return code and size usage Rodrigo Campos
2024-02-18 19:51 ` [PATCH v3 3/4] tools/nolibc: Fix strlcpy() " Rodrigo Campos
2024-02-18 19:51 ` [PATCH v3 4/4] selftests/nolibc: Add tests for strlcat() and strlcpy() Rodrigo Campos
2024-02-18 20:39 ` Rodrigo Campos
2024-02-18 21:11 ` Willy Tarreau
2024-02-18 21:41 ` Rodrigo Campos
2024-04-23 9:18 ` Thomas Weißschuh
2024-04-23 16:28 ` Willy Tarreau
2024-04-23 19:49 ` Paul E. McKenney
2024-04-26 16:43 ` Rodrigo Campos
2024-02-19 20:48 ` Willy Tarreau [this message]
2024-02-20 19:25 ` [PATCH v3 0/4] Misc fixes for strlcpy() and strlcat() Rodrigo Campos
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=20240219204821.GA9819@1wt.eu \
--to=w@1wt.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=rodrigo@sdfg.com.ar \
/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
all inboxes | Powered by JetHome®