--- zzzz-none-000/linux-4.1.38/scripts/kconfig/conf.c 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/scripts/kconfig/conf.c 2020-11-25 10:06:48.000000000 +0000 @@ -110,6 +110,12 @@ case oldaskconfig: fflush(stdout); xfgets(line, 128, stdin); +#if defined(CONFIG_BCM_KF_FAIL_CONFIG_ON_EOF) || !defined(CONFIG_BCM_IN_KERNEL) + if (feof(stdin)) { + fprintf(stderr, "Unexpected EOF\n"); + exit(1); + } +#endif if (!tty_stdio) printf("\n"); return 1; @@ -312,6 +318,12 @@ case oldaskconfig: fflush(stdout); xfgets(line, 128, stdin); +#if defined(CONFIG_BCM_KF_FAIL_CONFIG_ON_EOF) || !defined(CONFIG_BCM_IN_KERNEL) + if (feof(stdin)) { + fprintf(stderr, "Unexpected EOF\n"); + exit(1); + } +#endif strip(line); if (line[0] == '?') { print_help(menu);