Skip to content

Commit

Permalink
If HOME environment variable is not configured, use / as home. Having…
Browse files Browse the repository at this point in the history
… NULL home_path will crash freerdp.
  • Loading branch information
pjd committed Feb 17, 2012
1 parent e03734b commit 036c8ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libfreerdp-utils/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ char* freerdp_get_home_path(rdpSettings* settings)
{
if (settings->home_path == NULL)
settings->home_path = getenv(HOME_ENV_VARIABLE);
if (settings->home_path == NULL)
settings->home_path = xstrdup("/");

return settings->home_path;
}
Expand Down

0 comments on commit 036c8ce

Please sign in to comment.