Skip to content

Commit

Permalink
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells authored and David S. Miller committed Jul 9, 2008
1 parent 6b69fe0 commit 252815b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/nf_nat_snmp_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 252815b

Please sign in to comment.