Commit 2aca6d8b authored by Diego Biurrun's avatar Diego Biurrun

Fix calculation of cache filename length.

The calculation skipped some parts that are included in the filename.
parent 6e7f5562
......@@ -270,7 +270,8 @@ 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. */
else if( strlen( psz_cache ) + 1 + DISC_TITLE_LENGTH + 1 +
STRING_KEY_SIZE + CACHE_FILENAME_LENGTH + 1 > PATH_MAX )
MANUFACTURING_DATE_LENGTH + 1 + STRING_KEY_SIZE + 1 +
CACHE_FILENAME_LENGTH + 1 > PATH_MAX )
{
print_error( dvdcss, "cache directory name is too long" );
return NULL;
......
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