projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7138fd
)
xfrm: use correct size to initialise sp->ovec
author
Li RongQing
<lirongqing@baidu.com>
Sun, 7 Oct 2018 02:22:42 +0000
(10:22 +0800)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Mon, 8 Oct 2018 06:15:55 +0000
(08:15 +0200)
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>
net/xfrm/xfrm_input.c
patch
|
blob
|
blame
|
history
diff --git
a/net/xfrm/xfrm_input.c
b/net/xfrm/xfrm_input.c
index be3520e429c9f989a712f7bf32874bed7d3aa667..684c0bc01e2c12ce5ef61195030fbad2cd26fc02 100644
(file)
--- 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;