Commit 5fd2b38c authored by Petri Hintukainen's avatar Petri Hintukainen

Fix check for empty home dir

parent 100ac1a3
Pipeline #35 skipped
......@@ -234,7 +234,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
/* Try looking in password file for home dir. */
p_pwd = getpwuid(getuid());
if( p_pwd && p_pwd[ 0 ] )
if( p_pwd && p_pwd->pw_dir && p_pwd->pw_dir[ 0 ] )
{
psz_home = p_pwd->pw_dir;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment