From: Jan Engelhardt Date: Thu, 5 May 2011 10:53:14 +0000 (+0200) Subject: libxtables: flag invalid uses of XTOPT_PUT X-Git-Tag: v1.4.11~16^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=269cbfd30aac18c1fd251be83430dabc60abee0c;p=thirdparty%2Fiptables.git libxtables: flag invalid uses of XTOPT_PUT Signed-off-by: Jan Engelhardt --- 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",