]> git.ipfire.org Git - people/ms/linux.git/blobdiff - net/ipv4/netfilter/ip_tables.c
Importing "grsecurity-3.1-3.19.2-201503201903.patch"
[people/ms/linux.git] / net / ipv4 / netfilter / ip_tables.c
index 99e810f84671bbdb80e33c6915cc7be49ba0f1bb..3711b818c2297fd5a7472a2d549f4d018a5e7754 100644 (file)
@@ -1073,14 +1073,14 @@ static int compat_table_info(const struct xt_table_info *info,
 #endif
 
 static int get_info(struct net *net, void __user *user,
-                    const int *len, int compat)
+                    int len, int compat)
 {
        char name[XT_TABLE_MAXNAMELEN];
        struct xt_table *t;
        int ret;
 
-       if (*len != sizeof(struct ipt_getinfo)) {
-               duprintf("length %u != %zu\n", *len,
+       if (len != sizeof(struct ipt_getinfo)) {
+               duprintf("length %u != %zu\n", len,
                         sizeof(struct ipt_getinfo));
                return -EINVAL;
        }
@@ -1117,7 +1117,7 @@ static int get_info(struct net *net, void __user *user,
                info.size = private->size;
                strcpy(info.name, name);
 
-               if (copy_to_user(user, &info, *len) != 0)
+               if (copy_to_user(user, &info, len) != 0)
                        ret = -EFAULT;
                else
                        ret = 0;
@@ -1973,7 +1973,7 @@ compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
 
        switch (cmd) {
        case IPT_SO_GET_INFO:
-               ret = get_info(sock_net(sk), user, len, 1);
+               ret = get_info(sock_net(sk), user, *len, 1);
                break;
        case IPT_SO_GET_ENTRIES:
                ret = compat_get_entries(sock_net(sk), user, len);
@@ -2020,7 +2020,7 @@ do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
 
        switch (cmd) {
        case IPT_SO_GET_INFO:
-               ret = get_info(sock_net(sk), user, len, 0);
+               ret = get_info(sock_net(sk), user, *len, 0);
                break;
 
        case IPT_SO_GET_ENTRIES: