Re: [PATCH net-next] tipc: re-order conditions in tipc_crypto_key_rcv()
From: Simon Horman
Date: Fri Jan 17 2025 - 13:02:45 EST
On Fri, Jan 17, 2025 at 12:36:14PM +0300, Dan Carpenter wrote:
> On a 32bit system the "keylen + sizeof(struct tipc_aead_key)" math could
> have an integer wrapping issue. It doesn't matter because the "keylen"
> is checked on the next line, but just to make life easier for static
> analysis tools, let's re-order these conditions and avoid the integer
> overflow.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>