|
@@ -1275,6 +1275,7 @@ do_replace(struct net *net, const void __user *user, unsigned int len)
|
|
|
/* overflow check */
|
|
|
if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
|
|
|
return -ENOMEM;
|
|
|
+ tmp.name[sizeof(tmp.name)-1] = 0;
|
|
|
|
|
|
newinfo = xt_alloc_table_info(tmp.size);
|
|
|
if (!newinfo)
|
|
@@ -1822,6 +1823,7 @@ compat_do_replace(struct net *net, void __user *user, unsigned int len)
|
|
|
return -ENOMEM;
|
|
|
if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
|
|
|
return -ENOMEM;
|
|
|
+ tmp.name[sizeof(tmp.name)-1] = 0;
|
|
|
|
|
|
newinfo = xt_alloc_table_info(tmp.size);
|
|
|
if (!newinfo)
|
|
@@ -2051,6 +2053,7 @@ do_ip6t_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
|
|
|
ret = -EFAULT;
|
|
|
break;
|
|
|
}
|
|
|
+ rev.name[sizeof(rev.name)-1] = 0;
|
|
|
|
|
|
if (cmd == IP6T_SO_GET_REVISION_TARGET)
|
|
|
target = 1;
|