projects
/
xmenu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a5ddd2c
)
Fixing segfault in case of empty input
author
phillbush
<phillbush@cock.li>
Sat, 30 May 2020 02:55:37 +0000
(23:55 -0300)
committer
phillbush
<phillbush@cock.li>
Sat, 30 May 2020 02:55:37 +0000
(23:55 -0300)
xmenu.c
patch
|
blob
|
blame
|
history
diff --git
a/xmenu.c
b/xmenu.c
index
5fefae8
..
31984fb
100644
(file)
--- a/
xmenu.c
+++ b/
xmenu.c
@@
-379,6
+379,8
@@
parsestdin(void)
char *label, *output;
unsigned level = 0;
char *label, *output;
unsigned level = 0;
+ rootmenu = NULL;
+
while (fgets(buf, BUFSIZ, stdin) != NULL) {
/* get the indentation level */
level = strspn(buf, "\t");
while (fgets(buf, BUFSIZ, stdin) != NULL) {
/* get the indentation level */
level = strspn(buf, "\t");