Skip to contentSkip to conversation

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

PATCH Patrick McHardy 1 participant 1 message Jul 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
commit d2992a61a9c281b7414b0a4dc15cd28eef4d808e
tree 84919cc1b91c8954c859127b8bd652400a1cc3b1
parent baa04a1fb3dbef550ed1dc5acd15e21e7dde3b85
author David Howells <[email protected]> Wed, 09 Jul 2008 18:34:22 +0200 committer Patrick McHardy <[email protected]> Wed, 09 Jul 2008 18:34:22 +0200

 net/ipv4/netfilter/nf_nat_snmp_basic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/netfilter/nf_nat_snmp_basic.c +1 -1
index 7750c97..ffeaffc 100644
@@ -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;