Commit e8c0c447 authored by Diego Biurrun's avatar Diego Biurrun

libdvdcss: Ensure that the pointer passed to strlen() is not NULL

This fixes CID 75513.
parent de6aa7e9
......@@ -262,7 +262,7 @@ static char *set_cache_directory( dvdcss_t dvdcss )
/* Check that there is enough space for the cache directory path and the
* block filename. The +1 are path separators and terminating null byte. */
if( strlen( psz_cache ) + 1 + DISC_TITLE_LENGTH + 1 +
if( psz_cache && strlen( psz_cache ) + 1 + DISC_TITLE_LENGTH + 1 +
MANUFACTURING_DATE_LENGTH + 1 + STRING_KEY_SIZE + 1 +
CACHE_FILENAME_LENGTH + 1 > PATH_MAX )
{
......
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