]> git.itanic.dy.fi Git - linux-stable/commit
kconfig: fix infinite loop when expanding a macro at the end of file
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 2 Feb 2024 15:57:59 +0000 (00:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 19 Feb 2024 09:20:40 +0000 (18:20 +0900)
commitaf8bbce92044dc58e4cc039ab94ee5d470a621f5
tree4d16ce74f9cf1c79047ad0e41304aeb212df267a
parentfee9b6d14acde447805d14c0a0a926ced18aa8fa
kconfig: fix infinite loop when expanding a macro at the end of file

A macro placed at the end of a file with no newline causes an infinite
loop.

[Test Kconfig]
  $(info,hello)
  \ No newline at end of file

I realized that flex-provided input() returns 0 instead of EOF when it
reaches the end of a file.

Fixes: 104daea149c4 ("kconfig: reference environment variables directly and remove 'option env='")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/lexer.l