Skip to content

Commit

Permalink
[NETFILTER]: arp_tables: fix NULL pointer dereference
Browse files Browse the repository at this point in the history
The check is wrong and lets NULL-ptrs slip through since !IS_ERR(NULL)
is true.

Coverity #190

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Mar 13, 2006
1 parent baa829d commit 31fe4d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ static int get_entries(const struct arpt_get_entries *entries,
struct arpt_table *t;

t = xt_find_table_lock(NF_ARP, entries->name);
if (t || !IS_ERR(t)) {
if (t && !IS_ERR(t)) {
struct xt_table_info *private = t->private;
duprintf("t->private->number = %u\n",
private->number);
Expand Down

0 comments on commit 31fe4d3

Please sign in to comment.