[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250728-poised-agile-meerkat-0b2c79@kuoka>
Date: Mon, 28 Jul 2025 07:23:56 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Miguel García <miguelgarciaroman8@...il.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
robh@...nel.org, saravanak@...gle.com, skhan@...uxfoundation.org
Subject: Re: [PATCH] of: replace deprecated strcpy() with strscpy()
On Thu, Jul 24, 2025 at 09:33:41AM +0200, Miguel García wrote:
> @@ -84,7 +84,7 @@ static struct property * __init of_pdt_build_one_prop(phandle node, char *prev,
>
> p->name = (char *) (p + 1);
> if (special_name) {
> - strcpy(p->name, special_name);
> + strscpy(p->name, special_name, sizeof(p->name));
This was not ever tested and I don't think you understand how C pointers
work.
Please document here how exactly did you test this code path?
Best regards,
Krzysztof
Powered by blists - more mailing lists