Browse Source

Fixing segfault in case of empty input

master
phillbush 4 years ago
parent
commit
ddb15acfde
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      xmenu.c

+ 2
- 0
xmenu.c View File

@@ -379,6 +379,8 @@ parsestdin(void)
char *label, *output;
unsigned level = 0;

rootmenu = NULL;

while (fgets(buf, BUFSIZ, stdin) != NULL) {
/* get the indentation level */
level = strspn(buf, "\t");


Loading…
Cancel
Save