From: David Howells Date: Wed, 9 Jul 2008 22:06:45 +0000 (-0700) Subject: netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP X-Git-Tag: upstream/snapshot3+hdmi~24424^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=252815b0cfe711001eff0327872209986b36d490;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- 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;