Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Eric Sesterhenn and committed by
Linus Torvalds
5fd571cb 09c0dc68

+1 -1
+1 -1
drivers/infiniband/core/cma.c
··· 476 476 else { 477 477 ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; 478 478 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; 480 480 } 481 481 } 482 482