|
@@ -1107,6 +1107,8 @@ static int do_replace(struct net *net, const void __user *user,
|
|
if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
|
|
if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
+ tmp.name[sizeof(tmp.name) - 1] = 0;
|
|
|
|
+
|
|
countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;
|
|
countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;
|
|
newinfo = vmalloc(sizeof(*newinfo) + countersize);
|
|
newinfo = vmalloc(sizeof(*newinfo) + countersize);
|
|
if (!newinfo)
|
|
if (!newinfo)
|