Skip to content

Commit

Permalink
[PATCH] Array overrun in drivers/infiniband/core/cma.c
Browse files Browse the repository at this point in the history
This was spotted by coverity #id 1300.  Since the array has only four
elements, we should just use those four.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
SesterhennEric authored and Linus Torvalds committed Jun 26, 2006
1 parent 09c0dc6 commit 5fd571c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct sockaddr *addr)
else {
ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr;
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;
}
}

Expand Down

0 comments on commit 5fd571c

Please sign in to comment.