summaryrefslogtreecommitdiff
path: root/kconfig/conf.c
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2016-12-01 00:34:39 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2016-12-01 00:34:39 (GMT)
commit89a2182f14dec1f8dd2ff633c65449ca5efda95b (patch)
tree20b8ec7906236c6671c42af3bcc82f1a99d1485d /kconfig/conf.c
parent699a54d8cedef2883ca6834feed99f8f2b077332 (diff)
kconfig: sync upstream changes
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'kconfig/conf.c')
-rw-r--r--kconfig/conf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kconfig/conf.c b/kconfig/conf.c
index f7a50c1..4a23f54 100644
--- a/kconfig/conf.c
+++ b/kconfig/conf.c
@@ -5,6 +5,7 @@
#include <locale.h>
#include <ctype.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -41,7 +42,7 @@ static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
-static char line[128];
+static char line[PATH_MAX];
static struct menu *rootEntry;
static void print_help(struct menu *menu)
@@ -109,7 +110,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
if (!tty_stdio)
printf("\n");
return 1;
@@ -311,7 +312,7 @@ static int conf_choice(struct menu *menu)
/* fall through */
case oldaskconfig:
fflush(stdout);
- xfgets(line, 128, stdin);
+ xfgets(line, sizeof(line), stdin);
strip(line);
if (line[0] == '?') {
print_help(menu);