summaryrefslogtreecommitdiffstats
path: root/xtoptions.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-05-05 12:53:14 +0200
committerJan Engelhardt <jengelh@medozas.de>2011-05-09 00:45:18 +0200
commit269cbfd30aac18c1fd251be83430dabc60abee0c (patch)
treedfe549641c85c279677c90b8bab5fa9dc837afc6 /xtoptions.c
parentd7282413763b0ba85d512c1cd49174b762ff449c (diff)
libxtables: flag invalid uses of XTOPT_PUT
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtoptions.c')
-rw-r--r--xtoptions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xtoptions.c b/xtoptions.c
index f8031bbe..29d05d53 100644
--- a/xtoptions.c
+++ b/xtoptions.c
@@ -708,7 +708,8 @@ void xtables_option_metavalidate(const char *name,
name, entry->id);
if (!(entry->flags & XTOPT_PUT))
continue;
- if (entry->type >= ARRAY_SIZE(xtopt_psize))
+ if (entry->type >= ARRAY_SIZE(xtopt_psize) ||
+ xtopt_psize[entry->type] == 0)
xt_params->exit_err(OTHER_PROBLEM,
"%s: entry type of option \"--%s\" cannot be "
"combined with XTOPT_PUT\n",