mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Check for argc==0 when calling wtokensplit()
The WINGs-function wtokensplit does not set argv to NULL if no string has been split - instead argc is set to 0. You can only observe this issue if you compile Window Maker without any optimization: compile Window Maker with CFLAGS="" run Window Maker and save a session change session-file and replace a 'command xyz' line with 'command " "' restart Window Maker watch "Fatal error"-message Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/ Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
This commit is contained in:
committed by
Carlos R. Mafra
parent
bbc52564d0
commit
f516213bf3
@@ -2977,7 +2977,7 @@ execCommand(WAppIcon *btn, char *command, WSavedState *state)
|
||||
|
||||
wtokensplit(cmdline, &argv, &argc);
|
||||
|
||||
if (argv==NULL) {
|
||||
if (!argc) {
|
||||
if (cmdline)
|
||||
wfree(cmdline);
|
||||
if (state)
|
||||
|
||||
@@ -381,7 +381,7 @@ execCommand(WScreen *scr, char *command, char *host)
|
||||
|
||||
wtokensplit(command, &argv, &argc);
|
||||
|
||||
if (argv==NULL) {
|
||||
if (!argc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user