diff options
author | David Howells <dhowells@redhat.com> | 2008-07-09 15:06:45 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-20 11:15:45 -0700 |
commit | c119d39883ca9a7016a37fc701f7cbe7c3d03956 (patch) | |
tree | dd985ea60de52c8361f57b34d3c22da47576919f | |
parent | 2d72ac97f97ea85db7d1d78b75f4943aedd7af61 (diff) | |
download | lwn-c119d39883ca9a7016a37fc701f7cbe7c3d03956.tar.gz lwn-c119d39883ca9a7016a37fc701f7cbe7c3d03956.zip |
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
commit 252815b0cfe711001eff0327872209986b36d490 upstream
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Eugene Teo <eteo@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 5f35f0b589db..8e4148d39515 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c @@ -438,8 +438,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; |