shithub: libdvdcss

Download patch

ref: 439f9615b8fbbd06d06f7bfe9699c8255907a51f
parent: c126d5ac7843a809857a6dc14fbaae29a2499ff0
author: Jean-Baptiste Kempf <jb@videolan.org>
date: Wed Nov 22 20:53:16 EST 2017

Fix key cache storage in ~/.dvdcss

See VLC #16347

--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -433,8 +433,9 @@
     }
 
     /* We have a disc name or ID, we can create the cache subdirectory. */
-    i = sprintf( dvdcss->psz_cachefile, "%s/%s-%s-%s",
-                 dvdcss->psz_cachefile, psz_title, psz_serial, psz_key );
+    i = strlen( dvdcss->psz_cachefile );
+    i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s-%s",
+                  psz_title, psz_serial, psz_key );
     i_ret = exists_or_mkdir( dvdcss->psz_cachefile, 0755 );
     if( i_ret < 0 && errno != EEXIST )
     {