提交 f1193e91 编写于 作者: L Li RongQing 提交者: Steffen Klassert

xfrm: use correct size to initialise sp->ovec

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: NLi RongQing <lirongqing@baidu.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 b7138fdd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部