[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87f0153e-9d4c-b8ee-e2f0-ac12a430e92a@iogearbox.net>
Date: Wed, 23 Jan 2019 14:53:14 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Martin Lau <kafai@...com>, Yafang Shao <laoar.shao@...il.com>,
Lawrence Brakmo <brakmo@...com>
Cc: "ast@...nel.org" <ast@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"shaoyafang@...iglobal.com" <shaoyafang@...iglobal.com>
Subject: Re: [PATCH bpf-next] bpf: use the proper optlen when doing strncpy in
bpf_getsockopt()
On 01/22/2019 07:04 PM, Martin Lau wrote:
> On Sat, Jan 19, 2019 at 02:20:52PM +0800, Yafang Shao wrote:
>> As the last character of optval will be set with 0, so just copying
>> (optlen - 1) characters is enough.
> I am not sure this optimization is needed but I think it will
Yeah, it's totally fine as is.
Powered by blists - more mailing lists