linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Baker <len.baker@gmx.com>
Cc: 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: Mon, 19 Jul 2021 08:26:23 +0300	[thread overview]
Message-ID: <20210719052623.GW25548@kadam> (raw)
In-Reply-To: <20210717153759.13468-1-len.baker@gmx.com>

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.

regards,
dan carpenter


  reply	other threads:[~2021-07-19  5:27 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 [this message]
2021-07-23 14:30   ` Len Baker

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=20210719052623.GW25548@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=len.baker@gmx.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).