[libdvdcss-devel] Fix using DVDCSS_CACHE environment variable

Petri Hintukainen git at videolan.org
Fri Mar 11 11:03:26 CET 2016


libdvdcss | branch: master | Petri Hintukainen <phintuka at gmail.com> | Fri Mar 11 12:00:05 2016 +0200| [98c66a5b51db1e7a3a056deaafcb9a76d09afbeb] | committer: Petri Hintukainen

Fix using DVDCSS_CACHE environment variable

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=98c66a5b51db1e7a3a056deaafcb9a76d09afbeb
---

 src/libdvdcss.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 2f78b78..7d86a08 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
+    {
+        strncpy( dvdcss->psz_cachefile, psz_cache, PATH_MAX );
+        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. */



More information about the libdvdcss-devel mailing list