diff options
author | Li RongQing <lirongqing@baidu.com> | 2018-10-07 04:22:42 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2018-10-08 08:15:55 +0200 |
commit | f1193e915748291fb205a908db33bd3debece6e2 (patch) | |
tree | db561a6836493674ad6a5ec7fa847e65aca74722 /net/xfrm/xfrm_input.c | |
parent | xfrm: remove unnecessary check in xfrmi_get_stats64 (diff) | |
download | linux-f1193e915748291fb205a908db33bd3debece6e2.tar.xz linux-f1193e915748291fb205a908db33bd3debece6e2.zip |
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: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r-- | net/xfrm/xfrm_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index be3520e429c9..684c0bc01e2c 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -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; |