kconfig: fix possible buffer overflow