From 2f12236bc1c92f73c21e973363f79eb300de603f Mon Sep 17 00:00:00 2001 From: Anton Fedchin Date: Mon, 15 Feb 2016 16:09:35 +0300 Subject: [PATCH] [libdvdcss] Copy value psz_cache to dvdcss->psz_cachefile if it exists. --- src/libdvdcss.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libdvdcss.c b/src/libdvdcss.c index 2f78b78..d09d2b3 100644 --- a/src/libdvdcss.c +++ b/src/libdvdcss.c @@ -274,6 +274,11 @@ static int set_cache_directory( dvdcss_t dvdcss ) } #endif /* ! defined( _WIN32 ) */ } + else + { + snprintf( dvdcss->psz_cachefile, PATH_MAX, "%s", psz_cache ); + dvdcss->psz_cachefile[PATH_MAX - 1] = '\0'; + } /* Check that there is enough space for the cache directory path and the * block filename. The +1s are path separators. */