Skip to content

Commit 5fd571c

Browse files
SesterhennEricLinus Torvalds
authored andcommitted
[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>
1 parent 09c0dc6 commit 5fd571c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/infiniband/core

‎drivers/infiniband/core/cma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct sockaddr *addr)
476476
else {
477477
ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr;
478478
return (ip6->s6_addr32[0] | ip6->s6_addr32[1] |
479-
ip6->s6_addr32[3] | ip6->s6_addr32[4]) == 0;
479+
ip6->s6_addr32[2] | ip6->s6_addr32[3]) == 0;
480480
}
481481
}
482482

0 commit comments

Comments
 (0)