mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
xfrm: use correct size to initialise sp->ovec
[ Upstream commit f1193e9157 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6b9c4eddb3
commit
7f02606367
@@ -131,7 +131,7 @@ struct sec_path *secpath_dup(struct sec_path *src)
|
||||
sp->len = 0;
|
||||
sp->olen = 0;
|
||||
|
||||
memset(sp->ovec, 0, sizeof(sp->ovec[XFRM_MAX_OFFLOAD_DEPTH]));
|
||||
memset(sp->ovec, 0, sizeof(sp->ovec));
|
||||
|
||||
if (src) {
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user