Commit a3b7039b authored by Konstantin Meskhidze's avatar Konstantin Meskhidze Committed by Masahiro Yamada

kconfig: fix possible buffer overflow

Buffer 'new_argv' is accessed without bound check after accessing with
bound check via 'new_argc' index.

Fixes: e298f3b4 ("kconfig: add built-in function support")
Co-developed-by: default avatarIvanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: default avatarKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent feec5e1f
......@@ -396,6 +396,9 @@ static char *eval_clause(const char *str, size_t len, int argc, char *argv[])
p++;
}
if (new_argc >= FUNCTION_MAX_ARGS)
pperror("too many function arguments");
new_argv[new_argc++] = prev;
/*
......
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