[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABKbRo+7=_p=yt02FsCtTksA5C0_eS2LHt-FMkE1ddpuaEDJ6w@mail.gmail.com>
Date: Wed, 13 Aug 2025 16:13:29 +0200
From: Miguel García Román <miguelgarciaroman8@...il.com>
To: Alexis Lothoré <alexis.lothore@...tlin.com>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
ajay.kathat@...rochip.com, claudiu.beznea@...on.dev, marex@...x.de,
kvalo@...nel.org, skhan@...uxfoundation.org
Subject: Re: [PATCH] wilc1000: replace deprecated strcpy() with strscpy()
Gentle ping.
Just checking if anything else is needed for this patch.
Reviewed-by: Alexis Lothoré <alexis.lothore@...tlin.com>
Thanks!
El lun, 7 jul 2025 a las 8:58, Alexis Lothoré
(<alexis.lothore@...tlin.com>) escribió:
>
> Hi,
>
> On Sat Jul 5, 2025 at 3:48 PM CEST, Miguel García wrote:
> > strcpy() is deprecated for NUL-terminated strings. Replace the single
> > instance in wilc1000 netdev setup with strscpy(), which guarantees
> > NUL-termination and prevents overflow.
> >
> > ndev->name is a fixed-size buffer (IFNAMSIZ, 16 bytes).
> >
> > Signed-off-by: Miguel García <miguelgarciaroman8@...il.com>
>
> LGTM, thanks for the update
>
> Reviewed-by: Alexis Lothoré <alexis.lothore@...tlin.com>
>
> > ---
> > drivers/net/wireless/microchip/wilc1000/netdev.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c
> > index af298021e050..8f4d11e1a2a6 100644
> > --- a/drivers/net/wireless/microchip/wilc1000/netdev.c
> > +++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
> > @@ -960,7 +960,7 @@ struct wilc_vif *wilc_netdev_ifc_init(struct wilc *wl, const char *name,
> >
> > vif = netdev_priv(ndev);
> > ndev->ieee80211_ptr = &vif->priv.wdev;
> > - strcpy(ndev->name, name);
> > + strscpy(ndev->name, name, sizeof(ndev->name));
> > vif->wilc = wl;
> > vif->ndev = ndev;
> > ndev->ml_priv = vif;
>
>
>
>
> --
> Alexis Lothoré, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Powered by blists - more mailing lists