提交 5fd571cb 编写于 作者: E Eric Sesterhenn 提交者: Linus Torvalds

[PATCH] Array overrun in drivers/infiniband/core/cma.c

This was spotted by coverity #id 1300.  Since the array has only four
elements, we should just use those four.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NSean Hefty <sean.hefty@intel.com>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 09c0dc68
...@@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct sockaddr *addr) ...@@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct sockaddr *addr)
else { else {
ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr;
return (ip6->s6_addr32[0] | ip6->s6_addr32[1] | return (ip6->s6_addr32[0] | ip6->s6_addr32[1] |
ip6->s6_addr32[3] | ip6->s6_addr32[4]) == 0; ip6->s6_addr32[2] | ip6->s6_addr32[3]) == 0;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册