shithub: libdvdcss

Download patch

ref: e8c0c4475b35c5a6c95794e51fd4c242f7af3d3d
parent: de6aa7e9cd182c7ebfc2285c58dd0418d97e27b4
author: Diego Biurrun <diego@biurrun.de>
date: Thu Nov 6 10:19:13 EST 2014

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

This fixes CID 75513.

--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -262,7 +262,7 @@
 
     /* 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 )
     {