From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 2/5] tunnel: use strlcpy to avoid strncpy warnings
Date: Tue, 20 Mar 2018 09:47:24 -0600 [thread overview]
Message-ID: <6302c25c-d3c0-f034-0756-40c0900cb6ac@gmail.com> (raw)
In-Reply-To: <20180319165638.30166-3-stephen@networkplumber.org>
On 3/19/18 10:56 AM, Stephen Hemminger wrote:
> Fixes warnings about strncpy size by using strlcpy.
>
> tunnel.c: In function ‘tnl_gen_ioctl’:
> tunnel.c:145:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
> strncpy(ifr.ifr_name, name, IFNAMSIZ);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> ip/tunnel.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Acked-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2018-03-20 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 16:56 [PATCH iproute2 0/5] string truncation warning fixes Stephen Hemminger
2018-03-19 16:56 ` [PATCH iproute2 1/5] ip: use strlcpy() to avoid truncation Stephen Hemminger
2018-03-20 15:44 ` David Ahern
2018-03-19 16:56 ` [PATCH iproute2 2/5] tunnel: use strlcpy to avoid strncpy warnings Stephen Hemminger
2018-03-20 15:47 ` David Ahern [this message]
2018-03-19 16:56 ` [PATCH iproute2 3/5] bridge: avoid snprint truncation on time Stephen Hemminger
2018-03-20 15:47 ` David Ahern
2018-03-19 16:56 ` [PATCH iproute2 4/5] pedit: fix strncpy warning Stephen Hemminger
2018-03-20 15:48 ` David Ahern
2018-03-19 16:56 ` [PATCH iproute2 5/5] namespace: limit length of network namespace Stephen Hemminger
2018-03-20 15:50 ` David Ahern
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=6302c25c-d3c0-f034-0756-40c0900cb6ac@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).