Commit 6c6f9f31 authored by Antoine Tenart's avatar Antoine Tenart Committed by Pablo Neira Ayuso

netfilter: nf_tables: nft_parse_register can return a negative value

Since commit 6e1acfa3 ("netfilter: nf_tables: validate registers
coming from userspace.") nft_parse_register can return a negative value,
but the function prototype is still returning an unsigned int.

Fixes: 6e1acfa3 ("netfilter: nf_tables: validate registers coming from userspace.")
Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 05ae2fba
......@@ -9363,7 +9363,7 @@ int nft_parse_u32_check(const struct nlattr *attr, int max, u32 *dest)
}
EXPORT_SYMBOL_GPL(nft_parse_u32_check);
static unsigned int nft_parse_register(const struct nlattr *attr, u32 *preg)
static int nft_parse_register(const struct nlattr *attr, u32 *preg)
{
unsigned int reg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment