Re: [PATCH] thermal: hwmon: replace deprecated strcpy() with strscpy()
From: Osama Abdelkader
Date: Wed Sep 03 2025 - 13:29:12 EST
On Wed, Sep 03, 2025 at 04:21:35PM +0200, Rafael J. Wysocki wrote:
> On Wed, Sep 3, 2025 at 4:04 PM Osama Abdelkader
> <osama.abdelkader@xxxxxxxxx> wrote:
> >
> > On Wed, Sep 03, 2025 at 01:50:03PM +0200, Rafael J. Wysocki wrote:
> > > On Mon, Sep 1, 2025 at 5:06 PM Osama Abdelkader
> > > <osama.abdelkader@xxxxxxxxx> wrote:
> > > >
> > > > strcpy() is deprecated; use strscpy() instead.
> > >
> > > So why is it better to use strscpy() in this particular case?
> >
> > Thanks for the review. Technically, there is no change since both have const buf size,
> > it's just for consistency with other drivers.
>
> $ cd linux-kernel-source
> $ git grep strcpy | wc -l
> 1187
>
> What kind of consistency do you mean?
I mean in thermal subsystem, it's only this one.