Commit 5fd571cb authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by 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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Acked-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment