diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-05-02 02:43:15 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-05-08 15:02:22 +0200 |
commit | 0787a82873fe9db5dea478942b183e6ff2a8500d (patch) | |
tree | 5dedfa58953f949d0cde89b82e883ddb1fb0547e /xtoptions.c | |
parent | 06312dab6c530a214a4e7bad1b2329381430bddc (diff) |
libxtables: fix assignment in wrong offset (XTTYPE_UINT*RC)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtoptions.c')
-rw-r--r-- | xtoptions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xtoptions.c b/xtoptions.c index 5b1df889..1cfc8440 100644 --- a/xtoptions.c +++ b/xtoptions.c @@ -190,7 +190,6 @@ static void xtopt_parse_mint(struct xt_option_call *cb) xt_params->exit_err(PARAMETER_PROBLEM, "%s: Argument to \"--%s\" has unexpected " "characters.\n", cb->ext_name, entry->name); - ++cb->nvals; if (cb->nvals < ARRAY_SIZE(cb->val.u32_range)) { if (entry->type == XTTYPE_UINT8RC) cb->val.u8_range[cb->nvals] = value; @@ -201,6 +200,7 @@ static void xtopt_parse_mint(struct xt_option_call *cb) else if (entry->type == XTTYPE_UINT64RC) cb->val.u64_range[cb->nvals] = value; } + ++cb->nvals; if (entry->flags & XTOPT_PUT) { if (entry->type == XTTYPE_UINT8RC) *(uint8_t *)put = value; |