All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix a range check in netfilter IP NAT for SNMP
@ 2008-07-09 11:53 David Howells
  2008-07-09 16:34 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2008-07-09 11:53 UTC (permalink / raw)
  To: kaber, akpm; +Cc: dhowells, netfilter-devel

Fix a range check in netfilter IP NAT for SNMP to always use a big enough size
variable that the compiler won't moan about comparing it to ULONG_MAX/8 on a
64-bit platform.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 net/ipv4/netfilter/nf_nat_snmp_basic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 7750c97..ffeaffc 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -439,8 +439,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
 				     unsigned int *len)
 {
 	unsigned long subid;
-	unsigned int  size;
 	unsigned long *optr;
+	size_t size;
 
 	size = eoc - ctx->pointer + 1;
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix a range check in netfilter IP NAT for SNMP
  2008-07-09 11:53 [PATCH] Fix a range check in netfilter IP NAT for SNMP David Howells
@ 2008-07-09 16:34 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-07-09 16:34 UTC (permalink / raw)
  To: David Howells; +Cc: akpm, netfilter-devel

David Howells wrote:
> Fix a range check in netfilter IP NAT for SNMP to always use a big enough size
> variable that the compiler won't moan about comparing it to ULONG_MAX/8 on a
> 64-bit platform.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-09 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09 11:53 [PATCH] Fix a range check in netfilter IP NAT for SNMP David Howells
2008-07-09 16:34 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.