diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-02-11 01:45:26 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-02-11 01:46:45 +0100 |
commit | af3d73ec867debb5e38c6c6fde66f05093714fec (patch) | |
tree | 1f63a5a8b0e07e6f881dbb350df3ffff03a081b7 /iptables.c | |
parent | 7ada0bb7aafd94ef7c9c076e8be50c80bc549a4f (diff) |
iptables: fix segfault target option parsing
With v1.4.10-58-g94e247b, target option parsing started to happen in the
wrong case.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1269,9 +1269,9 @@ static void command_default(struct iptables_command_state *cs) struct xtables_rule_match *matchp; struct xtables_match *m; - if (cs->target == NULL || cs->target->parse == NULL || - cs->c < cs->target->option_offset || - cs->c >= cs->target->option_offset + XT_OPTION_OFFSET_SCALE) { + if (cs->target != NULL && cs->target->parse != NULL && + cs->c >= cs->target->option_offset && + cs->c < cs->target->option_offset + XT_OPTION_OFFSET_SCALE) { cs->target->parse(cs->c - cs->target->option_offset, cs->argv, cs->invert, &cs->target->tflags, &cs->fw, &cs->target->t); |