From: Alexander Popov Date: Sun, 19 Jun 2022 20:45:41 +0000 (+0300) Subject: Check that a kconfig option value is sane X-Git-Tag: v0.6.1~137 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ba678bf39a67ccf857727f034ab21ee4e380f0df;p=kconfig-hardened-check.git Check that a kconfig option value is sane --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index ac2d6f6..58d82f2 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -784,6 +784,8 @@ def parse_kconfig_file(parsed_options, fname): if opt_is_on.match(line): option, value = line.split('=', 1) + if value == 'is not set': + sys.exit('[!] ERROR: bad enabled kconfig option "{}"'.format(line)) elif opt_is_off.match(line): option, value = line[2:].split(' ', 1) if value != 'is not set':