Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 252815b0 authored by David Howells's avatar David Howells Committed by David S. Miller
Browse files

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6b69fe0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;