Fix a range check in netfilter IP NAT for SNMP
Subsystems (2)
PATCH 1/1 Fix a range check in netfilter IP 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 <[email protected]>
---
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
@@ -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 ;
Patrick McHardy
AppliedQuoted 3 lines · David Howells
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.
Applied, thanks.