kconfig: use snprintf for formatting pathnames
authorJacob Garber <jgarber1@ualberta.ca>
Fri, 10 May 2019 19:28:52 +0000 (13:28 -0600)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 27 Sep 2019 20:31:17 +0000 (22:31 +0200)
commit1cad5edcbe7319807b678e2c263def285f6abcd2
tree1577eb8c21bf29469e0c396b342d0b468a0f5e40
parenta57a7e78baeede9c999a67dcd812fbfc711463fa
kconfig: use snprintf for formatting pathnames

Valid pathnames will never exceed PATH_MAX, but these file names
are unsanitized and can cause buffer overflow if set incorrectly.
Use snprintf to avoid this. This was flagged during a Coverity scan
of the coreboot project, which also uses kconfig for its build system.

Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/confdata.c
config/lexer.l