Commit 100ac1a3 authored by Petri Hintukainen's avatar Petri Hintukainen

Check for empty strings

parent 22cb2d44
......@@ -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 )
if( p_pwd && p_pwd[ 0 ] )
{
psz_home = p_pwd->pw_dir;
}
......@@ -248,7 +248,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
}
/* Cache our keys in ${HOME}/.dvdcss/ */
if( psz_home )
if( psz_home && psz_home[ 0 ] )
{
int home_pos = 0;
......
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