]> git.itanic.dy.fi Git - linux-stable/commitdiff
kconfig: require an exact match for "is not set" to disable CONFIG option
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 18 Nov 2023 07:59:11 +0000 (16:59 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 28 Nov 2023 02:22:51 +0000 (11:22 +0900)
Currently, any string starting "is not set" disables a CONFIG option.

For example, "# CONFIG_FOO is not settled down" is accepted as valid
input, functioning the same as "# CONFIG_FOO is not set". It is a
long-standing oddity.

Check the line against the exact pattern "is not set".

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/confdata.c

index 795ac6c9378f1eebd7076e44dde67f97e1768cfb..958be12cd621a865b9ecc532fb2994e3f74ff70e 100644 (file)
@@ -454,7 +454,7 @@ int conf_read_simple(const char *name, int def)
                        if (!p)
                                continue;
                        *p++ = 0;
-                       if (strncmp(p, "is not set", 10))
+                       if (strcmp(p, "is not set"))
                                continue;
 
                        val = "n";