All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Baker <len.baker@gmx.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Len Baker <len.baker@gmx.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging/ks7010: Remove all strcpy() uses in favor of strscpy()
Date: Fri, 23 Jul 2021 16:30:25 +0200	[thread overview]
Message-ID: <20210723143025.GA2612@titan> (raw)
In-Reply-To: <20210719052623.GW25548@kadam>

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

      reply	other threads:[~2021-07-23 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 15:37 [PATCH] staging/ks7010: Remove all strcpy() uses in favor of strscpy() Len Baker
2021-07-19  5:26 ` Dan Carpenter
2021-07-23 14:30   ` Len Baker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210723143025.GA2612@titan \
    --to=len.baker@gmx.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.