Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fd571cb authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds
Browse files

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;
	}
	}
}
}