Linux Netfilter development
 help / color / mirror / Atom feed
* netfilter 02/02: nf_nat_snmp_basic: fix a range check in NAT for SNMP
@ 2008-07-09 16:46 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2008-07-09 16:46 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 02.diff --]
[-- Type: text/x-diff, Size: 1183 bytes --]

netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP

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>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit d2992a61a9c281b7414b0a4dc15cd28eef4d808e
tree 84919cc1b91c8954c859127b8bd652400a1cc3b1
parent baa04a1fb3dbef550ed1dc5acd15e21e7dde3b85
author David Howells <dhowells@redhat.com> Wed, 09 Jul 2008 18:34:22 +0200
committer Patrick McHardy <kaber@trash.net> Wed, 09 Jul 2008 18:34:22 +0200

 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] only message in thread

only message in thread, other threads:[~2008-07-09 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09 16:46 netfilter 02/02: nf_nat_snmp_basic: fix a range check in NAT for SNMP Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox