[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210723143025.GA2612@titan>
Date: Fri, 23 Jul 2021 16:30:25 +0200
From: Len Baker <len.baker@....com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Len Baker <len.baker@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging/ks7010: Remove all strcpy() uses in favor of
strscpy()
Hi,
On Mon, Jul 19, 2021 at 08:26:23AM +0300, Dan Carpenter wrote:
> On Sat, Jul 17, 2021 at 05:37:59PM +0200, Len Baker wrote:
> > @@ -1808,7 +1808,7 @@ static int ks_wlan_get_firmware_version(struct net_device *dev,
> > {
> > struct ks_wlan_private *priv = netdev_priv(dev);
> >
> > - strcpy(extra, priv->firmware_version);
> > + strscpy(extra, priv->firmware_version, sizeof(extra));
>
> Extra is a pointer and not an array so this doesn't work.
Apologies. I will send a v2 for review.
Thanks for your time.
Len
Powered by blists - more mailing lists