kconfig: use snprintf for formatting pathnames
authorJacob Garber <jgarber1@ualberta.ca>
Fri, 10 May 2019 19:28:52 +0000 (13:28 -0600)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 14 May 2019 14:23:25 +0000 (23:23 +0900)
commitb9d1a8e9302e68ee03571a286aadeb8041e0b2ca
tree372b2d2bee6137d794110d7ff7e106b086dfbe99
parent4cb726121e2cce18d4db5e79347f3ade5fd661a2
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>
scripts/kconfig/confdata.c
scripts/kconfig/lexer.l