From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: Ariel.Elior@cavium.com, everest-linux-l2@cavium.com,
Tomer.Tayar@cavium.com, Yuval.Mintz@cavium.com,
Chad.Dupuis@cavium.com, Manish.Rangankar@cavium.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: qed: use correct strncpy() size
Date: Fri, 02 Feb 2018 19:43:14 -0500 (EST) [thread overview]
Message-ID: <20180202.194314.74937554805664914.davem@davemloft.net> (raw)
In-Reply-To: <20180202154500.1616404-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 2 Feb 2018 16:44:47 +0100
> passing the strlen() of the source string as the destination
> length is pointless, and gcc-8 now warns about it:
>
> drivers/net/ethernet/qlogic/qed/qed_debug.c: In function 'qed_grc_dump':
> include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
>
> This changes qed_grc_dump_big_ram() to instead uses the length of
> the destination buffer, and use strscpy() to guarantee nul-termination.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
prev parent reply other threads:[~2018-02-03 0:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 15:44 [PATCH] net: qed: use correct strncpy() size Arnd Bergmann
2018-02-03 0:43 ` David Miller [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=20180202.194314.74937554805664914.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Ariel.Elior@cavium.com \
--cc=Chad.Dupuis@cavium.com \
--cc=Manish.Rangankar@cavium.com \
--cc=Tomer.Tayar@cavium.com \
--cc=Yuval.Mintz@cavium.com \
--cc=arnd@arndb.de \
--cc=everest-linux-l2@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).