Skip to content

Commit

Permalink
Make sure xdg-utils in the $PATH get properly escaped for the shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 7, 2009
1 parent 0a6427e commit 0ab5256
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform_unix.c
Expand Up @@ -1131,6 +1131,12 @@ static boolean unix_launchXdgUtil(const char *util, const char **argv)
char *cmd = xstrdup(util);
char *tmp = NULL;
int i;

// just in case there's a space in the $PATH entry...
tmp = shellEscape(path);
free(path);
path = tmp;

for (i = 0; argv[i]; i++)
{
char *escaped = shellEscape(argv[i]);
Expand Down

0 comments on commit 0ab5256

Please sign in to comment.