OSDN Git Service

xfrm: use correct size to initialise sp->ovec
authorLi RongQing <lirongqing@baidu.com>
Sun, 7 Oct 2018 02:22:42 +0000 (10:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:31 +0000 (08:20 +0100)
commit7f02606367b3aecf1c365d3f076ae643c90fdb8d
treeffb98a45f8969c3f8b6ff3b8d6e4c92f528ce08c
parent6b9c4eddb3bebde1c1ae229fdce876fb82205920
xfrm: use correct size to initialise sp->ovec

[ Upstream commit f1193e915748291fb205a908db33bd3debece6e2 ]

This place should want to initialize array, not a element,
so it should be sizeof(array) instead of sizeof(element)

but now this array only has one element, so no error in
this condition that XFRM_MAX_OFFLOAD_DEPTH is 1

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_input.c