Skip to content

Commit

Permalink
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/mmarek/kbuild

Pull kconfig updates from Michal Marek:
 - Fix for make xconfig segfault
 - Handle long strings in config symbol values
 - Fix for mixing boolean and kconfig ternary type

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: fix qconf segfault by deleting heap objects
  kconfig: return 'false' instead of 'no' in bool function
  kconfig: allow kconfig to handle longer path names
  • Loading branch information
Linus Torvalds committed Jan 20, 2016
2 parents d9569f0 + 5b61c7b commit af75d51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <locale.h>
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ bool menu_is_visible(struct menu *menu)

if (menu->visibility) {
if (expr_calc_value(menu->visibility) == no)
return no;
return false;
}

sym = menu->sym;
Expand Down
2 changes: 2 additions & 0 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,8 @@ int main(int ac, char** av)

configSettings->endGroup();
delete configSettings;
delete v;
delete configApp;

return 0;
}

0 comments on commit af75d51

Please sign in to comment.