[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegvt8ydN0uKYpbWVAmzZtHJ2kg3PwffZYvB33G_4fnq7BQ@mail.gmail.com>
Date: Fri, 19 Sep 2025 08:43:22 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Miquel Sabaté Solà <mssola@...ola.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: fuse: Use strscpy instead of strcpy
On Wed, 17 Sept 2025 at 22:55, Miquel Sabaté Solà <mssola@...ola.com> wrote:
>
> As pointed out in [1], strcpy() is deprecated in favor of
> strscpy().
>
> Furthermore, the length of the name to be copied is well known at this
> point since we are going to move the pointer by that much on the next
> line. Hence, it's safe to assume 'namelen' for the length of the string
> to be copied.
By "length of a string" usually the number of non-null chars is meant
(i.e. strlen(str)).
So the variable 'namelen' is confusingly named, a better one would be namesize.
>
> [1] KSPP#88
I don't understand this notation.
Patch itself looks good.
Thanks,
Miklos
Powered by blists - more mailing lists