summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-06-21 20:56:26 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 20:57:28 +0200
commit5fd571cbc13db113bda26c20673e1ec54bfd26b4 (patch)
tree9201d13d9cabe8e06497fe22f2d0243f0f054f90
parentRevert "[PATCH] kthread: update loop.c to use kthread" (diff)
downloadlinux-5fd571cbc13db113bda26c20673e1ec54bfd26b4.tar.xz
linux-5fd571cbc13db113bda26c20673e1ec54bfd26b4.zip
[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: Eric Sesterhenn <snakebyte@gmx.de> Acked-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/infiniband/core/cma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index a76834edf608..863f64befc7c 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -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;
}
}