Commit 7f026063 authored by Li RongQing's avatar Li RongQing Committed by Greg Kroah-Hartman

xfrm: use correct size to initialise sp->ovec

[ Upstream commit f1193e91 ]

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: default avatarLi RongQing <lirongqing@baidu.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6b9c4edd
...@@ -131,7 +131,7 @@ struct sec_path *secpath_dup(struct sec_path *src) ...@@ -131,7 +131,7 @@ struct sec_path *secpath_dup(struct sec_path *src)
sp->len = 0; sp->len = 0;
sp->olen = 0; sp->olen = 0;
memset(sp->ovec, 0, sizeof(sp->ovec[XFRM_MAX_OFFLOAD_DEPTH])); memset(sp->ovec, 0, sizeof(sp->ovec));
if (src) { if (src) {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment