[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240701195908.06f8edc3@kernel.org>
Date: Mon, 1 Jul 2024 19:59:08 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jay Vosburgh <jay.vosburgh@...onical.com>
Cc: 'Simon Horman' <horms@...nel.org>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Andy Gospodarek <andy@...yhouse.net>, Ding Tianhong
<dingtianhong@...wei.com>, Hangbin Liu <liuhangbin@...il.com>, Sam Sun
<samsun1006219@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net v5] bonding: Fix out-of-bounds read in
bond_option_arp_ip_targets_set()
On Mon, 01 Jul 2024 16:07:46 -0700 Jay Vosburgh wrote:
> > if (strlen(newval->string) < 1 ||
>
> I find the second option clearer, FWIW. This isn't in a hot
> path, and including strlen() in there makes it more obvious to my
> reading what the intent is. The size_t return from strlen() is
> unsigned, so we really want to test the return value for zero-ness.
True, I picked < 1 because the line below offsets by 1.
Either way is fine, but lets make sure we drop the parenthesis.
Powered by blists - more mailing lists