blob: 3bf2353600ea85fe3bf0215daf6baf69f31706eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
commit 252815b0cfe711001eff0327872209986b36d490
Author: David Howells <dhowells@redhat.com>
Date: Wed Jul 9 15:06:45 2008 -0700
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 <dhowells@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff -urpN linux-source-2.6.18.orig/net/ipv4/netfilter/ip_nat_snmp_basic.c linux-source-2.6.18/net/ipv4/netfilter/ip_nat_snmp_basic.c
--- linux-source-2.6.18.orig/net/ipv4/netfilter/ip_nat_snmp_basic.c 2008-06-16 16:25:21.000000000 -0600
+++ linux-source-2.6.18/net/ipv4/netfilter/ip_nat_snmp_basic.c 2008-08-17 19:03:41.000000000 -0600
@@ -442,8 +442,8 @@ static unsigned char asn1_oid_decode(str
unsigned int *len)
{
unsigned long subid;
- unsigned int size;
unsigned long *optr;
+ size_t size;
size = eoc - ctx->pointer + 1;
|