* [Patch] Array overrun in drivers/infiniband/core/cma.c
@ 2006-06-21 18:56 Eric Sesterhenn
2006-06-26 18:24 ` Sean Hefty
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-06-21 18:56 UTC (permalink / raw)
To: linux-kernel; +Cc: mshefty
hi,
this was spotted by coverity #id 1300. Since
the array has only four elements, we should
just use those four.
Patch is against todays git tree.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6/drivers/infiniband/core/cma.c.orig 2006-06-21 20:54:10.000000000 +0200
+++ linux-2.6/drivers/infiniband/core/cma.c 2006-06-21 20:54:22.000000000 +0200
@@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct s
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;
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Patch] Array overrun in drivers/infiniband/core/cma.c
2006-06-21 18:56 [Patch] Array overrun in drivers/infiniband/core/cma.c Eric Sesterhenn
@ 2006-06-26 18:24 ` Sean Hefty
0 siblings, 0 replies; 2+ messages in thread
From: Sean Hefty @ 2006-06-26 18:24 UTC (permalink / raw)
To: Eric Sesterhenn, Roland Dreier, torvalds; +Cc: linux-kernel
Eric Sesterhenn wrote:
> this was spotted by coverity #id 1300. Since
> the array has only four elements, we should
> just use those four.
>
> Patch is against todays git tree.
>
> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
please apply Eric's patch below
> --- linux-2.6/drivers/infiniband/core/cma.c.orig 2006-06-21 20:54:10.000000000 +0200
> +++ linux-2.6/drivers/infiniband/core/cma.c 2006-06-21 20:54:22.000000000 +0200
> @@ -476,7 +476,7 @@ static inline int cma_zero_addr(struct s
> 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;
> }
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-26 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-21 18:56 [Patch] Array overrun in drivers/infiniband/core/cma.c Eric Sesterhenn
2006-06-26 18:24 ` Sean Hefty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox