From: Tom Rini <trini@konsulko.com>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
Sean Anderson <sean.anderson@seco.com>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
u-boot-amlogic@groups.io, u-boot@ew.tq-group.com
Subject: Re: [PATCH 1/2] Revert "lib: string: Fix strlcpy return value", fix callers
Date: Tue, 8 Aug 2023 21:39:36 -0400 [thread overview]
Message-ID: <20230809013936.GS3630934@bill-the-cat> (raw)
In-Reply-To: <20230714112451.144294-1-matthias.schiffer@ew.tq-group.com>
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
On Fri, Jul 14, 2023 at 01:24:50PM +0200, Matthias Schiffer wrote:
> Both the Linux kernel and libbsd agree that strlcpy() should always
> return strlen(src) and not include the NUL termination. The incorrect
> U-Boot implementation makes it impossible to check the return value for
> truncation, and breaks code written with the usual implementation in
> mind (for example, fdtdec_add_reserved_memory() was subtly broken).
>
> I reviewed all callers of strlcpy() and strlcat() and fixed them
> according to my understanding of the intended function.
>
> This reverts commit d3358ecc54be0bc3b4dd11f7a63eab0a2842f772 and adds
> related fixes.
>
> Fixes: d3358ecc54be ("lib: string: Fix strlcpy return value")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2023-08-09 1:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 11:24 [PATCH 1/2] Revert "lib: string: Fix strlcpy return value", fix callers Matthias Schiffer
2023-07-14 11:24 ` [PATCH 2/2] lib/charset: fix u16_strlcat() return value Matthias Schiffer
2023-08-09 1:39 ` Tom Rini
2023-08-02 10:06 ` [PATCH 1/2] Revert "lib: string: Fix strlcpy return value", fix callers Matthias Schiffer
2023-08-02 16:45 ` Tom Rini
2023-08-02 16:53 ` Simon Glass
2023-08-03 16:33 ` Sean Anderson
2023-08-07 7:45 ` Rasmus Villemoes
2023-08-09 17:18 ` Tom Rini
2023-08-09 1:39 ` Tom Rini [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=20230809013936.GS3630934@bill-the-cat \
--to=trini@konsulko.com \
--cc=masahisa.kojima@linaro.org \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--cc=u-boot-amlogic@groups.io \
--cc=u-boot@ew.tq-group.com \
--cc=u-boot@lists.denx.de \
/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