[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130930211041.38836334@nehalam.linuxnetplumber.net>
Date: Mon, 30 Sep 2013 21:10:41 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Fan Du <fan.du@...driver.com>
Cc: Sohny Thomas <sthomas@...ux.vnet.ibm.com>,
David Laight <David.Laight@...lab.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH] {iproute2, xfrm}: Use memcpy to suppress gcc phony
buffer overflow warning
> diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
> index 0d98e78..5cc87d3 100644
> --- a/ip/xfrm_state.c
> +++ b/ip/xfrm_state.c
> @@ -159,7 +159,7 @@ static int xfrm_algo_parse(struct xfrm_algo *alg, enum xfrm_attr_type_t type,
> if (len > max)
> invarg("\"ALGO-KEY\" makes buffer overflow\n", key);
>
> - strncpy(buf, key, len);
> + memcpy(buf, key, len);
> }
> }
>
Applied this patch. With some edits to make commit message logical.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists